EBook.BookClient
Description: Reference for EBook.BookClient

### Class

# EBookBookClient

since: 3.2

#### Description [src]

    class EBook.BookClient : EDataServer.Client
      implements Gio.AsyncInitable, Gio.Initable {
      /* No available fields */
    }

Contains only private data that should be read and manipulated using the functions below.

Available since: 3.2

#### Hierarchy

#### Ancestors

- EClient
- GObject

#### Implements

- GAsyncInitable
- GInitable

#### Constructors

###### e_book_client_new

Creates a new `EBookClient` corresponding to the given source. There are only two operations that are valid on this book at this point: e_client_open(), and e_client_remove().

deprecated: 3.8 since: 3.2

#### Functions

###### e_book_client_connect

Asynchronously creates a new `EBookClient` for `source`.

since: 3.8

###### e_book_client_connect_direct

Like e_book_client_connect(), except creates the book client for direct read access to the underlying addressbook.

since: 3.12

###### e_book_client_connect_direct_finish

Finishes the operation started with e_book_client_connect_direct(). If an error occurs in connecting to the D-Bus service, the function sets `error` and returns `NULL`.

since: 3.12

###### e_book_client_connect_direct_sync

Like e_book_client_connect_sync(), except creates the book client for direct read access to the underlying addressbook.

since: 3.8

###### e_book_client_connect_finish

Finishes the operation started with e_book_client_connect(). If an error occurs in connecting to the D-Bus service, the function sets `error` and returns `NULL`.

since: 3.8

###### e_book_client_connect_sync

Creates a new `EBookClient` for `source`. If an error occurs, the function will set `error` and return `FALSE`.

since: 3.8

###### e_book_client_get_self

Get the `EContact` referring to the user of the address book and set it in `out_contact` and `out_client`.

since: 3.2

###### e_book_client_is_self

Check if `contact` is the user of the address book.

since: 3.2

#### Instance methods

###### e_book_client_add_contact

Adds `contact` to `client`. The call is finished by `e_book_client_add_contact_finish()` from the `callback`.

since: 3.2

###### e_book_client_add_contact_finish

Finishes previous call of `e_book_client_add_contact()` and sets `out_added_uid` to a UID of a newly added contact. This string should be freed with g_free().

since: 3.2

###### e_book_client_add_contact_sync

Adds `contact` to `client` and sets `out_added_uid` to a UID of a newly added contact. This string should be freed with g_free().

since: 3.2

###### e_book_client_add_contacts

Adds `contacts` to `client`. The call is finished by `e_book_client_add_contacts_finish()` from the `callback`.

since: 3.4

###### e_book_client_add_contacts_finish

Finishes previous call of `e_book_client_add_contacts()` and sets `out_added_uids` to the UIDs of newly added contacts if successful. This `GSList` should be freed with e_client_util_free_string_slist().

since: 3.4

###### e_book_client_add_contacts_sync

Adds `contacts` to `client` and sets `out_added_uids` to the UIDs of newly added contacts if successful. This `GSList` should be freed with e_client_util_free_string_slist().

since: 3.4

###### e_book_client_contains_email

Asynchronously checks whether contains an `email_address`. When the `email_address` contains multiple addresses, then returns `TRUE` when at least one address exists in the address book.

since: 3.44

###### e_book_client_contains_email_finish

Finishes previous call of e_book_client_contains_email().

since: 3.44

###### e_book_client_contains_email_sync

No description available.

###### e_book_client_get_contact

Receive `EContact` from the `client` for the given `uid`. The call is finished by `e_book_client_get_contact_finish()` from the `callback`.

since: 3.2

###### e_book_client_get_contact_finish

Finishes previous call of e_book_client_get_contact(). If successful, then the `out_contact` is set to newly allocated `EContact`, which should be freed with g_object_unref().

since: 3.2

###### e_book_client_get_contact_sync

Receive `EContact` from the `client` for the gived `uid`. If successful, then the `out_contact` is set to newly allocated `EContact`, which should be freed with g_object_unref().

since: 3.2

###### e_book_client_get_contacts

Query `client` with `sexp`, receiving a list of contacts which matched. The call is finished by `e_book_client_get_contacts_finish()` from the `callback`.

since: 3.2

###### e_book_client_get_contacts_finish

Finishes previous call of e_book_client_get_contacts(). If successful, then the `out_contacts` is set to newly allocated list of `EContact`(s), which should be freed with e_client_util_free_object_slist().

since: 3.2

###### e_book_client_get_contacts_sync

Query `client` with `sexp`, receiving a list of contacts which matched. If successful, then the `out_contacts` is set to newly allocated `GSList` of `EContact`(s), which should be freed with e_client_util_free_object_slist().

since: 3.2

###### e_book_client_get_contacts_uids

Query `client` with `sexp`, receiving a list of contacts UIDs which matched. The call is finished by `e_book_client_get_contacts_uids_finish()` from the `callback`.

since: 3.2

###### e_book_client_get_contacts_uids_finish

Finishes previous call of e_book_client_get_contacts_uids(). If successful, then the `out_contact_uids` is set to newly allocated list of UID strings, which should be freed with e_client_util_free_string_slist().

since: 3.2

###### e_book_client_get_contacts_uids_sync

Query `client` with `sexp`, receiving a list of contacts UIDs which matched. If successful, then the `out_contact_uids` is set to newly allocated list of UID strings, which should be freed with e_client_util_free_string_slist().

since: 3.2

###### e_book_client_get_cursor

Create an `EBookClientCursor`. The call is finished by `e_book_client_get_cursor_finish()` from the `callback`.

