EDataServer.Client¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | error_create(code, custom_msg) | 
| class | error_quark() | 
| class | error_to_string(code) | 
| class | util_copy_object_slist(copy_to, objects) | 
| class | util_copy_string_slist(copy_to, strings) | 
| class | util_free_object_slist(objects) | 
| class | util_free_string_slist(strings) | 
| class | util_parse_comma_strings(strings) | 
| class | util_slist_to_strv(strings) | 
| class | util_strv_to_slist(strv) | 
| class | util_unwrap_dbus_error(dbus_error, known_errors, known_errors_count, known_errors_domain, fail_when_none_matched) | 
| cancel_all() | |
| check_capability(capability) | |
| check_refresh_supported() | |
| dup_bus_name() | |
| get_backend_property(prop_name, cancellable, callback, *user_data) | |
| get_backend_property_finish(result) | |
| get_backend_property_sync(prop_name, cancellable) | |
| get_capabilities() | |
| get_source() | |
| is_online() | |
| is_opened() | |
| is_readonly() | |
| open(only_if_exists, cancellable, callback, *user_data) | |
| open_finish(result) | |
| open_sync(only_if_exists, cancellable) | |
| ref_main_context() | |
| refresh(cancellable, callback, *user_data) | |
| refresh_finish(result) | |
| refresh_sync(cancellable) | |
| remove(cancellable, callback, *user_data) | |
| remove_finish(result) | |
| remove_sync(cancellable) | |
| retrieve_capabilities(cancellable, callback, *user_data) | |
| retrieve_capabilities_finish(result) | |
| retrieve_capabilities_sync(cancellable) | |
| retrieve_properties(cancellable, callback, *user_data) | |
| retrieve_properties_finish(result) | |
| retrieve_properties_sync(cancellable) | |
| set_backend_property(prop_name, prop_value, cancellable, callback, *user_data) | |
| set_backend_property_finish(result) | |
| set_backend_property_sync(prop_name, prop_value, cancellable) | |
| set_bus_name(bus_name) | |
| unwrap_dbus_error(dbus_error) | |
| wait_for_connected(timeout_seconds, cancellable, callback, *user_data) | |
| wait_for_connected_finish(result) | |
| wait_for_connected_sync(timeout_seconds, cancellable) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
| do_backend_died() | |
| do_backend_error(error_msg) | |
| do_backend_property_changed(prop_name, prop_value) | |
| do_get_backend_property(prop_name, cancellable, callback, *user_data) | |
| do_get_backend_property_finish(result) | |
| do_get_backend_property_sync(prop_name, cancellable) | |
| do_open(only_if_exists, cancellable, callback, *user_data) | |
| do_open_finish(result) | |
| do_open_sync(only_if_exists, cancellable) | |
| do_opened(error) | |
| do_refresh(cancellable, callback, *user_data) | |
| do_refresh_finish(result) | |
| do_refresh_sync(cancellable) | |
| do_remove(cancellable, callback, *user_data) | |
| do_remove_finish(result) | |
| do_remove_sync(cancellable) | |
| do_retrieve_capabilities(cancellable, callback, *user_data) | |
| do_retrieve_capabilities_finish(result) | |
| do_retrieve_capabilities_sync(cancellable) | |
| do_retrieve_properties_sync(cancellable) | |
| do_set_backend_property(prop_name, prop_value, cancellable, callback, *user_data) | |
| do_set_backend_property_finish(result) | |
| do_set_backend_property_sync(prop_name, prop_value, cancellable) | |
| do_unwrap_dbus_error(dbus_error) | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| capabilities | int | r/en | The capabilities of this client | 
| main-context | GLib.MainContext | r | The main loop context on which to attach event sources | 
| online | bool | r/w/en | Whether this client is online | 
| opened | bool | r | Whether this client is open and ready to use deprecated | 
| readonly | bool | r | Whether this client’s backing data is readonly | 
| source | EDataServer.Source | r/w/co | The EDataServer.Sourcefor which this client was created | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| backend-died | |
| backend-error | |
| backend-property-changed | |
| opened | 
 | 
