aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r--addressbook/backend/ebook/e-book.c36
-rw-r--r--addressbook/backend/ebook/e-book.h5
2 files changed, 41 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c
index bb0226eb5a..32103fc9df 100644
--- a/addressbook/backend/ebook/e-book.c
+++ b/addressbook/backend/ebook/e-book.c
@@ -909,6 +909,42 @@ gboolean e_book_get_book_view (EBook *book,
return TRUE;
}
+gboolean e_book_get_changes (EBook *book,
+ gchar *changeid,
+ EBookBookViewCallback cb,
+ gpointer closure)
+{
+ CORBA_Environment ev;
+ EBookViewListener *listener;
+
+ g_return_val_if_fail (book != NULL, FALSE);
+ g_return_val_if_fail (E_IS_BOOK (book), FALSE);
+
+ if (book->priv->load_state != URILoaded) {
+ g_warning ("e_book_get_changes: No URI loaded!\n");
+ return FALSE;
+ }
+
+ listener = e_book_view_listener_new();
+
+ CORBA_exception_init (&ev);
+
+ Evolution_Book_get_changes (book->priv->corba_book, bonobo_object_corba_objref(BONOBO_OBJECT(listener)), changeid, &ev);
+
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_warning ("e_book_changes: Exception "
+ "getting changes!\n");
+ CORBA_exception_free (&ev);
+ return FALSE;
+ }
+
+ CORBA_exception_free (&ev);
+
+ e_book_queue_op (book, cb, closure, listener);
+
+ return TRUE;
+}
+
/**
* e_book_get_name:
*/
diff --git a/addressbook/backend/ebook/e-book.h b/addressbook/backend/ebook/e-book.h
index 29f3787f66..3c3f2bc65b 100644
--- a/addressbook/backend/ebook/e-book.h
+++ b/addressbook/backend/ebook/e-book.h
@@ -107,6 +107,11 @@ gboolean e_book_get_book_view (EBook *book,
EBookBookViewCallback cb,
gpointer closure);
+gboolean e_book_get_changes (EBook *book,
+ char *changeid,
+ EBookBookViewCallback cb,
+ gpointer closure);
+
/* Getting the name of the repository. */
char *e_book_get_name (EBook *book);