EBook

EBook — The primary Evolution addressbook client object.

Synopsis




EBook*      e_book_new                      (void);
gboolean    e_book_load_uri                 (EBook *book,
                                             const char *uri,
                                             gboolean only_if_exists,
                                             GError **error);
gboolean    e_book_unload_uri               (EBook *book,
                                             GError **error);
gboolean    e_book_remove                   (EBook *book,
                                             GError **error);
gboolean    e_book_load_local_addressbook   (EBook *book,
                                             GError **error);
gboolean    e_book_get_supported_fields     (EBook *book,
                                             GList **fields,
                                             GError **error);
gboolean    e_book_get_supported_auth_methods
                                            (EBook *book,
                                             GList **auth_methods,
                                             GError **error);
gboolean    e_book_authenticate_user        (EBook *book,
                                             const char *user,
                                             const char *passwd,
                                             const char *auth_method,
                                             GError **error);
gboolean    e_book_get_contact              (EBook *book,
                                             const char *id,
                                             EContact **contact,
                                             GError **error);
gboolean    e_book_remove_contact           (EBook *book,
                                             const char *id,
                                             GError **error);
gboolean    e_book_remove_contacts          (EBook *book,
                                             GList *id_list,
                                             GError **error);
gboolean    e_book_add_contact              (EBook *book,
                                             EContact *contact,
                                             GError **error);
gboolean    e_book_commit_contact           (EBook *book,
                                             EContact *contact,
                                             GError **error);
gboolean    e_book_get_book_view            (EBook *book,
                                             EBookQuery *query,
                                             GList *requested_fields,
                                             int max_results,
                                             EBookView **book_view,
                                             GError **error);
gboolean    e_book_get_contacts             (EBook *book,
                                             EBookQuery *query,
                                             GList **contacts,
                                             GError **error);
gboolean    e_book_get_changes              (EBook *book,
                                             char *changeid,
                                             GList **changes,
                                             GError **error);
void        e_book_free_change_list         (GList *change_list);
const char* e_book_get_uri                  (EBook *book);
const char* e_book_get_static_capabilities  (EBook *book,
                                             GError **error);
gboolean    e_book_check_static_capability  (EBook *book,
                                             const char *cap);
gboolean    e_book_is_writable              (EBook *book);
gboolean    e_book_cancel                   (EBook *book,
                                             GError **error);
gboolean    e_book_get_self                 (EContact **contact,
                                             EBook **book,
                                             GError **error);
gboolean    e_book_set_self                 (EBook *book,
                                             EContact *contact,
                                             GError **error);
gboolean    e_book_get_default_addressbook  (EBook **book,
                                             GError **error);
gboolean    e_book_get_addressbooks         (ESourceList **addressbook_sources,
                                             GError **error);


Description

Represents a complete addressbook. Event notifications and callbacks go to the e-book-listener. Contrast with e-book-view, which represents a search of the addressbook.

Details

e_book_new ()

EBook*      e_book_new                      (void);

Returns :

e_book_load_uri ()

gboolean    e_book_load_uri                 (EBook *book,
                                             const char *uri,
                                             gboolean only_if_exists,
                                             GError **error);

book:
uri:
only_if_exists:
error:
Returns :

e_book_unload_uri ()

gboolean    e_book_unload_uri               (EBook *book,
                                             GError **error);

book:
error:
Returns :

e_book_remove ()

gboolean    e_book_remove                   (EBook *book,
                                             GError **error);

book:
error:
Returns :

e_book_load_local_addressbook ()

gboolean    e_book_load_local_addressbook   (EBook *book,
                                             GError **error);

book:
error:
Returns :

e_book_get_supported_fields ()

gboolean    e_book_get_supported_fields     (EBook *book,
                                             GList **fields,
                                             GError **error);

queries book for the list of fields it supports. mostly for use by the contact editor so it knows what fields to sensitize.

book: an EBook
fields: a GList
error:
Returns : a EBookStatus value.

e_book_get_supported_auth_methods ()

gboolean    e_book_get_supported_auth_methods
                                            (EBook *book,
                                             GList **auth_methods,
                                             GError **error);

queries book for the list of authentication methods it supports.

book: an EBook
auth_methods: a GList
error:
Returns : a EBookStatus value.

e_book_authenticate_user ()

gboolean    e_book_authenticate_user        (EBook *book,
                                             const char *user,
                                             const char *passwd,
                                             const char *auth_method,
                                             GError **error);

authenticates user with passwd, using the auth method auth_method. auth_method must be one of the authentication methods returned using e_book_get_supported_auth_methods.

