diff options
author | Dan Winship <danw@src.gnome.org> | 2001-08-14 22:32:23 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-08-14 22:32:23 +0800 |
commit | d8a0beac1bc3318fe5d82592832843c215ed7ae7 (patch) | |
tree | bb2f4b10330e97702b7921b511500e03af838c0f /addressbook/backend | |
parent | 28d41bb47413aa406c4c9f60044da646063a8966 (diff) | |
download | gsoc2013-evolution-d8a0beac1bc3318fe5d82592832843c215ed7ae7.tar gsoc2013-evolution-d8a0beac1bc3318fe5d82592832843c215ed7ae7.tar.gz gsoc2013-evolution-d8a0beac1bc3318fe5d82592832843c215ed7ae7.tar.bz2 gsoc2013-evolution-d8a0beac1bc3318fe5d82592832843c215ed7ae7.tar.lz gsoc2013-evolution-d8a0beac1bc3318fe5d82592832843c215ed7ae7.tar.xz gsoc2013-evolution-d8a0beac1bc3318fe5d82592832843c215ed7ae7.tar.zst gsoc2013-evolution-d8a0beac1bc3318fe5d82592832843c215ed7ae7.zip |
Fix up to match the pas_book_new/get_vcard changes.
* backend/pas/pas-backend-ldap.c: Fix up to match the
pas_book_new/get_vcard changes.
svn path=/trunk/; revision=12009
Diffstat (limited to 'addressbook/backend')
-rw-r--r-- | addressbook/backend/pas/pas-backend-ldap.c | 59 |
1 files changed, 22 insertions, 37 deletions
diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c index 2d726483a7..350fc7a0f6 100644 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ b/addressbook/backend/pas/pas-backend-ldap.c @@ -1066,6 +1066,23 @@ pas_backend_ldap_process_modify_card (PASBackend *backend, } +static void +pas_backend_ldap_process_get_vcard (PASBackend *backend, + PASBook *book, + PASRequest *req) +{ + PASBackendLDAP *bl; + + bl = PAS_BACKEND_LDAP (pas_book_get_backend (book)); + + /* XXX use ldap_search */ + + pas_book_respond_get_vcard (book, + GNOME_Evolution_Addressbook_BookListener_Success, + ""); +} + + typedef struct { LDAPOp op; PASBook *book; @@ -2108,19 +2125,6 @@ pas_backend_ldap_process_get_supported_fields (PASBackend *backend, bl->priv->supported_fields); } -static gboolean -pas_backend_ldap_can_write (PASBook *book) -{ - return TRUE; /* XXX */ -} - -static gboolean -pas_backend_ldap_can_write_card (PASBook *book, - const char *id) -{ - return TRUE; /* XXX */ -} - static void pas_backend_ldap_process_client_requests (PASBook *book) { @@ -2150,6 +2154,10 @@ pas_backend_ldap_process_client_requests (PASBook *book) pas_backend_ldap_process_check_connection (backend, book, req); break; + case GetVCard: + pas_backend_ldap_process_get_vcard (backend, book, req); + break; + case GetCursor: pas_backend_ldap_process_get_cursor (backend, book, req); break; @@ -2184,25 +2192,6 @@ pas_backend_ldap_book_destroy_cb (PASBook *book, gpointer data) pas_backend_remove_client (PAS_BACKEND (backend), book); } -static char * -pas_backend_ldap_get_vcard (PASBook *book, const char *id) -{ - PASBackendLDAP *bl; - int ldap_error = LDAP_SUCCESS; /* XXX */ - - bl = PAS_BACKEND_LDAP (pas_book_get_backend (book)); - - /* XXX use ldap_search */ - - if (ldap_error == LDAP_SUCCESS) { - /* success */ - return g_strdup (""); - } - else { - return g_strdup (""); - } -} - static gboolean pas_backend_ldap_load_uri (PASBackend *backend, const char *uri) @@ -2258,11 +2247,7 @@ pas_backend_ldap_add_client (PASBackend *backend, bl = PAS_BACKEND_LDAP (backend); - book = pas_book_new ( - backend, listener, - pas_backend_ldap_get_vcard, - pas_backend_ldap_can_write, - pas_backend_ldap_can_write_card); + book = pas_book_new (backend, listener); if (!book) { if (!bl->priv->clients) |