EDataServer.Client¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/en |
The capabilities of this client |
||
r |
The main loop context on which to attach event sources |
||
r/w/en |
Whether this client is online |
||
r |
Whether this client is open and ready to use |
||
r |
Whether this client’s backing data is readonly |
||
r/w/co |
The |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class EDataServer.Client(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
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.ClientError
code to createcustom_msg (
str
orNone
) – custom message to use for the error; can beNone
- Returns:
a new
GLib.Error
containing an #E_CLIENT_ERROR of the given code. If the custom_msg isNone
, then the error message is the one returned fromEDataServer.Client.error_to_string
() for the code, otherwise the given message is used. Returned pointer should be freed withGLib.Error.free
().- Return type:
New in version 3.2.
- classmethod error_to_string(code)¶
- Parameters:
code (
EDataServer.ClientError
) – anEDataServer.ClientError
error code- Returns:
Localized human readable description of the given error code
- Return type:
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.SList
ofGObject.Object
s 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.SList
ofGObject.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:
strings ([
str
]) –GLib.SList
of 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.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
]) – aGLib.SList
ofGObject.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
]) – aGLib.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 withEDataServer.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
]) – aGLib.SList
of strings (conststr
*)- Returns:
Newly allocated
None
-terminated array of strings. The returned pointer should be freed withGLib.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
) – aNone
-terminated array of strings (conststr
*)- Returns:
Newly allocated
GLib.SList
of newly allocated strings. The returned pointer should be freed withEDataServer.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.Error
to unwrapknown_errors (
EDataServer.ClientErrorsList
) – List of known errors against which try to matchknown_errors_count (
int
) – How many items are stored in known_errorsknown_errors_domain (
int
) – Error domain for known_errorsfail_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 beNone
- 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 aGio.IOErrorEnum.DBUS_ERROR
, thenFalse
is returned and the client_error is left without change. Otherwise, the fail_when_none_matched isFalse
, 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:
Check if backend supports particular capability. To get all capabilities use
EDataServer.Client.get_capabilities
().New in version 3.2.
- check_refresh_supported()¶
-
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:
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.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
True
if successful,False
otherwise.- prop_value:
Retrieved backend property value; cannot be
None
- Return type:
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.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
True
if successful,False
otherwise.- 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.
- 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:
Get the
EDataServer.Source
that this client has assigned.New in version 3.2.
- is_online()¶
-
Check if this self is connected.
New in version 3.2.
- is_opened()¶
-
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 anEDataServer.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()¶
-
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 anymorecancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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 anymorecancellable (
Gio.Cancellable
orNone
) – 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.
- ref_main_context()¶
- Returns:
- Return type:
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 withGLib.MainContext.unref
() when finished with it.New in version 3.8.
- refresh(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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 byEDataServer.Client.refresh_finish
() from the callback.New in version 3.2.
- refresh_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes previous call of
EDataServer.Client.refresh
().New in version 3.2.
- refresh_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
- Return type:
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.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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 byEDataServer.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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
- Return type:
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.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
() andEDataServer.Client.check_capability
() is using the cached value. The call is finished byEDataServer.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
) – aGio.AsyncResult
- Raises:
- Returns:
True
if successful,False
otherwise.- capabilities:
Comma-separated list of capabilities of the self
- Return type:
Finishes previous call of
EDataServer.Client.retrieve_capabilities
(). Returned value of capabilities should be freed withGLib.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
orNone
) – aGio.Cancellable
; can beNone
- Raises:
- Returns:
True
if successful,False
otherwise.- capabilities:
Comma-separated list of capabilities of the self
- Return type:
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
() andEDataServer.Client.check_capability
() is using the cached value. Returned value of capabilities should be freed withGLib.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.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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.
- retrieve_properties_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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:
prop_name (
str
) – property name, whose value to change; cannot beNone
cancellable (
Gio.Cancellable
orNone
) – 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_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
) – aGLib.Error
returned bu D-Bus- Raises:
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 secondscancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; orNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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 secondscancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; orNone
- Raises:
- Returns:
- Return type:
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_property_changed(prop_name, prop_value) virtual¶
- 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.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Returns:
True
if successful,False
otherwise.- prop_value:
Retrieved backend property value; cannot be
None
- Return type:
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.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Returns:
True
if successful,False
otherwise.- 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.
- do_open(only_if_exists, cancellable, callback, *user_data) virtual¶
- Parameters:
only_if_exists (
bool
) – this parameter is not used anymorecancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Returns:
- Return type:
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 anymorecancellable (
Gio.Cancellable
orNone
) – 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.
- do_opened(error) virtual¶
- Parameters:
error (
GLib.Error
) –
- do_refresh(cancellable, callback, *user_data) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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 byEDataServer.Client.refresh_finish
() from the callback.New in version 3.2.
- do_refresh_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Returns:
- Return type:
Finishes previous call of
EDataServer.Client.refresh
().New in version 3.2.
- do_refresh_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
- Returns:
- Return type:
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.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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 byEDataServer.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
) – aGio.AsyncResult
- Returns:
- Return type:
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
orNone
) – aGio.Cancellable
; can beNone
- Returns:
- Return type:
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.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
() andEDataServer.Client.check_capability
() is using the cached value. The call is finished byEDataServer.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
) – aGio.AsyncResult
- Returns:
True
if successful,False
otherwise.- capabilities:
Comma-separated list of capabilities of the client
- Return type:
Finishes previous call of
EDataServer.Client.retrieve_capabilities
(). Returned value of capabilities should be freed withGLib.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
orNone
) – aGio.Cancellable
; can beNone
- Returns:
True
if successful,False
otherwise.- capabilities:
Comma-separated list of capabilities of the client
- Return type:
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
() andEDataServer.Client.check_capability
() is using the cached value. Returned value of capabilities should be freed withGLib.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
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
- Return type:
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
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
; can beNone
callback (
Gio.AsyncReadyCallback
orNone
) – callback to call when a result is ready
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
) – aGio.AsyncResult
- Returns:
- Return type:
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:
prop_name (
str
) – property name, whose value to change; cannot beNone
cancellable (
Gio.Cancellable
orNone
) – 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_SUPPORTED
error.
- do_unwrap_dbus_error(dbus_error) virtual¶
- Parameters:
dbus_error (
GLib.Error
) – aGLib.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:
- 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 signalobject (
str
) –
- EDataServer.Client.signals.backend_property_changed(client, object, p0)¶
- Signal Name:
backend-property-changed
- Flags:
- Parameters:
client (
EDataServer.Client
) – The object which received the signalobject (
str
) –p0 (
str
) –
- EDataServer.Client.signals.opened(client, object)¶
- Signal Name:
opened
- Flags:
- Parameters:
client (
EDataServer.Client
) – The object which received the signalobject (
GLib.Error
) –
Deprecated since version ???.
Property Details¶
- EDataServer.Client.props.capabilities¶
- Name:
capabilities
- Type:
- Default Value:
- Flags:
The capabilities of this client
- EDataServer.Client.props.main_context¶
- Name:
main-context
- Type:
- Default Value:
- Flags:
The main loop context in which notifications for this client will be delivered.
- EDataServer.Client.props.online¶
- Name:
online
- Type:
- Default Value:
- Flags:
Whether this client’s backing data is online.
- EDataServer.Client.props.opened¶
-
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 ofEDataServer.Client
.
- EDataServer.Client.props.readonly¶
-
Whether this client’s backing data is readonly.
- EDataServer.Client.props.source¶
- Name:
source
- Type:
- Default Value:
- Flags:
The
EDataServer.Source
for which this client was created.