Creates a new #ESource instance.
The #ESource::changed signal will be emitted from main_context
if given,
or else from the thread-default #GMainContext at the time this function is
called.
The only time the function should be called outside of #ESourceRegistry is to create a so-called "scratch" #ESource for editing in a Properties window or an account setup assistant.
FIXME: Elaborate on scratch sources.
a #GDBusObject or %NULL
a #GMainContext or %NULL
Creates a binding between source_property
on source
and target_property
on target
.
Whenever the source_property
is changed the target_property
is
updated using the same value. For instance:
g_object_bind_property (action, "active", widget, "sensitive", 0);
Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.
If flags
contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
if target_property
on target
changes then the source_property
on source
will be updated as well.
The binding will automatically be removed when either the source
or the
target
instances are finalized. To remove the binding without affecting the
source
and the target
you can just call g_object_unref() on the returned
#GBinding instance.
Removing the binding by calling g_object_unref() on it must only be done if
the binding, source
and target
are only used from a single thread and it
is clear that both source
and target
outlive the binding. Especially it
is not safe to rely on this if the binding, source
or target
can be
finalized from different threads. Keep another reference to the binding and
use g_binding_unbind() instead to be on the safe side.
A #GObject can have multiple bindings.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
Creates a binding between source_property
on source
and target_property
on target,
allowing you to set the transformation functions to be used by
the binding.
This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
a #GClosure wrapping the transformation function from the source
to the target,
or %NULL to use the default
a #GClosure wrapping the transformation function from the target
to the source,
or %NULL to use the default
This function essentially glues together source
and serivce
so their
configuration settings stay synchronized. The glue itself is a shared
#CamelSettings instance.
Call this function immediately after creating a new #CamelService with camel_session_add_service().
Emits the #ESource::changed signal from an idle callback in
source'
s #ESource:main-context.
This function is primarily intended for use by #ESourceExtension when emitting a #GObject::notify signal on one of its properties.
Compares two #ESource instances by their display names. Useful for ordering sources in a user interface.
the second #ESource
Asynchronously deletes the password for source
from either the default
keyring or session keyring. This operation does not rely on the registry
service and therefore works for any #ESource -- registered or "scratch".
When the operation is finished, callback
will be called. You can then
call e_source_delete_password_finish() to get the result of the operation.
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_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 returns %FALSE.
a #GAsyncResult
Deletes the password for source
from either the default keyring or
session keyring. This operation does not rely on the registry service
and therefore works for any #ESource -- 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 returns %FALSE.
optional #GCancellable object, or %NULL
Thread-safe variation of e_source_get_display_name().
Use this function when accessing source
from multiple threads.
The returned string should be freed with g_free() when no longer needed.
Thread-safe variation of e_source_get_parent().
Use this function when accessing source
from multiple threads.
The returned string should be freed with g_free() when no longer needed.
Creates a label string based on source'
s #ESource:display-name for use
with #SecretItem.
Thread-safe variation of e_source_get_uid().
Use this function when accessing source
from multiple threads.
The returned string should be freed with g_free() when no longer needed.
Emits localy (in this process only) the ESource::credentials-required signal with given parameters. That's the difference with e_source_invoke_credentials_required(), which calls the signal globally, within each client.
an #ESourceCredentialsReason, why the credentials are required
PEM-encoded secure connection certificate, or an empty string
a bit-or of #GTlsCertificateFlags for secure connection certificate
a #GError with a description of the previous credentials error, or %NULL
Checks two #ESource instances for equality. #ESource instances are equal if their unique identifier strings are equal.
the second #ESource
This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().
Increases the freeze count on object
. If the freeze count is
non-zero, the emission of "notify" signals on object
is
stopped. The signals are queued until the freeze count is decreased
to zero. Duplicate notifications are squashed so that at most one
#GObject::notify signal is emitted for each property modified while the
object is frozen.
This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
Obtain current connection status of the source
.
Gets a named field from the objects table of associations (see g_object_set_data()).
name of the key for that association
Returns the display name for source
. Use the display name to
represent the #ESource in a user interface.
Returns %TRUE if source
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.
source'
s ancestors in the
#ESource hierarchy, each of which have their own enabled state. If
any of source'
s ancestors are disabled, then source
itself should
be treated as disabled. Use e_source_registry_check_enabled() to
easily check for this.
Returns an instance of some #ESourceExtension subclass which registered
itself under extension_name
. If no such instance exists within source,
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 source
without creating it, use e_source_has_extension().
Extension instances are owned by their #ESource and should not be referenced directly. Instead, reference the #ESource instance and use this function to fetch the extension instance as needed.
an extension name
Asynchronously calls the GetLastCredentialsRequiredArguments method on the server side, to get the last values used for the 'credentials-required' signal. See e_source_get_last_credentials_required_arguments_sync() for more information.
When the operation is finished, callback
will be called. You can then
call e_source_get_last_credentials_required_arguments_finish() to get
the result of the operation.
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_get_last_credentials_required_arguments(). See e_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.
a #GAsyncResult
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 #E_SOURCE_CREDENTIALS_REASON_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 result gchar
values should be freed with g_free() when no longer needed.
optional #GCancellable object, or %NULL
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 e_source_get_oauth2_access_token_finish() to get the result of the
operation.
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_get_oauth2_access_token().
Free the returned access token with g_free() when finished with it.
If an error occurred, the function will set error
and return %FALSE.
a #GAsyncResult
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 g_free() when finished with it.
If an error occurs, the function will set error
and return %FALSE.
optional #GCancellable object, or %NULL
Returns the unique identifier string of the parent #ESource.
Gets a property of an object.
The value
can be:
In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().
Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.
the name of the property to get
return location for the property value
This function gets back user data pointers stored via g_object_set_qdata().
A #GQuark, naming the user data pointer
Returns whether new resources can be created on a remote server by
calling e_source_remote_create() on source
.
Generally this is only %TRUE if source
has an #ESourceCollection
extension, which means there is an #ECollectionBackend in the D-Bus
service that can handle create requests. If source
does not have
this capability, calls to e_source_remote_create() will fail.
Returns whether the resource represented by source
can be deleted
from a remote server by calling e_source_remote_delete().
Generally this is only %TRUE if source
is a child of an #ESource
which has an #ESourceCollection extension, which means there is an
#ECollectionBackend in the D-Bus service that can handle delete
requests. If source
does not have this capability, calls to
e_source_remote_delete() will fail.
Returns whether the D-Bus service will allow source
to be removed.
If source
is not writable, calls to e_source_remove() will fail.
Returns the unique identifier string for source
.
Returns whether the D-Bus service will accept changes to source
.
If source
is not writable, calls to e_source_write() will fail.
Gets n_properties
properties for an object
.
Obtained properties will be set to values
. All properties must be valid.
Warnings will be emitted and undefined behaviour may result if invalid
properties are passed in.
the names of each property to get
the values of each property to get
Checks whether source
has an #ESourceExtension with the given name.
an extension name
Generates a hash value for source
. This function is intended for
easily hashing an #ESource to add to a #GHashTable or similar data
structure.
Initializes the object implementing the interface.
This method is intended for language bindings. If writing in C, g_initable_new() should typically be used instead.
The object must be initialized before any real use after initial construction, either with this function or g_async_initable_init_async().
Implementations may also support cancellation. If cancellable
is not %NULL,
then initialization can be cancelled by triggering the cancellable object
from another thread. If the operation was cancelled, the error
%G_IO_ERROR_CANCELLED will be returned. If cancellable
is not %NULL and
the object doesn't support cancellable initialization the error
%G_IO_ERROR_NOT_SUPPORTED will be returned.
If the object is not initialized, or initialization returns with an error, then all operations on the object except g_object_ref() and g_object_unref() are considered to be invalid, and have undefined behaviour. See the [introduction][ginitable] for more details.
Callers should not assume that a class which implements #GInitable can be initialized multiple times, unless the class explicitly documents itself as supporting this. Generally, a class’ implementation of init() can assume (and assert) that it will only be called once. Previously, this documentation recommended all #GInitable implementations should be idempotent; that recommendation was relaxed in GLib 2.54.
If a class explicitly supports being initialized multiple times, it is recommended that the method is idempotent: multiple calls with the same arguments should return the same results. Only the first call initializes the object; further calls return the result of the first call.
One reason why a class might need to support idempotent initialization is if it is designed to be used via the singleton pattern, with a #GObjectClass.constructor that sometimes returns an existing instance. In this pattern, a caller would expect to be able to call g_initable_init() on the result of g_object_new(), regardless of whether it is in fact a new instance.
optional #GCancellable object, %NULL to ignore.
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 e_source_invoke_authenticate_finish() to get the result of the operation.
an #ENamedParameters structure with credentials to use; can be %NULL to use those from the last call
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_invoke_authenticate().
If an error occurs, the function sets error
and returns %FALSE.
a #GAsyncResult
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.
an #ENamedParameters structure with credentials to use; can be %NULL to use those from the last call
optional #GCancellable object, or %NULL
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 e_source_invoke_credentials_required_finish() to get the result of the operation.
an #ESourceCredentialsReason, why the credentials are required
PEM-encoded secure connection certificate, or an empty string
a bit-or of #GTlsCertificateFlags for secure connection certificate
a #GError with a description of the previous credentials error, or %NULL
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_invoke_credentials_required().
If an error occurs, the function sets error
and returns %FALSE.
a #GAsyncResult
Let's the client-side know that credentials are required. The reason
defines which
parameters are used. The client passed the credentials with an e_source_invoke_authenticate()
call.
The %E_SOURCE_CREDENTIALS_REASON_REQUIRED is used for the first credentials prompt, when the client can return credentials as stored from the previous success login.
The %E_SOURCE_CREDENTIALS_REASON_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 %E_SOURCE_CREDENTIALS_REASON_SSL_FAILED is used when a secured connection failed due to some server-side certificate issues.
The %E_SOURCE_CREDENTIALS_REASON_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.
an #ESourceCredentialsReason, why the credentials are required
PEM-encoded secure connection certificate, or an empty string
a bit-or of #GTlsCertificateFlags for secure connection certificate
a #GError with a description of the previous credentials error, or %NULL
optional #GCancellable object, or %NULL
Checks whether object
has a [floating][floating-ref] reference.
Checks if resolver
can be used on this system. (This is used
internally; g_proxy_resolver_get_default() will only return a proxy
resolver that returns %TRUE for this method.)
Looks into the system proxy configuration to determine what proxy,
if any, to use to connect to uri
. The returned proxy URIs are of
the form <protocol>://[user[:password]
]host:port
or
direct://
, where
If you don't know what network protocol is being used on the
socket, you should use none
as the URI protocol.
In this case, the resolver might still return a generic proxy type
(such as SOCKS), but would not return protocol-specific proxy types
(such as http).
direct://
is used when no proxy is needed.
Direct connection should not be attempted unless it is part of the
returned array of proxies.
a URI representing the destination to connect to
a #GCancellable, or %NULL
Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more details.
a URI representing the destination to connect to
a #GCancellable, or %NULL
callback to call after resolution completes
Call this function to obtain the array of proxy URIs when g_proxy_resolver_lookup_async() is complete. See g_proxy_resolver_lookup() for more details.
the result passed to your #GAsyncReadyCallback
Asynchronously looks up a password for source
. Both the default and
session keyrings are queried. This operation does not rely on the
registry service and therefore works for any #ESource -- registered
or "scratch".
When the operation is finished, callback
will be called. You can then
call e_source_lookup_password_finish() to get the result of the operation.
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_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 %NULL
but still return %TRUE. If an error occurs, the function sets error
and returns %FALSE.
a #GAsyncResult
Looks up a password for source
. Both the default and session keyrings
are queried. This operation does not rely on the registry service and
therefore works for any #ESource -- 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 %NULL
but still return %TRUE. If an error occurs, the function sets error
and returns %FALSE.
optional #GCancellable object, or %NULL
Asynchronously loads a signature from the signature file for source,
which is given by e_source_mail_signature_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 e_source_mail_signature_load_finish() to get the result of
the operation.
the I/O priority of the request
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes an operation started with e_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
with g_free() when no longer needed.
a #GAsyncResult
Loads a signature from the signature file for source,
which is
given by e_source_mail_signature_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 with g_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.
optional #GCancellable object, or %NULL
Asynchrously replaces the signature file for source
with the given
contents
of length
bytes. The signature file for source
is given
by e_source_mail_signature_get_file().
When the operation is finished, callback
will be called. You can
then call e_source_mail_signature_replace_finish() to get the result
of the operation.
the signature contents
the length of contents
in bytes
the I/O priority of the request
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes an operation started with e_source_mail_signature_replace().
a #GAsyncResult
Replaces the signature file for source
with the given contents
of length
bytes. The signature file for source
is given by
e_source_mail_signature_get_file().
the signature contents
the length of contents
in bytes
optional #GCancellable object, or %NULL
Asynchronously replaces the signature file for source
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 source
is given by e_source_mail_signature_get_file().
When the operation is finished, callback
will be called. You can
then call e_source_mail_signature_symlink_finish() to get the result
of the operation.
executable filename to link to
the I/O priority of the request
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes an operation started with e_source_mail_signature_symlink().
a #GAsyncResult
Replaces the signature file for source
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
source
is given by e_source_mail_signature_get_file().
executable filename to link to
optional #GCancellable object, or %NULL
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
the name of a property installed on the class of object
.
Emits a "notify" signal for the property specified by pspec
on object
.
This function omits the property name lookup, hence it is faster than g_object_notify().
One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:
enum
{
PROP_0,
PROP_FOO,
PROP_LAST
};
static GParamSpec *properties[PROP_LAST];
static void
my_object_class_init (MyObjectClass *klass)
{
properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
0, 100,
50,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_FOO,
properties[PROP_FOO]);
}
and then notify a change on the "foo" property with:
g_object_notify_by_pspec (self, properties[PROP_FOO]);
the #GParamSpec of a property installed on the class of object
.
Asynchronously determines what proxy, if any, to use to connect to uri
.
See e_source_proxy_lookup_sync() for more details.
When the operation is finished, callback
will be called. You can then
call e_source_proxy_lookup_finish() to get the result of the operation.
a URI representing the destination to connect to
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_proxy_lookup().
Free the returned proxy URIs with g_strfreev() when finished with them.
a #GAsyncResult
Looks into source'
s #ESourceProxy extension to determine what proxy,
if any, to use to connect to uri
. The returned proxy URIs are of the
same form described by g_proxy_resolver_lookup().
The proxy extension's #ESourceProxy:method controls how proxy URIs are determined:
When using E_PROXY_METHOD_DEFAULT,
the function will defer to the
#GProxyResolver returned by g_proxy_resolver_get_default().
When using E_PROXY_METHOD_MANUAL,
the function will configure a
#GSimpleProxyResolver from the HTTP, HTTPS, FTP and SOCKS properties,
as well as #ESourceProxy:ignore-hosts.
When using E_PROXY_METHOD_AUTO,
the function will execute a proxy
auto-config (PAC) file at #ESourceProxy:autoconfig-url.
When using E_PROXY_METHOD_NONE,
the function will only return
If source
does not have an #ESourceProxy extension, the function sets
error
to G_IO_ERROR_NOT_SUPPORTED
and returns %NULL.
Free the returned proxy URIs with g_strfreev() when finished with them.
a URI representing the destination to connect to
optional #GCancellable object, or %NULL
Returns the #GDBusObject that was passed to e_source_new().
The returned #GDBusObject is referenced for thread-safety and must be unreferenced with g_object_unref() when finished with it.
Returns the #GMainContext on which event sources for source
are to
be attached.
The returned #GMainContext is referenced for thread-safety and must be unreferenced with g_main_context_unref() when finished with it.
Increase the reference count of object,
and possibly remove the
[floating][floating-ref] reference, if object
has a floating reference.
In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.
Since GLib 2.56, the type of object
will be propagated to the return type
under the same conditions as for g_object_ref().
This is a simple way to schedule a periodic data source refresh.
Adds a timeout #GSource to context
and handles all the bookkeeping
if source'
s refresh #ESourceRefresh:enabled state or its refresh
#ESourceRefresh: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 e_source_refresh_remove_timeout() to
remove the timeout from context
. Note the ID is a private handle and
cannot be passed to g_source_remove().
a #GMainContext, or %NULL (if %NULL, the default context will be used)
function to call on each timeout
For all timeouts added with e_source_refresh_add_timeout(), invokes the #ESourceRefreshFunc callback immediately and then, if the refresh #ESourceRefresh:enabled state is TRUE, reschedules the timeout.
This function is called automatically when the #ESource switches from disabled to enabled, but can also be useful when a network connection becomes available or when waking up from hibernation or suspend.
Removes a timeout #GSource added by e_source_refresh_add_timeout().
a refresh timeout ID
Removes all timeout #GSource's added by e_source_refresh_add_timeout()
whose callback data pointer matches user_data
.
user data to match against timeout callbacks
Asynchronously creates a new remote resource by picking out relevant
details from scratch_source
. The scratch_source
must be an #ESource
with no #GDBusObject. The source
must be #ESource: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 e_source_remote_create_finish() to get the result of the operation.
an #ESource describing the resource to create
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_remote_create(). If
an error occurred, the function will set error
and return %FALSE.
a #GAsyncResult
Creates a new remote resource by picking out relevant details from
scratch_source
. The scratch_source
must be an #ESource with no
#GDBusObject. The source
must be #ESource: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.
an #ESource describing the resource to create
optional #GCancellable object, or %NULL
Asynchronously deletes the resource represented by source
from a remote
server. The source
must be #ESource:remote-deletable. This will also
delete the key file for source
and broadcast its removal to all clients,
similar to e_source_remove().
When the operation is finished, callback
will be called. You can then
call e_source_remote_delete_finish() to get the result of the operation.
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_remote_delete(). If
an error occurred, the function will set error
and return %FALSE.
a #GAsyncResult
Deletes the resource represented by source
from a remote server.
The source
must be #ESource:remote-deletable. This will also delete
the key file for source
and broadcast its removal to all clients,
similar to e_source_remove_sync().
If an error occurs, the function will set error
and return %FALSE.
optional #GCancellable object, or %NULL
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 #ESource:removable.
When the operation is finished, callback
will be called. You can then
call e_source_remove_finish() to get the result of the operation.
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_remove(). If an
error occurred, the function will set error
and return %FALSE.
a #GAsyncResult
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 #ESource:removable.
If an error occurs, the functon will set error
and return %FALSE.
optional #GCancellable object, or %NULL
Releases all references to other objects. This can be used to break reference cycles.
This function should only be called from object system implementations.
Set's current connection status of the source
.
one of the #ESourceConnectionStatus
Each object carries around a table of associations from strings to pointers. This function lets you set an association.
If the object already had an association with that name, the old association will be destroyed.
Internally, the key
is converted to a #GQuark using g_quark_from_string().
This means a copy of key
is kept permanently (even after object
has been
finalized) — so it is recommended to only use a small, bounded set of values
for key
in your program, to avoid the #GQuark storage growing unbounded.
name of the key
data to associate with that key
Sets the display name for source
. The display_name
argument must be a
valid UTF-8 string. Use the display name to represent the #ESource in a
user interface.
The internal copy of display_name
is automatically stripped of leading
and trailing whitespace.
a display name
Enables or disables source
.
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.
whether to enable source
Identifies the parent of source
by its unique identifier string.
This can only be set prior to adding source
to an #ESourceRegistry.
The internal copy of #ESource:parent is automatically stripped of leading and trailing whitespace. If the resulting string is empty, %NULL is set instead.
the UID of the parent #ESource, or %NULL
Sets a property on an object.
the name of the property to set
the value
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
name of the key
This function gets back user data pointers stored via
g_object_set_qdata() and removes the data
from object
without invoking its destroy() function (if any was
set).
Usually, calling this function is only required to update
user data pointers with a destroy notifier, for example:
void
object_add_to_user_list (GObject *object,
const gchar *new_string)
{
// the quark, naming the object data
GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
// retrieve the old string list
GList *list = g_object_steal_qdata (object, quark_string_list);
// prepend new string
list = g_list_prepend (list, g_strdup (new_string));
// this changed 'list', so we need to set it again
g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
}
static void
free_string_list (gpointer data)
{
GList *node, *list = data;
for (node = list; node; node = node->next)
g_free (node->data);
g_list_free (list);
}
Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().
A #GQuark, naming the user data pointer
Asynchronously stores a password for source
. This operation does
not rely on the registry service and therefore works for any #ESource
-- 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 returns %FALSE.
When the operation is finished, callback
will be called. You can then
call e_source_store_password_finish() to get the result of the operation.
the password to store
store permanently or just for the session
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_store_password().
a #GAsyncResult
Stores a password for source
. This operation does not rely on the
registry service and therefore works for any #ESource -- 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 returns %FALSE.
the password to store
store permanently or just for the session
optional #GCancellable object, or %NULL
Reverts the effect of a previous call to
g_object_freeze_notify(). The freeze count is decreased on object
and when it reaches zero, queued "notify" signals are emitted.
Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.
It is an error to call this function when the freeze count is zero.
Outputs the current contents of source
as a key file string.
Free the returned string with g_free().
Decreases the reference count of object
. When its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.
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 e_source_unset_last_credentials_required_arguments_finish() to get
the result of the operation.
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_unset_last_credentials_required_arguments().
If an error occurs, the function sets error
and returns %FALSE.
a #GAsyncResult
Unsets the last used arguments of the 'credentials-required' signal emission.
If an error occurs, the function sets error
and returns %FALSE.
optional #GCancellable object, or %NULL
This function essentially limits the life time of the closure
to
the life time of the object. That is, when the object is finalized,
the closure
is invalidated by calling g_closure_invalidate() on
it, in order to prevent invocations of the closure with a finalized
(nonexisting) object. Also, g_object_ref() and g_object_unref() are
added as marshal guards to the closure,
to ensure that an extra
reference count is held on object
during invocation of the
closure
. Usually, this function will be called on closures that
use this object
as closure data.
#GClosure to watch
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 #ESource:writable.
When the operation is finished, callback
will be called. You can then
call e_source_write_finish() to get the result of the operation.
optional #GCancellable object, or %NULL
a #GAsyncReadyCallback to call when the request is satisfied
Finishes the operation started with e_source_write(). If an
error occurred, the function will set error
and return %FALSE.
a #GAsyncResult
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 #ESource:writable.
If an error occurs, the functon will set error
and return %FALSE.
optional #GCancellable object, or %NULL
Find the #GParamSpec with the given name for an
interface. Generally, the interface vtable passed in as g_iface
will be the default vtable from g_type_default_interface_ref(), or,
if you know the interface has already been loaded,
g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
name of a property to look up.
Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.
This function is meant to be called from the interface's default
vtable initialization function (the class_init
member of
#GTypeInfo.) It must not be called after after class_init
has
been called for any object types implementing this interface.
If pspec
is a floating reference, it will be consumed.
any interface vtable for the interface, or the default vtable for the interface.
the #GParamSpec for the new property
Lists the properties of an interface.Generally, the interface
vtable passed in as g_iface
will be the default vtable from
g_type_default_interface_ref(), or, if you know the interface has
already been loaded, g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
Creates a new #ESource instance.
The #ESource::changed signal will be emitted from main_context
if given,
or else from the thread-default #GMainContext at the time this function is
called.
The only time the function should be called outside of #ESourceRegistry is to create a so-called "scratch" #ESource for editing in a Properties window or an account setup assistant.
FIXME: Elaborate on scratch sources.
a #GDBusObject or %NULL
a #GMainContext or %NULL
Creates a new "scratch" #ESource with a predetermined unique identifier.
The #ESource::changed signal will be emitted from main_context
if given,
or else from the thread-default #GMainContext at the time this function is
called.
a new unique identifier string
a #GMainContext or %NULL
Creates a new instance of a #GObject subtype and sets its properties.
Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.
the type id of the #GObject subtype to instantiate
an array of #GParameter
Converts a #GParamSpec name (e.g. "foo-bar" or "foo_bar") to "CamelCase" for use as a #GKeyFile key (e.g. "FooBar").
This function is made public only to aid in account migration. Applications should not need to use this.
a #GParamSpec name
Contains only private data that should be read and manipulated using the functions below.