From d8a0beac1bc3318fe5d82592832843c215ed7ae7 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 14 Aug 2001 14:32:23 +0000 Subject: 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 --- addressbook/backend/pas/pas-backend-ldap.c | 59 +++++++++++------------------- 1 file changed, 22 insertions(+), 37 deletions(-) (limited to 'addressbook/backend') 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 @@ -1065,6 +1065,23 @@ pas_backend_ldap_process_modify_card (PASBackend *backend, ldap_op_process ((LDAPOp*)modify_op); } + +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; @@ -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) -- cgit