aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c59
2 files changed, 27 insertions, 37 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 3c4aed7fc2..937d1fbd2c 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,8 @@
+2001-08-14 Dan Winship <danw@ximian.com>
+
+ * backend/pas/pas-backend-ldap.c: Fix up to match the
+ pas_book_new/get_vcard changes.
+
2001-08-14 Christopher James Lahey <clahey@ximian.com>
* gui/merging/e-card-merging-book-commit-duplicate-detected.glade:
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)