EDataServer.Source¶
- Subclasses:
None
Methods¶
- Inherited:
GObject.Object (37), Gio.Initable (2), Gio.ProxyResolver (5)
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Connection status of the source |
||
r/w/c/en |
The human-readable name of the data source |
||
r/w/c/en |
Whether the data source is enabled |
||
r/w/co |
The main loop context on which to attach event sources |
||
r/w/en |
The unique identity of the parent data source |
||
r |
Whether the data source can create remote resources |
||
r |
Whether the data source can delete remote resources |
||
r |
Whether the data source is removable |
||
r/w/co |
The unique identity of the data source |
||
r |
Whether the data source is writable |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Let’s the backend know provided credentials to use to login to (possibly remote) data store. |
|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class EDataServer.Source(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Contains only private data that should be read and manipulated using the functions below.
New in version 3.6.
- classmethod new(dbus_object, main_context)¶
- Parameters:
dbus_object (
Gio.DBusObject
orNone
) – aGio.DBusObject
orNone
main_context (
GLib.MainContext
orNone
) – aGLib.MainContext
orNone
- Raises:
- Returns:
a new
EDataServer.Source
, orNone
on error- Return type:
Creates a new
EDataServer.Source
instance.The
EDataServer.Source
::changed
signal will be emitted from main_context if given, or else from the thread-defaultGLib.MainContext
at the time this function is called.The only time the function should be called outside of
EDataServer.SourceRegistry
is to create a so-called “scratch”EDataServer.Source
for editing in a Properties window or an account setup assistant.FIXME: Elaborate on scratch sources.
New in version 3.6.
- classmethod new_with_uid(uid, main_context)¶
- Parameters:
uid (
str
) – a new unique identifier stringmain_context (
GLib.MainContext
orNone
) – aGLib.MainContext
orNone
- Raises:
- Returns:
a new scratch
EDataServer.Source
, orNone
on error- Return type:
Creates a new “scratch”
EDataServer.Source
with a predetermined unique identifier.The
EDataServer.Source
::changed
signal will be emitted from main_context if given, or else from the thread-defaultGLib.MainContext
at the time this function is called.New in version 3.6.
- classmethod parameter_to_key(param_name)¶
- Parameters:
param_name (
str
) – aGObject.ParamSpec
name- Return type:
Converts a
GObject.ParamSpec
name (e.g. “foo-bar” or “foo_bar”) to “CamelCase” for use as aGLib.KeyFile
key (e.g. “FooBar”).This function is made public only to aid in account migration. Applications should not need to use this.
New in version 3.6.
- camel_configure_service(service)¶
- Parameters:
service (
Camel.Service
) – aCamel.Service
This function essentially glues together self and serivce so their configuration settings stay synchronized. The glue itself is a shared
Camel.Settings
instance.Call this function immediately after creating a new
Camel.Service
withCamel.Session.add_service
().New in version 3.6.
- changed()¶
Emits the
EDataServer.Source
::changed
signal from an idle callback in self'sEDataServer.Source
:main-context
.This function is primarily intended for use by
EDataServer.SourceExtension
when emitting aGObject.Object
::notify
signal on one of its properties.New in version 3.6.
- compare_by_display_name(source2)¶
- Parameters:
source2 (
EDataServer.Source
) – the secondEDataServer.Source
- Returns:
a negative value if self compares before source2, zero if they compare equal, or a positive value if self compares after source2
- Return type:
Compares two
EDataServer.Source
instances by their display names. Useful for ordering sources in a user interface.New in version 3.6.
- delete_password(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 deletes the password for self from either the default keyring or session keyring. This operation does not rely on the registry service and therefore works for any
EDataServer.Source
– registered or “scratch”.When the operation is finished, callback will be called. You can then call
EDataServer.Source.delete_password_finish
() to get the result of the operation.New in version 3.12.
- delete_password_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.delete_password
().Note the boolean return value indicates whether the delete operation itself completed successfully, not whether a password was found and deleted. If no password was found, the function will still return
True
. If an error occurs, the function sets error and returnsFalse
.New in version 3.12.
- delete_password_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Deletes the password for self from either the default keyring or session keyring. This operation does not rely on the registry service and therefore works for any
EDataServer.Source
– registered or “scratch”.Note the boolean return value indicates whether the delete operation itself completed successfully, not whether a password was found and deleted. If no password was found, the function will still return
True
. If an error occurs, the function sets error and returnsFalse
.New in version 3.12.
- dup_display_name()¶
- Returns:
a newly-allocated copy of
EDataServer.Source
:display-name
- Return type:
Thread-safe variation of
EDataServer.Source.get_display_name
(). Use this function when accessing self from multiple threads.The returned string should be freed with
GLib.free
() when no longer needed.New in version 3.6.
- dup_parent()¶
- Returns:
a newly-allocated copy of
EDataServer.Source
:parent
- Return type:
Thread-safe variation of
EDataServer.Source.get_parent
(). Use this function when accessing self from multiple threads.The returned string should be freed with
GLib.free
() when no longer needed.New in version 3.6.
- dup_secret_label()¶
- Returns:
a newly-allocated secret label
- Return type:
Creates a label string based on self's
EDataServer.Source
:display-name
for use with #SecretItem.New in version 3.12.
- dup_uid()¶
- Returns:
a newly-allocated copy of
EDataServer.Source
:uid
- Return type:
Thread-safe variation of
EDataServer.Source.get_uid
(). Use this function when accessing self from multiple threads.The returned string should be freed with
GLib.free
() when no longer needed.New in version 3.6.
- emit_credentials_required(reason, certificate_pem, certificate_errors, op_error)¶
- Parameters:
reason (
EDataServer.SourceCredentialsReason
) – anEDataServer.SourceCredentialsReason
, why the credentials are requiredcertificate_pem (
str
) – PEM-encoded secure connection certificate, or an empty stringcertificate_errors (
Gio.TlsCertificateFlags
) – a bit-or ofGio.TlsCertificateFlags
for secure connection certificateop_error (
GLib.Error
orNone
) – aGLib.Error
with a description of the previous credentials error, orNone
Emits locally (in this process only) the
EDataServer.Source
::credentials-required
signal with given parameters. That’s the difference withEDataServer.Source.invoke_credentials_required
(), which calls the signal globally, within each client.New in version 3.16.
- equal(source2)¶
- Parameters:
source2 (
EDataServer.Source
) – the secondEDataServer.Source
- Returns:
True
if self and source2 are equal- Return type:
Checks two
EDataServer.Source
instances for equality.EDataServer.Source
instances are equal if their unique identifier strings are equal.New in version 3.6.
- get_connection_status()¶
- Returns:
Current connection status of the self.
- Return type:
Obtain current connection status of the self.
New in version 3.16.
- get_display_name()¶
- Returns:
the display name for self
- Return type:
Returns the display name for self. Use the display name to represent the
EDataServer.Source
in a user interface.New in version 3.6.
- get_enabled()¶
- Returns:
whether self is enabled
- Return type:
Returns
True
if self is enabled.An application should try to honor this setting if at all possible, even if it does not provide a way to change the setting through its user interface. Disabled data sources should generally be hidden.
This function does not take into account self's ancestors in the
EDataServer.Source
hierarchy, each of which have their own enabled state. If any of self's ancestors are disabled, then self itself should be treated as disabled. UseEDataServer.SourceRegistry.check_enabled
() to easily check for this.New in version 3.6.
- get_extension(extension_name)¶
- Parameters:
extension_name (
str
) – an extension name- Returns:
an instance of some
EDataServer.SourceExtension
subclass- Return type:
Returns an instance of some
EDataServer.SourceExtension
subclass which registered itself under extension_name. If no such instance exists within self, one will be created. It is the caller’s responsibility to know which subclass is being returned.If you just want to test for the existence of an extension within self without creating it, use
EDataServer.Source.has_extension
().Extension instances are owned by their
EDataServer.Source
and should not be referenced directly. Instead, reference theEDataServer.Source
instance and use this function to fetch the extension instance as needed.New in version 3.6.
- get_last_credentials_required_arguments(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 calls the GetLastCredentialsRequiredArguments method on the server side, to get the last values used for the ‘credentials-required’ signal. See
EDataServer.Source.get_last_credentials_required_arguments_sync
() for more information.When the operation is finished, callback will be called. You can then call
EDataServer.Source.get_last_credentials_required_arguments_finish
() to get the result of the operation.New in version 3.16.
- get_last_credentials_required_arguments_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
on success,False
on error- out_reason:
an
EDataServer.SourceCredentialsReason
, why the credentials are required- out_certificate_pem:
PEM-encoded secure connection certificate, or an empty string
- out_certificate_errors:
a bit-or of
Gio.TlsCertificateFlags
for secure connection certificate- out_op_error:
a
GLib.Error
with a description of the previous credentials error
- Return type:
(
bool
, out_reason:EDataServer.SourceCredentialsReason
, out_certificate_pem:str
, out_certificate_errors:Gio.TlsCertificateFlags
, out_op_error:GLib.Error
)
Finishes the operation started with
EDataServer.Source.get_last_credentials_required_arguments
(). SeeEDataServer.Source.get_last_credentials_required_arguments_sync
() for more information about the output arguments.If an error occurs, the function sets error and returns
False
.New in version 3.16.
- get_last_credentials_required_arguments_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
True
on success,False
on error- out_reason:
an
EDataServer.SourceCredentialsReason
, why the credentials are required- out_certificate_pem:
PEM-encoded secure connection certificate, or an empty string
- out_certificate_errors:
a bit-or of
Gio.TlsCertificateFlags
for secure connection certificate- out_op_error:
a
GLib.Error
with a description of the previous credentials error
- Return type:
(
bool
, out_reason:EDataServer.SourceCredentialsReason
, out_certificate_pem:str
, out_certificate_errors:Gio.TlsCertificateFlags
, out_op_error:GLib.Error
)
Retrieves the last used arguments of the ‘credentials-required’ signal emission. If there was none emitted yet, or a corresponding ‘authenitcate’ had been emitted already, then the out_reason is set to
EDataServer.SourceCredentialsReason.UNKNOWN
and the value of other ‘out’ arguments is set to no values.If an error occurs, the function sets error and returns
False
. The resultstr
values should be freed withGLib.free
() when no longer needed.New in version 3.16.
- get_oauth2_access_token(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 obtains the OAuth 2.0 access token for self along with its expiry in seconds from the current time (or 0 if unknown).
When the operation is finished, callback will be called. You can then call
EDataServer.Source.get_oauth2_access_token_finish
() to get the result of the operation.New in version 3.8.
- get_oauth2_access_token_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.get_oauth2_access_token
().Free the returned access token with
GLib.free
() when finished with it. If an error occurred, the function will set error and returnFalse
.New in version 3.8.
- get_oauth2_access_token_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Obtains the OAuth 2.0 access token for self along with its expiry in seconds from the current time (or 0 if unknown).
Free the returned access token with
GLib.free
() when finished with it. If an error occurs, the function will set error and returnFalse
.New in version 3.8.
- get_parent()¶
- Returns:
the UID of the parent
EDataServer.Source
- Return type:
Returns the unique identifier string of the parent
EDataServer.Source
.New in version 3.6.
- get_remote_creatable()¶
- Returns:
whether self can create remote resources
- Return type:
Returns whether new resources can be created on a remote server by calling
EDataServer.Source.remote_create
() on self.Generally this is only
True
if self has anEDataServer.SourceCollection
extension, which means there is an #ECollectionBackend in the D-Bus service that can handle create requests. If self does not have this capability, calls toEDataServer.Source.remote_create
() will fail.New in version 3.6.
- get_remote_deletable()¶
- Returns:
whether self can delete remote resources
- Return type:
Returns whether the resource represented by self can be deleted from a remote server by calling
EDataServer.Source.remote_delete
().Generally this is only
True
if self is a child of anEDataServer.Source
which has anEDataServer.SourceCollection
extension, which means there is an #ECollectionBackend in the D-Bus service that can handle delete requests. If self does not have this capability, calls toEDataServer.Source.remote_delete
() will fail.New in version 3.6.
- get_removable()¶
- Returns:
whether self is removable
- Return type:
Returns whether the D-Bus service will allow self to be removed. If self is not writable, calls to
EDataServer.Source.remove
() will fail.New in version 3.6.
- get_uid()¶
- Returns:
the UID for self
- Return type:
Returns the unique identifier string for self.
New in version 3.6.
- get_writable()¶
- Returns:
whether self is writable
- Return type:
Returns whether the D-Bus service will accept changes to self. If self is not writable, calls to
EDataServer.Source.write
() will fail.New in version 3.6.
- has_extension(extension_name)¶
- Parameters:
extension_name (
str
) – an extension name- Returns:
- Return type:
Checks whether self has an
EDataServer.SourceExtension
with the given name.New in version 3.6.
- hash()¶
- Returns:
a hash value for self.
- Return type:
Generates a hash value for self. This function is intended for easily hashing an
EDataServer.Source
to add to aGLib.HashTable
or similar data structure.New in version 3.6.
- invoke_authenticate(credentials, cancellable, callback, *user_data)¶
- Parameters:
credentials (
EDataServer.NamedParameters
orNone
) – anEDataServer.NamedParameters
structure with credentials to use; can beNone
to use those from the last callcancellable (
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 calls the InvokeAuthenticate method on the server side, thus the backend knows what credentials to use to connect to its (possibly remote) data store.
When the operation is finished, callback will be called. You can then call
EDataServer.Source.invoke_authenticate_finish
() to get the result of the operation.New in version 3.16.
- invoke_authenticate_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.invoke_authenticate
().If an error occurs, the function sets error and returns
False
.New in version 3.16.
- invoke_authenticate_sync(credentials, cancellable)¶
- Parameters:
credentials (
EDataServer.NamedParameters
orNone
) – anEDataServer.NamedParameters
structure with credentials to use; can beNone
to use those from the last callcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Calls the InvokeAuthenticate method on the server side, thus the backend knows what credentials to use to connect to its (possibly remote) data store.
If an error occurs, the function sets error and returns
False
.New in version 3.16.
- invoke_credentials_required(reason, certificate_pem, certificate_errors, op_error, cancellable, callback, *user_data)¶
- Parameters:
reason (
EDataServer.SourceCredentialsReason
) – anEDataServer.SourceCredentialsReason
, why the credentials are requiredcertificate_pem (
str
) – PEM-encoded secure connection certificate, or an empty stringcertificate_errors (
Gio.TlsCertificateFlags
) – a bit-or ofGio.TlsCertificateFlags
for secure connection certificateop_error (
GLib.Error
orNone
) – aGLib.Error
with a description of the previous credentials error, orNone
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 calls the InvokeCredentialsRequired method on the server side, to inform clients that credentials are required.
When the operation is finished, callback will be called. You can then call
EDataServer.Source.invoke_credentials_required_finish
() to get the result of the operation.New in version 3.16.
- invoke_credentials_required_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.invoke_credentials_required
().If an error occurs, the function sets error and returns
False
.New in version 3.16.
- invoke_credentials_required_sync(reason, certificate_pem, certificate_errors, op_error, cancellable)¶
- Parameters:
reason (
EDataServer.SourceCredentialsReason
) – anEDataServer.SourceCredentialsReason
, why the credentials are requiredcertificate_pem (
str
) – PEM-encoded secure connection certificate, or an empty stringcertificate_errors (
Gio.TlsCertificateFlags
) – a bit-or ofGio.TlsCertificateFlags
for secure connection certificateop_error (
GLib.Error
orNone
) – aGLib.Error
with a description of the previous credentials error, orNone
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Let’s the client-side know that credentials are required. The reason defines which parameters are used. The client passed the credentials with an
EDataServer.Source.invoke_authenticate
() call.The
EDataServer.SourceCredentialsReason.REQUIRED
is used for the first credentials prompt, when the client can return credentials as stored from the previous success login.The
EDataServer.SourceCredentialsReason.REJECTED
is used when the previously used credentials had been rejected by the server. That usually means that the user should be asked to provide/correct the credentials.The
EDataServer.SourceCredentialsReason.SSL_FAILED
is used when a secured connection failed due to some server-side certificate issues.The
EDataServer.SourceCredentialsReason.ERROR
is used when the server returned an error. It is not possible to connect to it at the moment usually.If an error occurs, the function sets error and returns
False
.New in version 3.16.
- lookup_password(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 looks up a password for self. Both the default and session keyrings are queried. This operation does not rely on the registry service and therefore works for any
EDataServer.Source
– registered or “scratch”.When the operation is finished, callback will be called. You can then call
EDataServer.Source.lookup_password_finish
() to get the result of the operation.New in version 3.12.
- lookup_password_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
on success,False
on error- out_password:
return location for the password, or
None
- Return type:
Finishes the operation started with
EDataServer.Source.lookup_password
().Note the boolean return value indicates whether the lookup operation itself completed successfully, not whether a password was found. If no password was found, the function will set out_password to
None
but still returnTrue
. If an error occurs, the function sets error and returnsFalse
.New in version 3.12.
- lookup_password_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
True
on success,False
on error- out_password:
return location for the password, or
None
- Return type:
Looks up a password for self. Both the default and session keyrings are queried. This operation does not rely on the registry service and therefore works for any
EDataServer.Source
– registered or “scratch”.Note the boolean return value indicates whether the lookup operation itself completed successfully, not whether a password was found. If no password was found, the function will set out_password to
None
but still returnTrue
. If an error occurs, the function sets error and returnsFalse
.New in version 3.12.
- mail_signature_load(io_priority, cancellable, callback, *user_data)¶
- Parameters:
io_priority (
int
) – the I/O priority of the requestcancellable (
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 loads a signature from the signature file for self, which is given by
EDataServer.SourceMailSignature.get_file
().If the signature file is executable, it will be executed and its output captured as the email signature content. If the signature file is not executable, the email signature content is read directly from the file.
When the operation is finished, callback will be called. You can then call
EDataServer.Source.mail_signature_load_finish
() to get the result of the operation.New in version 3.6.
- mail_signature_load_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
on success,False
on failure- contents:
return location for the signature content
- length:
return location for the length of the signature content, or
None
if the length is not needed
- Return type:
Finishes an operation started with
EDataServer.Source.mail_signature_load
(). The signature file contents are placed in contents, and length is set to the size of the contents string. The contents string should be freed withGLib.free
() when no longer needed.New in version 3.6.
- mail_signature_load_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
True
on success,False
on failure- contents:
return location for the signature content
- length:
return location for the length of the signature content, or
None
if the length is not needed
- Return type:
Loads a signature from the signature file for self, which is given by
EDataServer.SourceMailSignature.get_file
(). The signature contents are placed in contents, and length is set to the size of the contents string. The contents string should be freed withGLib.free
() when no longer needed.If the signature file is executable, it will be executed and its output captured as the email signature content. If the signature file is not executable, the email signature content is read directly from the file.
New in version 3.6.
- mail_signature_replace(contents, length, io_priority, cancellable, callback, *user_data)¶
- Parameters:
contents (
str
) – the signature contentslength (
int
) – the length of contents in bytesio_priority (
int
) – the I/O priority of the requestcancellable (
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
Asynchrously replaces the signature file for self with the given contents of length bytes. The signature file for self is given by
EDataServer.SourceMailSignature.get_file
().When the operation is finished, callback will be called. You can then call
EDataServer.Source.mail_signature_replace_finish
() to get the result of the operation.New in version 3.6.
- mail_signature_replace_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes an operation started with
EDataServer.Source.mail_signature_replace
().New in version 3.6.
- mail_signature_replace_sync(contents, length, cancellable)¶
- Parameters:
contents (
str
) – the signature contentslength (
int
) – the length of contents in bytescancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Replaces the signature file for self with the given contents of length bytes. The signature file for self is given by
EDataServer.SourceMailSignature.get_file
().New in version 3.6.
- mail_signature_symlink(symlink_target, io_priority, cancellable, callback, *user_data)¶
- Parameters:
symlink_target (
str
) – executable filename to link toio_priority (
int
) – the I/O priority of the requestcancellable (
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 replaces the signature file for self with a symbolic link to symlink_target, which should be an executable file that prints a mail signature to standard output. The signature file for self is given by
EDataServer.SourceMailSignature.get_file
().When the operation is finished, callback will be called. You can then call
EDataServer.Source.mail_signature_symlink_finish
() to get the result of the operation.New in version 3.6.
- mail_signature_symlink_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes an operation started with
EDataServer.Source.mail_signature_symlink
().New in version 3.6.
- mail_signature_symlink_sync(symlink_target, cancellable)¶
- Parameters:
symlink_target (
str
) – executable filename to link tocancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Replaces the signature file for self with a symbolic link to symlink_target, which should be an executable file that prints a mail signature to standard output. The signature file for self is given by
EDataServer.SourceMailSignature.get_file
().New in version 3.6.
- proxy_lookup(uri, cancellable, callback, *user_data)¶
- Parameters:
uri (
str
) – a URI representing the destination to connect tocancellable (
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 determines what proxy, if any, to use to connect to uri. See
EDataServer.Source.proxy_lookup_sync
() for more details.When the operation is finished, callback will be called. You can then call
EDataServer.Source.proxy_lookup_finish
() to get the result of the operation.New in version 3.12.
- proxy_lookup_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.proxy_lookup
().Free the returned proxy URIs with
GLib.strfreev
() when finished with them.New in version 3.12.
- proxy_lookup_sync(uri, cancellable)¶
- Parameters:
uri (
str
) – a URI representing the destination to connect tocancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Looks into self's
EDataServer.SourceProxy
extension to determine what proxy, if any, to use to connect to uri. The returned proxy URIs are of the same form described byGio.ProxyResolver.lookup
().The proxy extension’s
EDataServer.SourceProxy
:method
controls how proxy URIs are determined:When using
EDataServer.ProxyMethod.DEFAULT
, the function will defer to theGio.ProxyResolver
returned byGio.ProxyResolver.get_default
().When using
EDataServer.ProxyMethod.MANUAL
, the function will configure aGio.SimpleProxyResolver
from the HTTP, HTTPS, FTP and SOCKS properties, as well asEDataServer.SourceProxy
:ignore-hosts
.When using
EDataServer.ProxyMethod.AUTO
, the function will execute a proxy auto-config (PAC) file atEDataServer.SourceProxy
:autoconfig-url
.When using
EDataServer.ProxyMethod.NONE
, the function will only returndirect://
.If self does not have an
EDataServer.SourceProxy
extension, the function sets error toGio.IOErrorEnum.NOT_SUPPORTED
and returnsNone
.Free the returned proxy URIs with
GLib.strfreev
() when finished with them.New in version 3.12.
- ref_dbus_object()¶
- Returns:
the
Gio.DBusObject
for self, orNone
- Return type:
Returns the
Gio.DBusObject
that was passed toEDataServer.Source.new
().The returned
Gio.DBusObject
is referenced for thread-safety and must be unreferenced withGObject.Object.unref
() when finished with it.New in version 3.6.
- 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.6.
- refresh_add_timeout(context, callback, *user_data)¶
- Parameters:
context (
GLib.MainContext
orNone
) – aGLib.MainContext
, orNone
(ifNone
, the default context will be used)callback (
EDataServer.SourceRefreshFunc
) – function to call on each timeout
- Returns:
a refresh timeout ID
- Return type:
This is a simple way to schedule a periodic data source refresh.
Adds a timeout
GLib.Source
to context and handles all the bookkeeping if self's refreshEDataServer.SourceRefresh
:enabled
state or its refreshEDataServer.SourceRefresh
:interval-minutes
value changes. The callback is expected to dispatch an asynchronous job to connect to and fetch updates from a remote server.The returned ID can be passed to
EDataServer.Source.refresh_remove_timeout
() to remove the timeout from context. Note the ID is a private handle and cannot be passed toGLib.Source.remove
().New in version 3.6.
- refresh_force_timeout()¶
For all timeouts added with
EDataServer.Source.refresh_add_timeout
(), invokes theEDataServer.SourceRefreshFunc
callback immediately and then, if the refreshEDataServer.SourceRefresh
:enabled
state isTrue
, reschedules the timeout.This function is called automatically when the
EDataServer.Source
switches from disabled to enabled, but can also be useful when a network connection becomes available or when waking up from hibernation or suspend.New in version 3.6.
- refresh_remove_timeout(refresh_timeout_id)¶
- Parameters:
refresh_timeout_id (
int
) – a refresh timeout ID- Returns:
True
if the timeout was found and removed- Return type:
Removes a timeout
GLib.Source
added byEDataServer.Source.refresh_add_timeout
().New in version 3.6.
- refresh_remove_timeouts_by_data(user_data)¶
- Parameters:
user_data (
object
orNone
) – user data to match against timeout callbacks- Returns:
the number of timeouts found and removed
- Return type:
Removes all timeout
GLib.Source
's added byEDataServer.Source.refresh_add_timeout
() whose callback data pointer matches user_data.New in version 3.6.
- remote_create(scratch_source, cancellable, callback, *user_data)¶
- Parameters:
scratch_source (
EDataServer.Source
) – anEDataServer.Source
describing the resource to createcancellable (
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 creates a new remote resource by picking out relevant details from scratch_source. The scratch_source must be an
EDataServer.Source
with noGio.DBusObject
. The self must beEDataServer.Source
:remote-creatable
.The details required to create the resource vary by #ECollectionBackend, but in most cases the scratch_source need only define the resource type (address book, calendar, etc.), a display name for the resource, and possibly a server-side path or ID for the resource.
When the operation is finished, callback will be called. You can then call
EDataServer.Source.remote_create_finish
() to get the result of the operation.New in version 3.6.
- remote_create_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.remote_create
(). If an error occurred, the function will set error and returnFalse
.New in version 3.6.
- remote_create_sync(scratch_source, cancellable)¶
- Parameters:
scratch_source (
EDataServer.Source
) – anEDataServer.Source
describing the resource to createcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Creates a new remote resource by picking out relevant details from scratch_source. The scratch_source must be an
EDataServer.Source
with noGio.DBusObject
. The self must beEDataServer.Source
:remote-creatable
.The details required to create the resource vary by #ECollectionBackend, but in most cases the scratch_source need only define the resource type (address book, calendar, etc.), a display name for the resource, and possibly a server-side path or ID for the resource.
If an error occurs, the function will set error and return
False
.New in version 3.6.
- remote_delete(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 deletes the resource represented by self from a remote server. The self must be
EDataServer.Source
:remote-deletable
. This will also delete the key file for self and broadcast its removal to all clients, similar toEDataServer.Source.remove
().When the operation is finished, callback will be called. You can then call
EDataServer.Source.remote_delete_finish
() to get the result of the operation.New in version 3.6.
- remote_delete_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.remote_delete
(). If an error occurred, the function will set error and returnFalse
.New in version 3.6.
- remote_delete_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Deletes the resource represented by self from a remote server. The self must be
EDataServer.Source
:remote-deletable
. This will also delete the key file for self and broadcast its removal to all clients, similar toEDataServer.Source.remove_sync
().If an error occurs, the function will set error and return
False
.New in version 3.6.
- remove(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 requests the D-Bus service to delete the key files for self and all of its descendants and broadcast their removal to all clients. The self must be
EDataServer.Source
:removable
.When the operation is finished, callback will be called. You can then call
EDataServer.Source.remove_finish
() to get the result of the operation.New in version 3.6.
- remove_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.remove
(). If an error occurred, the function will set error and returnFalse
.New in version 3.6.
- remove_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Requests the D-Bus service to delete the key files for self and all of its descendants and broadcast their removal to all clients. The self must be
EDataServer.Source
:removable
.If an error occurs, the functon will set error and return
False
.New in version 3.6.
- set_connection_status(connection_status)¶
- Parameters:
connection_status (
EDataServer.SourceConnectionStatus
) – one of theEDataServer.SourceConnectionStatus
Set’s current connection status of the self.
New in version 3.16.
- set_display_name(display_name)¶
- Parameters:
display_name (
str
) – a display name
Sets the display name for self. The display_name argument must be a valid UTF-8 string. Use the display name to represent the
EDataServer.Source
in a user interface.The internal copy of display_name is automatically stripped of leading and trailing whitespace.
New in version 3.6.
- set_enabled(enabled)¶
- Parameters:
enabled (
bool
) – whether to enable self
Enables or disables self.
An application should try to honor this setting if at all possible, even if it does not provide a way to change the setting through its user interface. Disabled data sources should generally be hidden.
New in version 3.6.
- set_parent(parent)¶
- Parameters:
parent (
str
orNone
) – the UID of the parentEDataServer.Source
, orNone
Identifies the parent of self by its unique identifier string. This can only be set prior to adding self to an
EDataServer.SourceRegistry
.The internal copy of
EDataServer.Source
:parent
is automatically stripped of leading and trailing whitespace. If the resulting string is empty,None
is set instead.New in version 3.6.
- store_password(password, permanently, cancellable, callback, *user_data)¶
- Parameters:
password (
str
) – the password to storepermanently (
bool
) – store permanently or just for the sessioncancellable (
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 stores a password for self. This operation does not rely on the registry service and therefore works for any
EDataServer.Source
– registered or “scratch”.If permanently is
True
, the password is stored in the default keyring. Otherwise the password is stored in the memory-only session keyring. If an error occurs, the function sets error and returnsFalse
.When the operation is finished, callback will be called. You can then call
EDataServer.Source.store_password_finish
() to get the result of the operation.New in version 3.12.
- store_password_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.store_password
().New in version 3.12.
- store_password_sync(password, permanently, cancellable)¶
- Parameters:
password (
str
) – the password to storepermanently (
bool
) – store permanently or just for the sessioncancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Stores a password for self. This operation does not rely on the registry service and therefore works for any
EDataServer.Source
– registered or “scratch”.If permanently is
True
, the password is stored in the default keyring. Otherwise the password is stored in the memory-only session keyring. If an error occurs, the function sets error and returnsFalse
.New in version 3.12.
- to_string()¶
- Returns:
a newly-allocated string
- length:
return location for the length of the returned string, or
None
- Return type:
Outputs the current contents of self as a key file string. Free the returned string with
GLib.free
().New in version 3.6.
- unset_last_credentials_required_arguments(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 calls the UnsetLastCredentialsRequiredArguments method on the server side, to unset the last values used for the ‘credentials-required’ signal.
When the operation is finished, callback will be called. You can then call
EDataServer.Source.unset_last_credentials_required_arguments_finish
() to get the result of the operation.New in version 3.18.
- unset_last_credentials_required_arguments_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.unset_last_credentials_required_arguments
().If an error occurs, the function sets error and returns
False
.New in version 3.18.
- unset_last_credentials_required_arguments_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Unsets the last used arguments of the ‘credentials-required’ signal emission.
If an error occurs, the function sets error and returns
False
.New in version 3.18.
- write(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 submits the current contents of self to the D-Bus service to be written to disk and broadcast to other clients. The self must be
EDataServer.Source
:writable
.When the operation is finished, callback will be called. You can then call
EDataServer.Source.write_finish
() to get the result of the operation.New in version 3.6.
- write_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.write
(). If an error occurred, the function will set error and returnFalse
.New in version 3.6.
- write_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Submits the current contents of self to the D-Bus service to be written to disk and broadcast to other clients. The self must be
EDataServer.Source
:writable
.If an error occurs, the functon will set error and return
False
.New in version 3.6.
- do_authenticate(credentials) virtual¶
- Parameters:
credentials (
EDataServer.NamedParameters
) –
- do_changed() virtual¶
Emits the
EDataServer.Source
::changed
signal from an idle callback in source'sEDataServer.Source
:main-context
.This function is primarily intended for use by
EDataServer.SourceExtension
when emitting aGObject.Object
::notify
signal on one of its properties.New in version 3.6.
- do_credentials_required(reason, certificate_pem, certificate_errors, op_error) virtual¶
- Parameters:
reason (
EDataServer.SourceCredentialsReason
) –certificate_pem (
str
) –certificate_errors (
Gio.TlsCertificateFlags
) –op_error (
GLib.Error
) –
- do_get_oauth2_access_token(cancellable, callback, *user_data) virtual¶
- 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 obtains the OAuth 2.0 access token for source along with its expiry in seconds from the current time (or 0 if unknown).
When the operation is finished, callback will be called. You can then call
EDataServer.Source.get_oauth2_access_token_finish
() to get the result of the operation.New in version 3.8.
- do_get_oauth2_access_token_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.get_oauth2_access_token
().Free the returned access token with
GLib.free
() when finished with it. If an error occurred, the function will set error and returnFalse
.New in version 3.8.
- do_get_oauth2_access_token_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
- Return type:
Obtains the OAuth 2.0 access token for source along with its expiry in seconds from the current time (or 0 if unknown).
Free the returned access token with
GLib.free
() when finished with it. If an error occurs, the function will set error and returnFalse
.New in version 3.8.
- do_invoke_authenticate_impl(dbus_source, arg_credentials, cancellable) virtual¶
- do_invoke_credentials_required_impl(dbus_source, arg_reason, arg_certificate_pem, arg_certificate_errors, arg_dbus_error_name, arg_dbus_error_message, cancellable) virtual¶
- do_remote_create(scratch_source, cancellable, callback, *user_data) virtual¶
- Parameters:
scratch_source (
EDataServer.Source
) – anEDataServer.Source
describing the resource to createcancellable (
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 creates a new remote resource by picking out relevant details from scratch_source. The scratch_source must be an
EDataServer.Source
with noGio.DBusObject
. The source must beEDataServer.Source
:remote-creatable
.The details required to create the resource vary by #ECollectionBackend, but in most cases the scratch_source need only define the resource type (address book, calendar, etc.), a display name for the resource, and possibly a server-side path or ID for the resource.
When the operation is finished, callback will be called. You can then call
EDataServer.Source.remote_create_finish
() to get the result of the operation.New in version 3.6.
- do_remote_create_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.remote_create
(). If an error occurred, the function will set error and returnFalse
.New in version 3.6.
- do_remote_create_sync(scratch_source, cancellable) virtual¶
- Parameters:
scratch_source (
EDataServer.Source
) – anEDataServer.Source
describing the resource to createcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
- Return type:
Creates a new remote resource by picking out relevant details from scratch_source. The scratch_source must be an
EDataServer.Source
with noGio.DBusObject
. The source must beEDataServer.Source
:remote-creatable
.The details required to create the resource vary by #ECollectionBackend, but in most cases the scratch_source need only define the resource type (address book, calendar, etc.), a display name for the resource, and possibly a server-side path or ID for the resource.
If an error occurs, the function will set error and return
False
.New in version 3.6.
- do_remote_delete(cancellable, callback, *user_data) virtual¶
- 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 deletes the resource represented by source from a remote server. The source must be
EDataServer.Source
:remote-deletable
. This will also delete the key file for source and broadcast its removal to all clients, similar toEDataServer.Source.remove
().When the operation is finished, callback will be called. You can then call
EDataServer.Source.remote_delete_finish
() to get the result of the operation.New in version 3.6.
- do_remote_delete_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.remote_delete
(). If an error occurred, the function will set error and returnFalse
.New in version 3.6.
- do_remote_delete_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
- Return type:
Deletes the resource represented by source from a remote server. The source must be
EDataServer.Source
:remote-deletable
. This will also delete the key file for source and broadcast its removal to all clients, similar toEDataServer.Source.remove_sync
().If an error occurs, the function will set error and return
False
.New in version 3.6.
- do_remove(cancellable, callback, *user_data) virtual¶
- 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 requests the D-Bus service to delete the key files for source and all of its descendants and broadcast their removal to all clients. The source must be
EDataServer.Source
:removable
.When the operation is finished, callback will be called. You can then call
EDataServer.Source.remove_finish
() to get the result of the operation.New in version 3.6.
- do_remove_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.remove
(). If an error occurred, the function will set error and returnFalse
.New in version 3.6.
- do_remove_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
- Return type:
Requests the D-Bus service to delete the key files for source and all of its descendants and broadcast their removal to all clients. The source must be
EDataServer.Source
:removable
.If an error occurs, the functon will set error and return
False
.New in version 3.6.
- do_unset_last_credentials_required_arguments_impl(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) –- Return type:
- do_write(cancellable, callback, *user_data) virtual¶
- 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 submits the current contents of source to the D-Bus service to be written to disk and broadcast to other clients. The source must be
EDataServer.Source
:writable
.When the operation is finished, callback will be called. You can then call
EDataServer.Source.write_finish
() to get the result of the operation.New in version 3.6.
- do_write_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Returns:
- Return type:
Finishes the operation started with
EDataServer.Source.write
(). If an error occurred, the function will set error and returnFalse
.New in version 3.6.
- do_write_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
- Return type:
Submits the current contents of source to the D-Bus service to be written to disk and broadcast to other clients. The source must be
EDataServer.Source
:writable
.If an error occurs, the functon will set error and return
False
.New in version 3.6.
Signal Details¶
- EDataServer.Source.signals.authenticate(source, credentials)¶
- Signal Name:
authenticate
- Flags:
- Parameters:
source (
EDataServer.Source
) – The object which received the signalcredentials (
EDataServer.NamedParameters
) – anEDataServer.NamedParameters
with provided credentials
Let’s the backend know provided credentials to use to login to (possibly remote) data store.
- EDataServer.Source.signals.changed(source)¶
- Signal Name:
changed
- Flags:
- Parameters:
source (
EDataServer.Source
) – The object which received the signal
The
::changed
signal is emitted when a property in source or one of its extension objects changes. A common use for this signal is to notify a #GtkTreeModel containing data collected fromEDataServer.Source
s that it needs to update a row.
- EDataServer.Source.signals.credentials_required(source, reason, certificate_pem, certificate_errors, error)¶
- Signal Name:
credentials-required
- Flags:
- Parameters:
source (
EDataServer.Source
) – The object which received the signalreason (
EDataServer.SourceCredentialsReason
) – anEDataServer.SourceCredentialsReason
indicating why the credentials are requestedcertificate_pem (
str
) – PEM-encoded secure connection certificate for failed SSL/TLS checkscertificate_errors (
Gio.TlsCertificateFlags
) – what failed with the SSL/TLS certificateerror (
GLib.Error
) – a text description of the error, if any
The
::credentials-required
signal is emitted when the source requires credentials to connect to (possibly remote) data store. The credentials can be passed to the backend usingEDataServer.Source.invoke_authenticate
() function.
Property Details¶
- EDataServer.Source.props.connection_status¶
- Name:
connection-status
- Type:
- Default Value:
- Flags:
Connection status of the source
- EDataServer.Source.props.display_name¶
- Name:
display-name
- Type:
- Default Value:
'Unnamed'
- Flags:
The human-readable name of the data source
- EDataServer.Source.props.enabled¶
-
Whether the data source is enabled
- EDataServer.Source.props.main_context¶
- Name:
main-context
- Type:
- Default Value:
- Flags:
The main loop context on which to attach event sources
- EDataServer.Source.props.parent¶
- Name:
parent
- Type:
- Default Value:
- Flags:
The unique identity of the parent data source
- EDataServer.Source.props.remote_creatable¶
-
Whether the data source can create remote resources
- EDataServer.Source.props.remote_deletable¶
-
Whether the data source can delete remote resources
- EDataServer.Source.props.removable¶
-
Whether the data source is removable
- EDataServer.Source.props.uid¶
- Name:
uid
- Type:
- Default Value:
- Flags:
The unique identity of the data source