diff options
author | Chris Toshok <toshok@ximian.com> | 2001-08-15 13:10:37 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-08-15 13:10:37 +0800 |
commit | d5b8c3deb5a964635121671d3c76ffb82709cdf0 (patch) | |
tree | 0996be6af8817a6483b7d9bae138391a4b62d8df /addressbook/backend/pas/pas-backend-ldap.c | |
parent | b4c3c0fa9b3fa9ce8ad64784ccf183e16b084b8c (diff) | |
download | gsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.tar.gz gsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.tar.zst gsoc2013-evolution-d5b8c3deb5a964635121671d3c76ffb82709cdf0.zip |
implement using search_for_dn.
2001-08-14 Chris Toshok <toshok@ximian.com>
* backend/pas/pas-backend-ldap.c
(pas_backend_ldap_process_get_vcard): implement using
search_for_dn.
svn path=/trunk/; revision=12043
Diffstat (limited to 'addressbook/backend/pas/pas-backend-ldap.c')
-rw-r--r-- | addressbook/backend/pas/pas-backend-ldap.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c index 350fc7a0f6..fd87bc1b19 100644 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ b/addressbook/backend/pas/pas-backend-ldap.c @@ -1072,14 +1072,23 @@ pas_backend_ldap_process_get_vcard (PASBackend *backend, PASRequest *req) { PASBackendLDAP *bl; + ECardSimple *simple; bl = PAS_BACKEND_LDAP (pas_book_get_backend (book)); - /* XXX use ldap_search */ + simple = search_for_dn (bl, req->id); - pas_book_respond_get_vcard (book, - GNOME_Evolution_Addressbook_BookListener_Success, - ""); + if (simple) { + pas_book_respond_get_vcard (book, + GNOME_Evolution_Addressbook_BookListener_Success, + e_card_simple_get_vcard (simple)); + gtk_object_unref (GTK_OBJECT (simple)); + } + else { + pas_book_respond_get_vcard (book, + GNOME_Evolution_Addressbook_BookListener_CardNotFound, + ""); + } } |