since: 3.12

###### e_book_client_get_cursor_finish

Finishes previous call of e_book_client_get_cursor(). If successful, then the `out_cursor` is set to newly create `EBookClientCursor`, the cursor should be freed with `g_object_unref()` when no longer needed.

since: 3.12

###### e_book_client_get_cursor_sync

Create an `EBookClientCursor`. If successful, then the `out_cursor` is set to newly allocated `EBookClientCursor`, the cursor should be freed with `g_object_unref()` when no longer needed.

since: 3.12

###### e_book_client_get_locale

Reports the locale in use for `client`. The addressbook might sort contacts in different orders, or store and compare phone numbers in different ways depending on the currently set locale.

since: 3.12

###### e_book_client_get_prefer_vcard_version

Gets a preferred vCard version by the `client` backend. When not known, the latest supported vCard version is returned.

since: 3.60

###### e_book_client_get_view

Query `client` with `sexp`, creating an `EBookClientView`. The call is finished by `e_book_client_get_view_finish()` from the `callback`.

since: 3.2

###### e_book_client_get_view_finish

Finishes previous call of e_book_client_get_view(). If successful, then the `out_view` is set to newly allocated `EBookClientView`, which should be freed with g_object_unref().

since: 3.2

###### e_book_client_get_view_sync

Query `client` with `sexp`, creating an `EBookClientView`. If successful, then the `out_view` is set to newly allocated `EBookClientView`, which should be freed with g_object_unref().

since: 3.2

###### e_book_client_modify_contact

Applies the changes made to `contact` to the stored version in `client`. The call is finished by `e_book_client_modify_contact_finish()` from the `callback`.

since: 3.2

###### e_book_client_modify_contact_finish

Finishes previous call of e_book_client_modify_contact().

since: 3.2

###### e_book_client_modify_contact_sync

Applies the changes made to `contact` to the stored version in `client`.

since: 3.2

###### e_book_client_modify_contacts

Applies the changes made to `contacts` to the stored versions in `client`. The call is finished by `e_book_client_modify_contacts_finish()` from the `callback`.

since: 3.4

###### e_book_client_modify_contacts_finish

Finishes previous call of e_book_client_modify_contacts().

since: 3.4

###### e_book_client_modify_contacts_sync

Applies the changes made to `contacts` to the stored versions in `client`.

since: 3.4

###### e_book_client_remove_contact

Removes `contact` from the `client`. The call is finished by `e_book_client_remove_contact_finish()` from the `callback`.

since: 3.2

###### e_book_client_remove_contact_by_uid

Removes contact with `uid` from the `client`. The call is finished by `e_book_client_remove_contact_by_uid_finish()` from the `callback`.

since: 3.2

###### e_book_client_remove_contact_by_uid_finish

Finishes previous call of e_book_client_remove_contact_by_uid().

since: 3.2

###### e_book_client_remove_contact_by_uid_sync

Removes contact with `uid` from the `client`.

since: 3.2

###### e_book_client_remove_contact_finish

Finishes previous call of e_book_client_remove_contact().

since: 3.2

###### e_book_client_remove_contact_sync

Removes `contact` from the `client`.

since: 3.2

###### e_book_client_remove_contacts

Removes the contacts with uids from the list `uids` from `client`. This is always more efficient than calling `e_book_client_remove_contact()` if you have more than one uid to remove, as some backends can implement it as a batch request. The call is finished by `e_book_client_remove_contacts_finish()` from the `callback`.

since: 3.2

###### e_book_client_remove_contacts_finish

Finishes previous call of e_book_client_remove_contacts().

since: 3.2

###### e_book_client_remove_contacts_sync

Removes the contacts with uids from the list `uids` from `client`. This is always more efficient than calling `e_book_client_remove_contact()` if you have more than one uid to remove, as some backends can implement it as a batch request.

since: 3.2

###### e_book_client_set_self

Specify that `contact` residing in `client` is the `EContact` that refers to the user of the address book.

since: 3.2

##### Methods inherited from EClient (36)

Please see EClient for a full list of methods.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GAsyncInitable (3)

###### g_async_initable_init_async

Starts asynchronous initialization of the object implementing the interface. This must be done before any real use of the object after initial construction. If the object also implements `GInitable` you can optionally call `g_initable_init()` instead.

###### g_async_initable_init_finish

Finishes asynchronous initialization and returns the result. See g_async_initable_init_async().

###### g_async_initable_new_finish

Finishes the async construction for the various g_async_initable_new calls, returning the created object or `NULL` on error.

##### Methods inherited from GInitable (1)

###### g_initable_init

Initializes the object implementing the interface.

#### Properties

###### EBook.BookClient:locale

The currently active locale for this addressbook.

since: 3.12

##### Properties inherited from EClient (6)

###### EDataServer.Client:capabilities

The capabilities of this client.

###### EDataServer.Client:main-context

The main loop context in which notifications for this client will be delivered.

###### EDataServer.Client:online

Whether this client’s backing data is online.

###### EDataServer.Client:opened

Whether this client is open and ready to use.

###### EDataServer.Client:readonly

Whether this client’s backing data is readonly.

###### EDataServer.Client:source

The `ESource` for which this client was created.

#### Signals

##### Signals inherited from EClient (4)

###### EClient::backend-died

No description available.

###### EClient::backend-error

No description available.

###### EClient::backend-property-changed

No description available.

###### EClient::opened

No description available.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct EBookBookClientClass {
      /* no available fields */
    }

Class structure for the `EBookClient` class.