book: an EBook
user: a string
passwd: a string
auth_method: a string
error:
Returns : a EBookStatus value.

e_book_get_contact ()

gboolean    e_book_get_contact              (EBook *book,
                                             const char *id,
                                             EContact **contact,
                                             GError **error);

Fills in contact with the contents of the vcard in book corresponding to id.

book: an EBook
id: a string
contact: an EContact
error:
Returns : a EBookStatus value.

e_book_remove_contact ()

gboolean    e_book_remove_contact           (EBook *book,
                                             const char *id,
                                             GError **error);

Removes the contact with id id from book.

book: an EBook
id: a string
error:
Returns : a EBookStatus value.

e_book_remove_contacts ()

gboolean    e_book_remove_contacts          (EBook *book,
                                             GList *id_list,
                                             GError **error);

Removes the contacts with ids from the list ids from book. This is always more efficient than calling e_book_remove_contact_by_id if you have more than one id to remove, as some backends can implement it as a batch request.

book: an EBook
id_list:
error:
Returns : a EBookStatus value.

e_book_add_contact ()

gboolean    e_book_add_contact              (EBook *book,
                                             EContact *contact,
                                             GError **error);

book:
contact:
error:
Returns :

e_book_commit_contact ()

gboolean    e_book_commit_contact           (EBook *book,
                                             EContact *contact,
                                             GError **error);

applies the changes made to contact to the stored version in book.

book: an EBook
contact: an EContact
error:
Returns : a EBookStatus value.

e_book_get_book_view ()

gboolean    e_book_get_book_view            (EBook *book,
                                             EBookQuery *query,
                                             GList *requested_fields,
                                             int max_results,
                                             EBookView **book_view,
                                             GError **error);

need docs here..

book: an EBook
query: an EBookQuery requested_fields a GList containing the names of fields to return, or NULL for all max_results the maximum number of contacts to show (or 0 for all)
requested_fields:
max_results:
book_view:
error:
Returns : a EBookStatus value.

e_book_get_contacts ()

gboolean    e_book_get_contacts             (EBook *book,
                                             EBookQuery *query,
                                             GList **contacts,
                                             GError **error);

need docs here..

book: an EBook
query: an EBookQuery
contacts:
error:
Returns : a EBookStatus value.

e_book_get_changes ()

gboolean    e_book_get_changes              (EBook *book,
                                             char *changeid,
                                             GList **changes,
                                             GError **error);

book:
changeid:
changes:
error:
Returns :

e_book_free_change_list ()

void        e_book_free_change_list         (GList *change_list);

change_list:

e_book_get_uri ()

const char* e_book_get_uri                  (EBook *book);

book:
Returns :

e_book_get_static_capabilities ()

const char* e_book_get_static_capabilities  (EBook *book,
                                             GError **error);

book:
error:
Returns :

e_book_check_static_capability ()

gboolean    e_book_check_static_capability  (EBook *book,
                                             const char *cap);

book:
cap:
Returns :

e_book_is_writable ()

gboolean    e_book_is_writable              (EBook *book);

book:
Returns :

e_book_cancel ()

gboolean    e_book_cancel                   (EBook *book,
                                             GError **error);

Used to cancel an already running operation on book. This function makes a synchronous CORBA to the backend telling it to cancel the operation. If the operation wasn't cancellable (either transiently or permanently) or had already comopleted on the server side, this function will return E_BOOK_STATUS_COULD_NOT_CANCEL, and the operation will continue uncancelled. If the operation could be cancelled, this function will return E_BOOK_ERROR_OK, and the blocked e_book function corresponding to current operation will return with a status of E_BOOK_STATUS_CANCELLED.

book: an EBook
error:
Returns : a EBookStatus value.

e_book_get_self ()

gboolean    e_book_get_self                 (EContact **contact,
                                             EBook **book,
                                             GError **error);

Gets the address information for the current Evolution user.

contact:
book:
error:
Returns :

e_book_set_self ()

gboolean    e_book_set_self                 (EBook *book,
                                             EContact *contact,
                                             GError **error);

book:
contact:
error:
Returns :

e_book_get_default_addressbook ()

gboolean    e_book_get_default_addressbook  (EBook **book,
                                             GError **error);

book:
error:
Returns :

e_book_get_addressbooks ()

gboolean    e_book_get_addressbooks         (ESourceList **addressbook_sources,
                                             GError **error);

addressbook_sources:
error:
Returns :

See Also

e-book-listener, e-book-view