![]() |
![]() |
![]() |
![]() |
#define | FOLKS_TYPE_BACKEND_STORE |
struct | FolksBackendStore |
struct | FolksBackendStoreClass |
The BackendStore manages the set of available Folks backends. The folks_backend_store_load_backends()
function loads all compatible and enabled backends and the "backend-available" signal notifies when these backends are ready.
void folks_backend_store_prepare (FolksBackendStore *self
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Prepare the BackendStore for use.
This must only ever be called before folks_backend_store_load_backends()
is called for the first time. If it isn't called explicitly, folks_backend_store_load_backends()
will call it.
This method is safe to call multiple times concurrently (e.g. an asynchronous call may begin between a subsequent asynchronous call beginning and finishing).
See also: folks_backend_store_prepare_finish()
self |
the FolksBackendStore instance |
|
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
Since: 0.3.0
void folks_backend_store_prepare_finish (FolksBackendStore *self
,GAsyncResult *_res_
);
Prepare the BackendStore for use.
This must only ever be called before folks_backend_store_load_backends()
is called for the first time. If it isn't called explicitly, folks_backend_store_load_backends()
will call it.
This method is safe to call multiple times concurrently (e.g. an asynchronous call may begin between a subsequent asynchronous call beginning and finishing).
See also: folks_backend_store_prepare()
Since: 0.3.0
void folks_backend_store_load_backends (FolksBackendStore *self
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Find, load, and prepare all backends which are not disabled.
Backends will be searched for in the path given by the FOLKS_BACKEND_PATH
environment variable, if it's set. If it's not set, backends will be searched for in a path set at compilation time.
This method is not safe to call multiple times concurrently.
GError will be returned in error
currently unused
See also: folks_backend_store_load_backends_finish()
self |
the FolksBackendStore instance |
|
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
void folks_backend_store_load_backends_finish (FolksBackendStore *self
,GAsyncResult *_res_
,GError **error
);
Find, load, and prepare all backends which are not disabled.
Backends will be searched for in the path given by the FOLKS_BACKEND_PATH
environment variable, if it's set. If it's not set, backends will be searched for in a path set at compilation time.
This method is not safe to call multiple times concurrently.
GError will be returned in error
currently unused
See also: folks_backend_store_load_backends()
self |
the FolksBackendStore instance |
|
_res_ |
||
error |
location to store the error occurring, or |
void folks_backend_store_add_backend (FolksBackendStore *self
,FolksBackend *backend
);
Add a new FolksBackend to the BackendStore.
FolksBackend * folks_backend_store_dup_backend_by_name (FolksBackendStore *self
,const gchar *name
);
Get a backend from the store by name. If a backend is returned, its reference count is increased.
Since: 0.3.5
GeeCollection *
folks_backend_store_list_backends (FolksBackendStore *self
);
List the currently loaded backends.
void folks_backend_store_enable_backend (FolksBackendStore *self
,const gchar *name
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Enable a backend.
Mark a backend as enabled, such that the BackendStore will always attempt to load it when folks_backend_store_load_backends()
is called. This will not load the backend if it's not currently loaded.
This method is safe to call multiple times concurrently (e.g. an asynchronous call may begin after a previous asynchronous call for the same backend name has begun and before it has finished).
If the backend is disallowed by the FOLKS_BACKENDS_ALLOWED and/or FOLKS_BACKENDS_DISABLED environment variables, this method will store the fact that it should be enabled in future, but will not enable it during this application run.
See also: folks_backend_store_enable_backend_finish()
self |
the FolksBackendStore instance |
|
name |
. the name of the backend to enable . |
[in] |
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
Since: 0.3.2
void folks_backend_store_enable_backend_finish (FolksBackendStore *self
,GAsyncResult *_res_
);
Enable a backend.
Mark a backend as enabled, such that the BackendStore will always attempt to load it when folks_backend_store_load_backends()
is called. This will not load the backend if it's not currently loaded.
This method is safe to call multiple times concurrently (e.g. an asynchronous call may begin after a previous asynchronous call for the same backend name has begun and before it has finished).
If the backend is disallowed by the FOLKS_BACKENDS_ALLOWED and/or FOLKS_BACKENDS_DISABLED environment variables, this method will store the fact that it should be enabled in future, but will not enable it during this application run.
See also: folks_backend_store_enable_backend()
Since: 0.3.2
void folks_backend_store_disable_backend (FolksBackendStore *self
,const gchar *name
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Disable a backend.
Mark a backend as disabled, such that it won't be loaded even when the client application is restarted. This will not remove the backend if it's already loaded.
This method is safe to call multiple times concurrently (e.g. an asynchronous call may begin after a previous asynchronous call for the same backend name has begun and before it has finished).
See also: folks_backend_store_disable_backend_finish()
self |
the FolksBackendStore instance |
|
name |
. the name of the backend to disable . |
[in] |
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[closure] |
Since: 0.3.2
void folks_backend_store_disable_backend_finish (FolksBackendStore *self
,GAsyncResult *_res_
);
Disable a backend.
Mark a backend as disabled, such that it won't be loaded even when the client application is restarted. This will not remove the backend if it's already loaded.
This method is safe to call multiple times concurrently (e.g. an asynchronous call may begin after a previous asynchronous call for the same backend name has begun and before it has finished).
See also: folks_backend_store_disable_backend()
Since: 0.3.2
GeeMap *
folks_backend_store_get_enabled_backends
(FolksBackendStore *self
);
Get and return the current value of the "enabled-backends" property.
The list of backends visible to this store which have not been explicitly disabled.
This list will be empty before folks_backend_store_load_backends()
has been called.
The backends in this list have been prepared and are ready to use.
Since: 0.5.1
gboolean
folks_backend_store_get_is_prepared (FolksBackendStore *self
);
Get and return the current value of the "is-prepared" property.
Whether folks_backend_store_prepare()
has successfully completed for this store.
Since: 0.3.0
FolksBackendStore *
folks_backend_store_dup (void
);
Create a new BackendStore.
#define FOLKS_TYPE_BACKEND_STORE (folks_backend_store_get_type ())
The type for FolksBackendStore.
struct FolksBackendStore { GObject parent_instance; FolksBackendStorePrivate * priv; };
Responsible for backend loading.
The BackendStore manages the set of available Folks backends. The folks_backend_store_load_backends()
function loads all compatible and enabled backends and the "backend-available" signal notifies when these backends are ready.
struct FolksBackendStoreClass { GObjectClass parent_class; };
The class structure for FOLKS_TYPE_BACKEND_STORE
. All the fields in this structure are private and should never be accessed directly.