EDataServer.Client

g EDataServer.Client EDataServer.Client GObject.Object GObject.Object GObject.Object->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.Source for which this client was created

Signals

Inherited:GObject.Object (1)
Name Short Description
backend-died  
backend-error  
backend-property-changed  
opened
deprecated

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent GObject.Object r  

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:
Returns:

a new GLib.Error containing 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:

GLib.Error

New in version 3.2.

classmethod error_quark()
Return type:int
classmethod error_to_string(code)
Parameters:code (EDataServer.ClientError) – an EDataServer.ClientError error 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:
Returns:

New head of copy_to. The returned pointer can be freed with EDataServer.Client.util_free_object_slist().

Return type:

[GObject.Object]

Copies a GLib.SList of GObject.Object s to the end of copy_to.

New in version 3.2.

Deprecated since version 3.8: Use EDataServer.util_copy_object_slist() instead.

classmethod util_copy_string_slist(copy_to, strings)
Parameters:
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.SList of strings to the end of copy_to.

New in version 3.2.

Deprecated since version 3.8: Use EDataServer.util_copy_string_slist() instead.

classmethod util_free_object_slist(objects)
Parameters:objects ([GObject.Object]) – a GLib.SList of GObject.Object s

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.SList of 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.SList of 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.SList of 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.SList of 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) – DBus GLib.Error to 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 False is 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_ERROR if none of known_error matches.

New in version 3.2.

Deprecated since version 3.8: This function is no longer used.

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.SList of 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:True if the client supports refreshing, False otherwise.
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:

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.

get_backend_property_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True if successful, False otherwise.
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:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

prop_value:Retrieved backend property value; cannot be None

Return type:

(bool, prop_value: str)

Queries self’s backend for a property of name prop_name.

New in version 3.2.

get_capabilities()
Returns:GLib.SList of 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.Source that this client has assigned.

New in version 3.2.

is_online()
Returns:True if 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.BUSY error.

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:True if 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:

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.

open_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True if successful, False otherwise.
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:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

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.

ref_main_context()
Returns:a GLib.MainContext
Return type:GLib.MainContext

Returns the GLib.MainContext on which event sources for self are to be attached.

The returned GLib.MainContext is 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:

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.

refresh_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True if successful, False otherwise.
Return type:bool

Finishes previous call of EDataServer.Client.refresh().

New in version 3.2.

refresh_sync(cancellable)
Parameters:cancellable (Gio.Cancellable or None) – a Gio.Cancellable; can be None
Raises:GLib.Error
Returns:True if successful, False otherwise.
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:

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.

remove_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True if successful, False otherwise.
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.Cancellable or None) – a Gio.Cancellable; can be None
Raises:GLib.Error
Returns:True if successful, False otherwise.
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:

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.

retrieve_capabilities_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True if successful, False otherwise.
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.Cancellable or None) – a Gio.Cancellable; can be None
Raises:GLib.Error
Returns:True if successful, False otherwise.
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:

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.

retrieve_properties_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True on success, False on 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.Cancellable or None) – optional Gio.Cancellable object, or None
Raises:GLib.Error
Returns:True on success, False on 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:

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_SUPPORTED error.

set_backend_property_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True if successful, False otherwise.
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_SUPPORTED error.

set_backend_property_sync(prop_name, prop_value, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

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_SUPPORTED error.

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.Error returned 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:

Asynchronously waits until the self is connected (according to ESource::connection-status property), 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.

wait_for_connected_finish(result)
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Raises:GLib.Error
Returns:True if successful, False otherwise.
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:
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Synchronously waits until the self is connected (according to ESource::connection-status property), 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.

do_backend_died() virtual
do_backend_error(error_msg) virtual
Parameters:error_msg (str) –
do_backend_property_changed(prop_name, prop_value) virtual
Parameters:
  • prop_name (str) –
  • prop_value (str) –
do_get_backend_property(prop_name, cancellable, callback, *user_data) virtual
Parameters:

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.

do_get_backend_property_finish(result) virtual
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Returns:True if successful, False otherwise.
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:
Returns:

True if successful, False otherwise.

prop_value:Retrieved backend property value; cannot be None

Return type:

(bool, prop_value: str)

Queries client’s backend for a property of name prop_name.

New in version 3.2.

do_open(only_if_exists, cancellable, callback, *user_data) virtual
Parameters:

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.

do_open_finish(result) virtual
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Returns:True if successful, False otherwise.
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:
Returns:

True if successful, False otherwise.

Return type:

bool

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.

do_opened(error) virtual
Parameters:error (GLib.Error) –
do_refresh(cancellable, callback, *user_data) virtual
Parameters:

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.

do_refresh_finish(result) virtual
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Returns:True if successful, False otherwise.
Return type:bool

Finishes previous call of EDataServer.Client.refresh().

New in version 3.2.

do_refresh_sync(cancellable) virtual
Parameters:cancellable (Gio.Cancellable or None) – a Gio.Cancellable; can be None
Returns:True if successful, False otherwise.
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:

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.

do_remove_finish(result) virtual
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Returns:True if successful, False otherwise.
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.Cancellable or None) – a Gio.Cancellable; can be None
Returns:True if successful, False otherwise.
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:

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.

do_retrieve_capabilities_finish(result) virtual
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Returns:True if successful, False otherwise.
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.Cancellable or None) – a Gio.Cancellable; can be None
Returns:True if successful, False otherwise.
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.Cancellable or None) – optional Gio.Cancellable object, or None
Returns:True on success, False on 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:

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_SUPPORTED error.

do_set_backend_property_finish(result) virtual
Parameters:result (Gio.AsyncResult) – a Gio.AsyncResult
Returns:True if successful, False otherwise.
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_SUPPORTED error.

do_set_backend_property_sync(prop_name, prop_value, cancellable) virtual
Parameters:
Returns:

True if successful, False otherwise.

Return type:

bool

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_SUPPORTED error.

do_unwrap_dbus_error(dbus_error) virtual
Parameters:dbus_error (GLib.Error) – a GLib.Error returned 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.

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:

RUN_FIRST

Parameters:
EDataServer.Client.signals.backend_property_changed(client, object, p0)
Signal Name:

backend-property-changed

Flags:

RUN_LAST

Parameters:
EDataServer.Client.signals.opened(client, object)
Signal Name:

opened

Flags:

RUN_LAST, DEPRECATED

Parameters:

Deprecated since version ???.

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 True after 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.Source for which this client was created.