Class Details¶
- 
class EDataServer.Client(**kwargs)¶
- Bases: - GObject.Object- Abstract: - Yes - Structure: - EDataServer.ClientClass- Contains only private data that should be read and manipulated using the functions below. - New in version 3.2. - 
classmethod error_create(code, custom_msg)¶
- Parameters: - code (EDataServer.ClientError) – anEDataServer.ClientErrorcode to create
- custom_msg (strorNone) – custom message to use for the error; can beNone
 - Returns: - a new - GLib.Errorcontaining an #E_CLIENT_ERROR of the given code. If the custom_msg is- None, then the error message is the one returned from- EDataServer.Client.error_to_string() for the code, otherwise the given message is used. Returned pointer should be freed with- GLib.Error.free().- Return type: - New in version 3.2. 
- code (
 - 
classmethod error_to_string(code)¶
- Parameters: - code ( - EDataServer.ClientError) – an- EDataServer.ClientErrorerror code- Returns: - Localized human readable description of the given error code - Return type: - str- Get localized human readable description of the given error code. - New in version 3.2. 
 - 
classmethod util_copy_object_slist(copy_to, objects)¶
- Parameters: - copy_to ([GObject.Object] orNone) – Where to copy; may beNone
- objects ([GObject.Object]) –GLib.SListofGObject.Objects to be copied
 - Returns: - New head of copy_to. The returned pointer can be freed with - EDataServer.Client.util_free_object_slist().- Return type: - Copies a - GLib.SListof- GObject.Objects to the end of copy_to.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.util_copy_object_slist() instead.
- copy_to ([
 - 
classmethod util_copy_string_slist(copy_to, strings)¶
- Parameters: - copy_to ([str] orNone) – Where to copy; may beNone
- strings ([str]) –GLib.SListof strings to be copied
 - Returns: - New head of copy_to. The returned pointer can be freed with - EDataServer.Client.util_free_string_slist().- Return type: - [ - str]- Copies the - GLib.SListof strings to the end of copy_to.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.util_copy_string_slist() instead.
- copy_to ([
 - 
classmethod util_free_object_slist(objects)¶
- Parameters: - objects ([ - GObject.Object]) – a- GLib.SListof- GObject.Objects- Calls - GObject.Object.unref() on each member of objects and then frees objects itself.- New in version 3.2. - Deprecated since version 3.8: Use g_slist_free_full() instead. 
 - 
classmethod util_free_string_slist(strings)¶
- Parameters: - strings ([ - str]) – a- GLib.SListof strings (- str*)- Frees memory previously allocated by - EDataServer.Client.util_strv_to_slist().- New in version 3.2. - Deprecated since version 3.8: Use g_slist_free_full() instead. 
 - 
classmethod util_parse_comma_strings(strings)¶
- Parameters: - strings ( - str) – string of comma-separated values- Returns: - Newly allocated - GLib.SListof newly allocated strings corresponding to values parsed from strings. Free the returned pointer with- EDataServer.Client.util_free_string_slist().- Return type: - [ - str]- Parses comma-separated list of values into - GLib.SList.- New in version 3.2. 
 - 
classmethod util_slist_to_strv(strings)¶
- Parameters: - strings ([ - str]) – a- GLib.SListof strings (const- str*)- Returns: - Newly allocated - None-terminated array of strings. The returned pointer should be freed with- GLib.strfreev().- Note: Paired function for this is - EDataServer.Client.util_strv_to_slist().- Return type: - [ - str]- Convert a list of strings into a - None-terminated array of strings.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.util_slist_to_strv() instead.
 - 
classmethod util_strv_to_slist(strv)¶
- Parameters: - strv ( - str) – a- None-terminated array of strings (const- str*)- Returns: - Newly allocated - GLib.SListof newly allocated strings. The returned pointer should be freed with- EDataServer.Client.util_free_string_slist().- Note: Paired function for this is - EDataServer.Client.util_slist_to_strv().- Return type: - [ - str]- Convert a - None-terminated array of strings to a list of strings.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.util_strv_to_slist() instead.
 - 
classmethod util_unwrap_dbus_error(dbus_error, known_errors, known_errors_count, known_errors_domain, fail_when_none_matched)¶
- Parameters: - dbus_error (GLib.Error) – DBusGLib.Errorto unwrap
- known_errors (EDataServer.ClientErrorsList) – List of known errors against which try to match
- known_errors_count (int) – How many items are stored in known_errors
- known_errors_domain (int) – Error domain for known_errors
- fail_when_none_matched (bool) – Whether to fail when none of known_errors matches
 - Returns: - Whether was dbus_error processed into client_error. - Note: The dbus_error is automatically freed if returned - True.- client_error: - Resulting - GLib.Error; can be- None- Return type: - ( - bool, client_error:- GLib.Error)- The function takes a dbus_error and tries to find a match in known_errors for it, if it is a G_IO_ERROR, - Gio.IOErrorEnum.DBUS_ERROR. If it is anything else then the dbus_error is moved to client_error.- The fail_when_none_matched influences behaviour. If it’s - True, and none of known_errors matches, or this is not a- Gio.IOErrorEnum.DBUS_ERROR, then- Falseis returned and the client_error is left without change. Otherwise, the fail_when_none_matched is- False, the error is always processed and will result in E_CLIENT_ERROR,- EDataServer.ClientError.OTHER_ERRORif none of known_error matches.- New in version 3.2. - Deprecated since version 3.8: This function is no longer used. 
- dbus_error (
 - 
cancel_all()¶
- Cancels all pending operations started on self. - New in version 3.2. - Deprecated since version 3.8: The function no longer does anything. 
 - 
check_capability(capability)¶
- Parameters: - capability ( - str) – a capability- Returns: - GLib.SListof const strings of capabilities- Return type: - bool- Check if backend supports particular capability. To get all capabilities use - EDataServer.Client.get_capabilities().- New in version 3.2. 
 - 
check_refresh_supported()¶
- Returns: - Trueif the client supports refreshing,- Falseotherwise.- Return type: - bool- Checks whether a client supports explicit refreshing (see - EDataServer.Client.refresh()).- New in version 3.2. 
 - 
dup_bus_name()¶
- Returns: - a newly-allocated string representing a D-Bus bus name that will be used to connect the client to the backend subprocess. The string should be freed by the caller using - GLib.free().- Return type: - str- Returns a D-Bus bus name that will be used to connect the client to the backend subprocess. - New in version 3.16. 
 - 
get_backend_property(prop_name, cancellable, callback, *user_data)¶
- Parameters: - prop_name (str) – property name, whose value to retrieve; cannot beNone
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Queries self’s backend for a property of name prop_name. The call is finished by - EDataServer.Client.get_backend_property_finish() from the callback.- New in version 3.2. 
- prop_name (
 - 
get_backend_property_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- prop_value: - Retrieved backend property value; cannot be - None- Return type: - ( - bool, prop_value:- str)- Finishes previous call of - EDataServer.Client.get_backend_property().- New in version 3.2. 
 - 
get_backend_property_sync(prop_name, cancellable)¶
- Parameters: - prop_name (str) – property name, whose value to retrieve; cannot beNone
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
 - Raises: - Returns: - Trueif successful,- Falseotherwise.- prop_value: - Retrieved backend property value; cannot be - None- Return type: - Queries self’s backend for a property of name prop_name. - New in version 3.2. 
- prop_name (
 - 
get_capabilities()¶
- Returns: - GLib.SListof const strings of capabilities- Return type: - [ - str]- Get list of strings with capabilities advertised by a backend. This list, together with inner strings, is owned by the self. To check for individual capabilities use - EDataServer.Client.check_capability().- New in version 3.2. 
 - 
get_source()¶
- Returns: - The source. - Return type: - EDataServer.Source- Get the - EDataServer.Sourcethat this client has assigned.- New in version 3.2. 
 - 
is_online()¶
- Returns: - Trueif this self is connected, otherwise- False.- Return type: - bool- Check if this self is connected. - New in version 3.2. 
 - 
is_opened()¶
- Returns: - always - True- Return type: - bool- Check if this self is fully opened. This includes everything from - EDataServer.Client.open() call up to the authentication, if required by a backend. Client cannot do any other operation during the opening phase except of authenticate or cancel it. Every other operation results in an- EDataServer.ClientError.BUSYerror.- New in version 3.2. - Deprecated since version 3.8: Clients don’t need to care if they’re fully opened anymore. This function always returns - True.
 - 
is_readonly()¶
- Returns: - Trueif this self is read-only, otherwise- False.- Return type: - bool- Check if this self is read-only. - New in version 3.2. 
 - 
open(only_if_exists, cancellable, callback, *user_data)¶
- Parameters: - only_if_exists (bool) – this parameter is not used anymore
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Opens the self, making it ready for queries and other operations. The call is finished by - EDataServer.Client.open_finish() from the callback.- New in version 3.2. - Deprecated since version 3.8: Use e_book_client_connect() and e_book_client_connect_finish() or e_cal_client_connect() and e_cal_client_connect_finish() instead. 
- only_if_exists (
 - 
open_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Finishes previous call of - EDataServer.Client.open().- New in version 3.2. - Deprecated since version 3.8: Use e_book_client_connect() and e_book_client_connect_finish() or e_cal_client_connect() and e_cal_client_connect_finish() instead. 
 - 
open_sync(only_if_exists, cancellable)¶
- Parameters: - only_if_exists (bool) – this parameter is not used anymore
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
 - Raises: - Returns: - Return type: - Opens the self, making it ready for queries and other operations. - New in version 3.2. - Deprecated since version 3.8: Use e_book_client_connect_sync() or e_cal_client_connect_sync() instead. 
- only_if_exists (
 - 
ref_main_context()¶
- Returns: - a - GLib.MainContext- Return type: - GLib.MainContext- Returns the - GLib.MainContexton which event sources for self are to be attached.- The returned - GLib.MainContextis referenced for thread-safety and must be unreferenced with- GLib.MainContext.unref() when finished with it.- New in version 3.8. 
 - 
refresh(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Initiates refresh on the self. Finishing the method doesn’t mean that the refresh is done, backend only notifies whether it started refreshing or not. Use - EDataServer.Client.check_refresh_supported() to check whether the backend supports this method. The call is finished by- EDataServer.Client.refresh_finish() from the callback.- New in version 3.2. 
- cancellable (
 - 
refresh_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Finishes previous call of - EDataServer.Client.refresh().- New in version 3.2. 
 - 
refresh_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – a- Gio.Cancellable; can be- None- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Initiates refresh on the self. Finishing the method doesn’t mean that the refresh is done, backend only notifies whether it started refreshing or not. Use - EDataServer.Client.check_refresh_supported() to check whether the backend supports this method.- New in version 3.2. 
 - 
remove(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Removes the backing data for this - EDataServer.Client. For example, with the file backend this deletes the database file. You cannot get it back! The call is finished by- EDataServer.Client.remove_finish() from the callback.- New in version 3.2. - Deprecated since version 3.6: Use - EDataServer.Source.remove() instead.
- cancellable (
 - 
remove_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Finishes previous call of - EDataServer.Client.remove().- New in version 3.2. - Deprecated since version 3.6: Use - EDataServer.Source.remove_finish() instead.
 - 
remove_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – a- Gio.Cancellable; can be- None- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Removes the backing data for this - EDataServer.Client. For example, with the file backend this deletes the database file. You cannot get it back!- New in version 3.2. - Deprecated since version 3.6: Use - EDataServer.Source.remove_sync() instead.
 - 
retrieve_capabilities(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Initiates retrieval of capabilities on the self. This is usually required only once, after the self is opened. The returned value is cached and any subsequent call of - EDataServer.Client.get_capabilities() and- EDataServer.Client.check_capability() is using the cached value. The call is finished by- EDataServer.Client.retrieve_capabilities_finish() from the callback.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.Client.get_capabilities() instead.
- cancellable (
 - 
retrieve_capabilities_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- capabilities: - Comma-separated list of capabilities of the self - Return type: - ( - bool, capabilities:- str)- Finishes previous call of - EDataServer.Client.retrieve_capabilities(). Returned value of capabilities should be freed with- GLib.free(), when no longer needed.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.Client.get_capabilities() instead.
 - 
retrieve_capabilities_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – a- Gio.Cancellable; can be- None- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- capabilities: - Comma-separated list of capabilities of the self - Return type: - ( - bool, capabilities:- str)- Initiates retrieval of capabilities on the self. This is usually required only once, after the self is opened. The returned value is cached and any subsequent call of - EDataServer.Client.get_capabilities() and- EDataServer.Client.check_capability() is using the cached value. Returned value of capabilities should be freed with- GLib.free(), when no longer needed.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.Client.get_capabilities() instead.
 - 
retrieve_properties(cancellable, callback, *user_data)¶
- Parameters: - cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously retrieves self properties to match server-side values, without waiting for the D-Bus property change notifications delivery. - When the operation is finished, callback will be called. You can then call - EDataServer.Client.retrieve_properties_finish() to get the result of the operation.- New in version 3.16. 
- cancellable (
 - 
retrieve_properties_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon error- Return type: - bool- Finishes the operation started with - EDataServer.Client.retrieve_properties().- If an error occurs, the function sets error and returns - False.- New in version 3.16. 
 - 
retrieve_properties_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Raises: - GLib.Error- Returns: - Trueon success,- Falseon error- Return type: - bool- Retrieves self properties to match server-side values, without waiting for the D-Bus property change notifications delivery. - If an error occurs, the function sets error and returns - False.- New in version 3.16. 
 - 
set_backend_property(prop_name, prop_value, cancellable, callback, *user_data)¶
- Parameters: - prop_name (str) – property name, whose value to change; cannot beNone
- prop_value (str) – property value, to set; cannot beNone
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Sets self’s backend property of name prop_name to value prop_value. The call is finished by - EDataServer.Client.set_backend_property_finish() from the callback.- New in version 3.2. - Deprecated since version 3.8: Clients cannot set backend properties. Any attempt will fail with an - EDataServer.ClientError.NOT_SUPPORTEDerror.
- prop_name (
 - 
set_backend_property_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Finishes previous call of - EDataServer.Client.set_backend_property().- New in version 3.2. - Deprecated since version 3.8: Clients cannot set backend properties. Any attempt will fail with an - EDataServer.ClientError.NOT_SUPPORTEDerror.
 - 
set_backend_property_sync(prop_name, prop_value, cancellable)¶
- Parameters: - prop_name (str) – property name, whose value to change; cannot beNone
- prop_value (str) – property value, to set; cannot beNone
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
 - Raises: - Returns: - Return type: - Sets self’s backend property of name prop_name to value prop_value. - New in version 3.2. - Deprecated since version 3.8: Clients cannot set backend properties. Any attempt will fail with an - EDataServer.ClientError.NOT_SUPPORTEDerror.
- prop_name (
 - 
set_bus_name(bus_name)¶
- Parameters: - bus_name ( - str) – a string representing a D-Bus bus name- Sets a D-Bus bus name that will be used to connect the client to the backend subprocess. - New in version 3.16. 
 - 
unwrap_dbus_error(dbus_error)¶
- Parameters: - dbus_error ( - GLib.Error) – a- GLib.Errorreturned bu D-Bus- Raises: - GLib.Error- Unwraps D-Bus error to local error. dbus_error is automatically freed. dbus_erorr and out_error can point to the same variable. - New in version 3.2. - Deprecated since version 3.8: Use - Gio.DBusError.strip_remote_error() instead.
 - 
wait_for_connected(timeout_seconds, cancellable, callback, *user_data)¶
- Parameters: - timeout_seconds (int) – a timeout for the wait, in seconds
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; orNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Asynchronously waits until the self is connected (according to ESource - ::connection-statusproperty), but not longer than timeout_seconds.- The call is finished by - EDataServer.Client.wait_for_connected_finish() from the callback.- New in version 3.16. 
- timeout_seconds (
 - 
wait_for_connected_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Finishes previous call of - EDataServer.Client.wait_for_connected().- New in version 3.16. 
 - 
wait_for_connected_sync(timeout_seconds, cancellable)¶
- Parameters: - timeout_seconds (int) – a timeout for the wait, in seconds
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; orNone
 - Raises: - Returns: - Return type: - Synchronously waits until the self is connected (according to ESource - ::connection-statusproperty), but not longer than timeout_seconds.- Note: This also calls - EDataServer.Client.retrieve_properties_sync() on success, to have up-to-date property values on the client side, without a delay due to property change notifcations delivery through D-Bus.- New in version 3.16. 
- timeout_seconds (
 - 
do_backend_died() virtual¶
 - 
do_backend_property_changed(prop_name, prop_value) virtual¶
- Parameters: 
 - 
do_get_backend_property(prop_name, cancellable, callback, *user_data) virtual¶
- Parameters: - prop_name (str) – property name, whose value to retrieve; cannot beNone
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Queries client’s backend for a property of name prop_name. The call is finished by - EDataServer.Client.get_backend_property_finish() from the callback.- New in version 3.2. 
- prop_name (
 - 
do_get_backend_property_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Returns: - Trueif successful,- Falseotherwise.- prop_value: - Retrieved backend property value; cannot be - None- Return type: - ( - bool, prop_value:- str)- Finishes previous call of - EDataServer.Client.get_backend_property().- New in version 3.2. 
 - 
do_get_backend_property_sync(prop_name, cancellable) virtual¶
- Parameters: - prop_name (str) – property name, whose value to retrieve; cannot beNone
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
 - Returns: - Trueif successful,- Falseotherwise.- prop_value: - Retrieved backend property value; cannot be - None- Return type: - Queries client’s backend for a property of name prop_name. - New in version 3.2. 
- prop_name (
 - 
do_open(only_if_exists, cancellable, callback, *user_data) virtual¶
- Parameters: - only_if_exists (bool) – this parameter is not used anymore
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Opens the client, making it ready for queries and other operations. The call is finished by - EDataServer.Client.open_finish() from the callback.- New in version 3.2. - Deprecated since version 3.8: Use e_book_client_connect() and e_book_client_connect_finish() or e_cal_client_connect() and e_cal_client_connect_finish() instead. 
- only_if_exists (
 - 
do_open_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Finishes previous call of - EDataServer.Client.open().- New in version 3.2. - Deprecated since version 3.8: Use e_book_client_connect() and e_book_client_connect_finish() or e_cal_client_connect() and e_cal_client_connect_finish() instead. 
 - 
do_open_sync(only_if_exists, cancellable) virtual¶
- Parameters: - only_if_exists (bool) – this parameter is not used anymore
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
 - Returns: - Return type: - Opens the client, making it ready for queries and other operations. - New in version 3.2. - Deprecated since version 3.8: Use e_book_client_connect_sync() or e_cal_client_connect_sync() instead. 
- only_if_exists (
 - 
do_opened(error) virtual¶
- Parameters: - error ( - GLib.Error) –
 - 
do_refresh(cancellable, callback, *user_data) virtual¶
- Parameters: - cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Initiates refresh on the client. Finishing the method doesn’t mean that the refresh is done, backend only notifies whether it started refreshing or not. Use - EDataServer.Client.check_refresh_supported() to check whether the backend supports this method. The call is finished by- EDataServer.Client.refresh_finish() from the callback.- New in version 3.2. 
- cancellable (
 - 
do_refresh_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Finishes previous call of - EDataServer.Client.refresh().- New in version 3.2. 
 - 
do_refresh_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – a- Gio.Cancellable; can be- None- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Initiates refresh on the client. Finishing the method doesn’t mean that the refresh is done, backend only notifies whether it started refreshing or not. Use - EDataServer.Client.check_refresh_supported() to check whether the backend supports this method.- New in version 3.2. 
 - 
do_remove(cancellable, callback, *user_data) virtual¶
- Parameters: - cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Removes the backing data for this - EDataServer.Client. For example, with the file backend this deletes the database file. You cannot get it back! The call is finished by- EDataServer.Client.remove_finish() from the callback.- New in version 3.2. - Deprecated since version 3.6: Use - EDataServer.Source.remove() instead.
- cancellable (
 - 
do_remove_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Finishes previous call of - EDataServer.Client.remove().- New in version 3.2. - Deprecated since version 3.6: Use - EDataServer.Source.remove_finish() instead.
 - 
do_remove_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – a- Gio.Cancellable; can be- None- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Removes the backing data for this - EDataServer.Client. For example, with the file backend this deletes the database file. You cannot get it back!- New in version 3.2. - Deprecated since version 3.6: Use - EDataServer.Source.remove_sync() instead.
 - 
do_retrieve_capabilities(cancellable, callback, *user_data) virtual¶
- Parameters: - cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Initiates retrieval of capabilities on the client. This is usually required only once, after the client is opened. The returned value is cached and any subsequent call of - EDataServer.Client.get_capabilities() and- EDataServer.Client.check_capability() is using the cached value. The call is finished by- EDataServer.Client.retrieve_capabilities_finish() from the callback.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.Client.get_capabilities() instead.
- cancellable (
 - 
do_retrieve_capabilities_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Returns: - Trueif successful,- Falseotherwise.- capabilities: - Comma-separated list of capabilities of the client - Return type: - ( - bool, capabilities:- str)- Finishes previous call of - EDataServer.Client.retrieve_capabilities(). Returned value of capabilities should be freed with- GLib.free(), when no longer needed.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.Client.get_capabilities() instead.
 - 
do_retrieve_capabilities_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – a- Gio.Cancellable; can be- None- Returns: - Trueif successful,- Falseotherwise.- capabilities: - Comma-separated list of capabilities of the client - Return type: - ( - bool, capabilities:- str)- Initiates retrieval of capabilities on the client. This is usually required only once, after the client is opened. The returned value is cached and any subsequent call of - EDataServer.Client.get_capabilities() and- EDataServer.Client.check_capability() is using the cached value. Returned value of capabilities should be freed with- GLib.free(), when no longer needed.- New in version 3.2. - Deprecated since version 3.8: Use - EDataServer.Client.get_capabilities() instead.
 - 
do_retrieve_properties_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Returns: - Trueon success,- Falseon error- Return type: - bool- Retrieves client properties to match server-side values, without waiting for the D-Bus property change notifications delivery. - If an error occurs, the function sets error and returns - False.- New in version 3.16. 
 - 
do_set_backend_property(prop_name, prop_value, cancellable, callback, *user_data) virtual¶
- Parameters: - prop_name (str) – property name, whose value to change; cannot beNone
- prop_value (str) – property value, to set; cannot beNone
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
- callback (Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
- user_data (objectorNone) – user data for the callback
 - Sets client’s backend property of name prop_name to value prop_value. The call is finished by - EDataServer.Client.set_backend_property_finish() from the callback.- New in version 3.2. - Deprecated since version 3.8: Clients cannot set backend properties. Any attempt will fail with an - EDataServer.ClientError.NOT_SUPPORTEDerror.
- prop_name (
 - 
do_set_backend_property_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Returns: - Trueif successful,- Falseotherwise.- Return type: - bool- Finishes previous call of - EDataServer.Client.set_backend_property().- New in version 3.2. - Deprecated since version 3.8: Clients cannot set backend properties. Any attempt will fail with an - EDataServer.ClientError.NOT_SUPPORTEDerror.
 - 
do_set_backend_property_sync(prop_name, prop_value, cancellable) virtual¶
- Parameters: - prop_name (str) – property name, whose value to change; cannot beNone
- prop_value (str) – property value, to set; cannot beNone
- cancellable (Gio.CancellableorNone) – aGio.Cancellable; can beNone
 - Returns: - Return type: - Sets client’s backend property of name prop_name to value prop_value. - New in version 3.2. - Deprecated since version 3.8: Clients cannot set backend properties. Any attempt will fail with an - EDataServer.ClientError.NOT_SUPPORTEDerror.
- prop_name (
 - 
do_unwrap_dbus_error(dbus_error) virtual¶
- Parameters: - dbus_error ( - GLib.Error) – a- GLib.Errorreturned bu D-Bus- Unwraps D-Bus error to local error. dbus_error is automatically freed. dbus_erorr and out_error can point to the same variable. - New in version 3.2. - Deprecated since version 3.8: Use - Gio.DBusError.strip_remote_error() instead.
 
- 
classmethod 
Signal Details¶
- 
EDataServer.Client.signals.backend_died(client)¶
- Signal Name: - backend-died- Flags: - RUN_LAST- Parameters: - client ( - EDataServer.Client) – The object which received the signal
- 
EDataServer.Client.signals.backend_error(client, object)¶
- Signal Name: - backend-error- Flags: - Parameters: - client (EDataServer.Client) – The object which received the signal
- object (str) –
 
- client (
- 
EDataServer.Client.signals.backend_property_changed(client, object, p0)¶
- Signal Name: - backend-property-changed- Flags: - Parameters: - client (EDataServer.Client) – The object which received the signal
- object (str) –
- p0 (str) –
 
- client (
- 
EDataServer.Client.signals.opened(client, object)¶
- Signal Name: - opened- Flags: - Parameters: - client (EDataServer.Client) – The object which received the signal
- object (GLib.Error) –
 - Deprecated since version ???. 
- client (
Property Details¶
- 
EDataServer.Client.props.capabilities¶
- Name: - capabilities- Type: - int- Default Value: - None- Flags: - READABLE,- EXPLICIT_NOTIFY- The capabilities of this client 
- 
EDataServer.Client.props.main_context¶
- Name: - main-context- Type: - GLib.MainContext- Default Value: - None- Flags: - READABLE- The main loop context in which notifications for this client will be delivered. 
- 
EDataServer.Client.props.online¶
- Name: - online- Type: - bool- Default Value: - False- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY- Whether this client’s backing data is online. 
- 
EDataServer.Client.props.opened¶
- Name: - opened- Type: - bool- Default Value: - False- Flags: - READABLE- Whether this client is open and ready to use. - Deprecated since version 3.8: This property is no longer relevant and will always be - Trueafter successfully creating any concrete type of- EDataServer.Client.
- 
EDataServer.Client.props.readonly¶
- Name: - readonly- Type: - bool- Default Value: - False- Flags: - READABLE- Whether this client’s backing data is readonly. 
- 
EDataServer.Client.props.source¶
- Name: - source- Type: - EDataServer.Source- Default Value: - None- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- The - EDataServer.Sourcefor which this client was created.