Top |
#define | FOLKS_TYPE_BACKEND_STORE |
void | folks_backend_store_prepare () |
void | folks_backend_store_prepare_finish () |
void | folks_backend_store_load_backends () |
void | folks_backend_store_load_backends_finish () |
void | folks_backend_store_add_backend () |
FolksBackend * | folks_backend_store_dup_backend_by_name () |
GeeCollection * | folks_backend_store_list_backends () |
void | folks_backend_store_enable_backend () |
void | folks_backend_store_enable_backend_finish () |
void | folks_backend_store_disable_backend () |
void | folks_backend_store_disable_backend_finish () |
GeeMap * | folks_backend_store_get_enabled_backends () |
gboolean | folks_backend_store_get_is_prepared () |
FolksBackendStore * | folks_backend_store_dup () |
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.
#define FOLKS_TYPE_BACKEND_STORE (folks_backend_store_get_type ())
The type for FolksBackendStore.
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 occuring, 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.
struct FolksBackendStore;
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.
“enabled-backends”
property “enabled-backends” GeeMap *
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.
Flags: Read
Since 0.5.1
“is-prepared”
property“is-prepared” gboolean
Whether folks_backend_store_prepare()
has successfully completed for this store.
Flags: Read
Default value: FALSE
Since 0.3.0
“backend-available”
signalvoid user_function (FolksBackendStore *backend_store, FolksBackend *backend, gpointer user_data)
Emitted when a backend has been added to the BackendStore.
This will not be emitted until after folks_backend_store_load_backends()
has been called.
FolksBackends referenced in this signal are also included in "enabled-backends".
backend_store |
the FolksBackendStore instance that received the signal |
|
backend |
. the new FolksBackend |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last