From b3a536d46bfc6f4ed4524ec6252abfcea2f97423 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 31 Oct 2000 19:20:31 +0000 Subject: Let the warning make sense (compute_pid): remove 2000-10-31 JP Rosevear * conduit/address-conduit.c (cursor_cb): Let the warning make sense (compute_pid): remove (local_record_from_ecard): Create local record from ecard - not finished (local_record_from_uid): Obtain local_record from uid with the proper e-book way (set_status_cleared): Add empty callback (add_archive_record): kill (delete_archive_record): kill (archive_record): Add empty callback (conduit_get_gpilot_conduit): Update signal connects * backend/pas/pas-backend-file.c (vcard_change_type): Function to determine the type of change - not finished (pas_backend_file_search_changes): Create a view and callback based on how the cards have changed (pas_backend_file_process_get_changes): Implement the get changes operation for files (pas_backend_file_process_client_requests): Add GetChanges method for processing * backend/pas/pas-book.c (pas_book_queue_get_changes): Add changes to the list (impl_Evolution_Book_get_changes): implement object method (pas_book_get_epv): Add get changes to epv (pas_book_respond_get_changes): Respond to the get changes operation * backend/pas/pas-book.h: Add GetChanges PASOperation * backend/idl/addressbook.idl: add get_changes and respond_get_changes methods * backend/ebook/e-book.c (e_book_get_changes): Client function to a view of the changed objects * backend/ebook/e-book.h: New prototype 2000-10-31 JP Rosevear * conduits/todo/todo-conduit.h: Remove add/del/mod hashes and add changed_hash. * conduits/calendar/calendar-conduit.h: ditto * conduits/todo/todo-conduit.c (next_changed_item): Utility function to get the next "really" changed item (changed status can be cleared now) (compute_status): Compute status based on changed_hash (pre_sync): Fill changed_hash and counts adds/mods/dels (set_status_cleared): New callback handler - avoid double syncing (for_each_modified): Use next_changed_item to iterate (add_archive_record): kill (delete_archive_record): kill (archive_record): New callback handler - mark/unmark archive status (conduit_get_gpilot_conduit): Adjust signal connects * conduits/calendar/calendar-conduit.c: ditto svn path=/trunk/; revision=6297 --- addressbook/backend/pas/pas-book.c | 64 +++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) (limited to 'addressbook/backend/pas/pas-book.c') diff --git a/addressbook/backend/pas/pas-book.c b/addressbook/backend/pas/pas-book.c index 4cd51237a1..6a8c17a584 100644 --- a/addressbook/backend/pas/pas-book.c +++ b/addressbook/backend/pas/pas-book.c @@ -129,6 +129,30 @@ pas_book_queue_get_book_view (PASBook *book, const Evolution_BookViewListener li pas_book_queue_request (book, req); } +static void +pas_book_queue_get_changes (PASBook *book, const Evolution_BookViewListener listener, const char *search) +{ + PASRequest *req; + CORBA_Environment ev; + + req = g_new0 (PASRequest, 1); + req->op = GetChanges; + req->search = g_strdup(search); + + CORBA_exception_init (&ev); + + req->listener = CORBA_Object_duplicate(listener, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) { + g_warning ("pas_book_queue_get_changes: Exception " + "duplicating BookViewListener!\n"); + } + + CORBA_exception_free (&ev); + + pas_book_queue_request (book, req); +} + static void pas_book_queue_check_connection (PASBook *book) { @@ -232,6 +256,17 @@ impl_Evolution_Book_get_book_view (PortableServer_Servant servant, pas_book_queue_get_book_view (book, listener, search); } +static void +impl_Evolution_Book_get_changes (PortableServer_Servant servant, + const Evolution_BookViewListener listener, + const CORBA_char *search, + CORBA_Environment *ev) +{ + PASBook *book = PAS_BOOK (bonobo_object_from_servant (servant)); + + pas_book_queue_get_changes (book, listener, search); +} + static void impl_Evolution_Book_check_connection (PortableServer_Servant servant, CORBA_Environment *ev) @@ -442,7 +477,7 @@ pas_book_respond_get_cursor (PASBook *book, } /** - * pas_book_respond_get_cursor: + * pas_book_respond_get_book_view: */ void pas_book_respond_get_book_view (PASBook *book, @@ -467,6 +502,32 @@ pas_book_respond_get_book_view (PASBook *book, CORBA_exception_free (&ev); } +/** + * pas_book_respond_get_changes: + */ +void +pas_book_respond_get_changes (PASBook *book, + Evolution_BookListener_CallStatus status, + PASBookView *book_view) +{ + CORBA_Environment ev; + CORBA_Object object; + + CORBA_exception_init (&ev); + + object = bonobo_object_corba_objref(BONOBO_OBJECT(book_view)); + + Evolution_BookListener_respond_get_changes ( + book->priv->listener, status, object, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) { + g_warning ("pas_book_respond_get_changes: Exception " + "responding to BookListener!\n"); + } + + CORBA_exception_free (&ev); +} + /** * pas_book_report_connection: */ @@ -622,6 +683,7 @@ pas_book_get_epv (void) epv->get_static_capabilities = impl_Evolution_Book_get_static_capabilities; epv->get_cursor = impl_Evolution_Book_get_cursor; epv->get_book_view = impl_Evolution_Book_get_book_view; + epv->get_changes = impl_Evolution_Book_get_changes; return epv; -- cgit v1.2.3