diff options
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r-- | addressbook/backend/ebook/e-book.c | 31 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-book.h | 92 |
2 files changed, 77 insertions, 46 deletions
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c index 2023f1bf83..bb0226eb5a 100644 --- a/addressbook/backend/ebook/e-book.c +++ b/addressbook/backend/ebook/e-book.c @@ -435,6 +435,37 @@ e_book_unload_uri (EBook *book) book->priv->load_state = URINotLoaded; } +char * +e_book_get_static_capabilities (EBook *book) +{ + CORBA_Environment ev; + char *temp; + char *ret_val; + + CORBA_exception_init (&ev); + + if (book->priv->load_state != URILoaded) { + g_warning ("e_book_unload_uri: No URI is loaded!\n"); + return g_strdup(""); + } + + temp = Evolution_Book_get_static_capabilities(book->priv->corba_book, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) { + g_warning ("e_book_get_static_capabilities: Exception " + "during get_static_capabilities!\n"); + CORBA_exception_free (&ev); + return NULL; + } + + ret_val = g_strdup(temp); + CORBA_free(temp); + + CORBA_exception_free (&ev); + + return ret_val; +} + static gboolean e_book_construct (EBook *book) { diff --git a/addressbook/backend/ebook/e-book.h b/addressbook/backend/ebook/e-book.h index a57c7263b3..29f3787f66 100644 --- a/addressbook/backend/ebook/e-book.h +++ b/addressbook/backend/ebook/e-book.h @@ -51,66 +51,66 @@ typedef void (*EBookBookViewCallback) (EBook *book, EBookStatus status, EBookVie /* Creating a new addressbook. */ -EBook *e_book_new (void); -gboolean e_book_load_uri (EBook *book, - const char *uri, - EBookCallback open_response, - gpointer closure); -void e_book_unload_uri (EBook *book); +EBook *e_book_new (void); +gboolean e_book_load_uri (EBook *book, + const char *uri, + EBookCallback open_response, + gpointer closure); +void e_book_unload_uri (EBook *book); +char *e_book_get_static_capabilities (EBook *book); /* Fetching cards. */ -ECard *e_book_get_card (EBook *book, - const char *id); -char *e_book_get_vcard (EBook *book, - const char *id); +ECard *e_book_get_card (EBook *book, + const char *id); +char *e_book_get_vcard (EBook *book, + const char *id); /* Deleting cards. */ -gboolean e_book_remove_card (EBook *book, - ECard *card, - EBookCallback cb, - gpointer closure); -gboolean e_book_remove_card_by_id (EBook *book, - const char *id, - EBookCallback cb, - gpointer closure); +gboolean e_book_remove_card (EBook *book, + ECard *card, + EBookCallback cb, + gpointer closure); +gboolean e_book_remove_card_by_id (EBook *book, + const char *id, + EBookCallback cb, + gpointer closure); /* Adding cards. */ -gboolean e_book_add_card (EBook *book, - ECard *card, - EBookIdCallback cb, - gpointer closure); -gboolean e_book_add_vcard (EBook *book, - const char *vcard, - EBookIdCallback cb, - gpointer closure); +gboolean e_book_add_card (EBook *book, + ECard *card, + EBookIdCallback cb, + gpointer closure); +gboolean e_book_add_vcard (EBook *book, + const char *vcard, + EBookIdCallback cb, + gpointer closure); /* Modifying cards. */ -gboolean e_book_commit_card (EBook *book, - ECard *card, - EBookCallback cb, - gpointer closure); -gboolean e_book_commit_vcard (EBook *book, - const char *vcard, - EBookCallback cb, - gpointer closure); +gboolean e_book_commit_card (EBook *book, + ECard *card, + EBookCallback cb, + gpointer closure); +gboolean e_book_commit_vcard (EBook *book, + const char *vcard, + EBookCallback cb, + gpointer closure); /* Checking to see if we're connected to the card repository. */ -gboolean e_book_check_connection (EBook *book); +gboolean e_book_check_connection (EBook *book); +gboolean e_book_get_cursor (EBook *book, + char *query, + EBookCursorCallback cb, + gpointer closure); -gboolean e_book_get_cursor (EBook *book, - char *query, - EBookCursorCallback cb, - gpointer closure); - -gboolean e_book_get_book_view (EBook *book, - char *query, - EBookBookViewCallback cb, - gpointer closure); +gboolean e_book_get_book_view (EBook *book, + char *query, + EBookBookViewCallback cb, + gpointer closure); /* Getting the name of the repository. */ -char *e_book_get_name (EBook *book); +char *e_book_get_name (EBook *book); -GtkType e_book_get_type (void); +GtkType e_book_get_type (void); #define E_BOOK_TYPE (e_book_get_type ()) #define E_BOOK(o) (GTK_CHECK_CAST ((o), E_BOOK_TYPE, EBook)) |