aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-book-listener.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-03-28 11:52:46 +0800
committerChris Lahey <clahey@src.gnome.org>2000-03-28 11:52:46 +0800
commit21e60e238477edd1ad157bd17024d5ea6395e048 (patch)
tree4f251e318f085aecc387c49f052a14f7874c1a1a /addressbook/backend/ebook/e-book-listener.c
parentbd46ea2926e3f244d6d875195363d261f53a4e07 (diff)
downloadgsoc2013-evolution-21e60e238477edd1ad157bd17024d5ea6395e048.tar
gsoc2013-evolution-21e60e238477edd1ad157bd17024d5ea6395e048.tar.gz
gsoc2013-evolution-21e60e238477edd1ad157bd17024d5ea6395e048.tar.bz2
gsoc2013-evolution-21e60e238477edd1ad157bd17024d5ea6395e048.tar.lz
gsoc2013-evolution-21e60e238477edd1ad157bd17024d5ea6395e048.tar.xz
gsoc2013-evolution-21e60e238477edd1ad157bd17024d5ea6395e048.tar.zst
gsoc2013-evolution-21e60e238477edd1ad157bd17024d5ea6395e048.zip
Fixed some warnings.
2000-03-27 Christopher James Lahey <clahey@helixcode.com> * addressbook/backend/ebook/test-card.c: Fixed some warnings. * addressbook/backend/ebook/test-client.c: Added a section to test cursors and returning an id when adding. * addressbook/backend/ebook/e-card-pairs.h: Removed the address pairs since they were added to e-card.c. * addressbook/backend/ebook/e-card.c, addressbook/backend/ebook/e-card.h: Made the set_id function take a const char *. * addressbook/backend/ebook/e-book-listener.c, addressbook/backend/ebook/e-book-listener.h, addressbook/backend/ebook/e-book.c, addressbook/backend/ebook/e-book.h, addressbook/backend/idl/addressbook.idl, addressbook/backend/pas/pas-backend-file.c, addressbook/backend/pas/pas-book.c, addressbook/backend/pas/pas-book.h: Added a get_all_cards function and made the response to the create_card function include the card id. * addressbook/backend/ebook/Makefile.am: Added e-card-cursor.c and e-card-cursor.h. * addressbook/backend/ebook/e-card-cursor.c, addressbook/backend/ebook/e-card-cursor.h: New class for proxying to an Evolution_CardCursor. * addressbook/backend/pas/Makefile.am: Added pas-card-cursor.c and pas-card-cursor.h. * addressbook/backend/pas/pas-card-cursor.c, addressbook/backend/pas/pas-card-cursor.h: New bonobo class for making an Evolution_CardCursor server. svn path=/trunk/; revision=2205
Diffstat (limited to 'addressbook/backend/ebook/e-book-listener.c')
-rw-r--r--addressbook/backend/ebook/e-book-listener.c71
1 files changed, 65 insertions, 6 deletions
diff --git a/addressbook/backend/ebook/e-book-listener.c b/addressbook/backend/ebook/e-book-listener.c
index 107f71fedc..826a070148 100644
--- a/addressbook/backend/ebook/e-book-listener.c
+++ b/addressbook/backend/ebook/e-book-listener.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Exports the BookListener interface. Maintains a queue of messages
* which come in on the interface.
@@ -109,6 +110,38 @@ e_book_listener_queue_open_progress (EBookListener *listener,
static void
+e_book_listener_queue_create_card_response (EBookListener *listener,
+ EBookStatus status,
+ const char *id)
+{
+ EBookListenerResponse *resp;
+
+ resp = g_new0 (EBookListenerResponse, 1);
+
+ resp->op = CreateCardResponse;
+ resp->status = status;
+ resp->id = g_strdup (id);
+
+ e_book_listener_queue_response (listener, resp);
+}
+
+static void
+e_book_listener_queue_get_cursor_response (EBookListener *listener,
+ EBookStatus status,
+ Evolution_CardCursor cursor)
+{
+ EBookListenerResponse *resp;
+
+ resp = g_new0 (EBookListenerResponse, 1);
+
+ resp->op = GetCursorResponse;
+ resp->status = status;
+ resp->cursor = cursor;
+
+ e_book_listener_queue_response (listener, resp);
+}
+
+static void
e_book_listener_queue_link_status (EBookListener *listener,
gboolean connected)
{
@@ -139,15 +172,17 @@ e_book_listener_queue_generic_event (EBookListener *listener,
}
static void
-impl_BookListener_respond_create_card (PortableServer_Servant servant,
- const Evolution_BookListener_CallStatus status,
- CORBA_Environment *ev)
+impl_BookListener_respond_create_card (PortableServer_Servant servant,
+ const Evolution_BookListener_CallStatus status,
+ const Evolution_CardId id,
+ CORBA_Environment *ev)
{
EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
- e_book_listener_queue_generic_response (
- listener, CreateCardResponse,
- e_book_listener_convert_status (status));
+ e_book_listener_queue_create_card_response (
+ listener,
+ e_book_listener_convert_status (status),
+ id);
}
static void
@@ -175,6 +210,28 @@ impl_BookListener_respond_modify_card (PortableServer_Servant servant,
}
static void
+impl_BookListener_respond_get_cursor (PortableServer_Servant servant,
+ const Evolution_BookListener_CallStatus status,
+ const Evolution_CardCursor cursor,
+ CORBA_Environment *ev)
+{
+ EBookListener *listener = E_BOOK_LISTENER (bonobo_object_from_servant (servant));
+ Evolution_CardCursor cursor_copy;
+
+ cursor_copy = CORBA_Object_duplicate (cursor, ev);
+
+ if (ev->_major != CORBA_NO_EXCEPTION) {
+ g_warning ("EBookListener: Exception while duplicating CardCursor!\n");
+ return;
+ }
+
+ e_book_listener_queue_get_cursor_response (
+ listener,
+ e_book_listener_convert_status (status),
+ cursor_copy);
+}
+
+static void
impl_BookListener_respond_open_book (PortableServer_Servant servant,
const Evolution_BookListener_CallStatus status,
const Evolution_Book book,
@@ -446,6 +503,8 @@ e_book_listener_get_epv (void)
epv->respond_remove_card = impl_BookListener_respond_remove_card;
epv->respond_modify_card = impl_BookListener_respond_modify_card;
+ epv->respond_get_cursor = impl_BookListener_respond_get_cursor;
+
epv->report_connection_status = impl_BookListener_report_connection_status;
epv->signal_card_changed = impl_BookListener_signal_card_changed;