folks Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#define FOLKS_TYPE_BACKEND_STORE void folks_backend_store_prepare (FolksBackendStore *self
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); void folks_backend_store_prepare_finish (FolksBackendStore *self
,GAsyncResult *_res_
); void folks_backend_store_load_backends (FolksBackendStore *self
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); void folks_backend_store_load_backends_finish (FolksBackendStore *self
,GAsyncResult *_res_
,GError **error
); void folks_backend_store_add_backend (FolksBackendStore *self
,FolksBackend *backend
); FolksBackend * folks_backend_store_dup_backend_by_name (FolksBackendStore *self
,const gchar *name
); GeeCollection * folks_backend_store_list_backends (FolksBackendStore *self
); void folks_backend_store_enable_backend (FolksBackendStore *self
,const gchar *name
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); void folks_backend_store_enable_backend_finish (FolksBackendStore *self
,GAsyncResult *_res_
); void folks_backend_store_disable_backend (FolksBackendStore *self
,const gchar *name
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); void folks_backend_store_disable_backend_finish (FolksBackendStore *self
,GAsyncResult *_res_
); GeeMap * folks_backend_store_get_enabled_backends (FolksBackendStore *self
); gboolean folks_backend_store_get_is_prepared (FolksBackendStore *self
); FolksBackendStore * folks_backend_store_dup (void
); struct FolksBackendStore;
The BackendStore manages the set of available Folks backends. The
function loads all compatible and enabled backends and the "backend-available" signal notifies when these backends are ready.folks_backend_store_load_backends()
#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
is called for the first time. If it isn't called explicitly, folks_backend_store_load_backends()
will call it.folks_backend_store_load_backends()
See also: folks_backend_store_prepare_finish()
|
the FolksBackendStore instance |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [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
is called for the first time. If it isn't called explicitly, folks_backend_store_load_backends()
will call it.folks_backend_store_load_backends()
See also: folks_backend_store_prepare()
|
the FolksBackendStore instance |
|
a GAsyncResult |
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.
See also: folks_backend_store_load_backends_finish()
|
the FolksBackendStore instance |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [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.
See also: folks_backend_store_load_backends()
|
the FolksBackendStore instance |
|
a GAsyncResult |
|
location to store the error occuring, or NULL to ignore |
void folks_backend_store_add_backend (FolksBackendStore *self
,FolksBackend *backend
);
Add a new FolksBackend to the BackendStore.
|
the FolksBackendStore instance |
|
the FolksBackend to add. [in] |
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.
|
the FolksBackendStore instance |
|
the backend name to retrieve. [in] |
Returns : |
the backend, or `null` if none could be found |
Since 0.3.5
GeeCollection * folks_backend_store_list_backends (FolksBackendStore *self
);
List the currently loaded backends.
|
the FolksBackendStore instance |
Returns : |
a list of the backends currently in the BackendStore |
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
is called. This will not load the backend if it's not currently loaded.folks_backend_store_load_backends()
See also: folks_backend_store_enable_backend_finish()
|
the FolksBackendStore instance |
|
the name of the backend to enable. [in] |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [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
is called. This will not load the backend if it's not currently loaded.folks_backend_store_load_backends()
See also: folks_backend_store_enable_backend()
|
the FolksBackendStore instance |
|
a GAsyncResult |
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.
See also: folks_backend_store_disable_backend_finish()
|
the FolksBackendStore instance |
|
the name of the backend to disable. [in] |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [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.
See also: folks_backend_store_disable_backend()
|
the FolksBackendStore instance |
|
a GAsyncResult |
Since 0.3.2
GeeMap * folks_backend_store_get_enabled_backends
(FolksBackendStore *self
);
|
the FolksBackendStore instance to query |
Returns : |
the value of the "enabled-backends" property |
gboolean folks_backend_store_get_is_prepared (FolksBackendStore *self
);
|
the FolksBackendStore instance to query |
Returns : |
the value of the "is-prepared" property |
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
function loads all compatible and enabled backends and the "backend-available" signal notifies when these backends are ready.folks_backend_store_load_backends()
"enabled-backends"
property "enabled-backends" GeeMap* : Read
The list of backends visible to this store which have not been explicitly disabled.
This list will be empty before
has been called.folks_backend_store_load_backends()
The backends in this list have been prepared and are ready to use.
Since 0.5.1
"is-prepared"
property "is-prepared" gboolean : Read
Whether
has successfully completed for this store.
folks_backend_store_prepare()
Default value: FALSE
Since 0.3.0
"backend-available"
signalvoid user_function (FolksBackendStore *backend_store,
FolksBackend *backend,
gpointer user_data) : Run Last
Emitted when a backend has been added to the BackendStore.
This will not be emitted until after
has been called.folks_backend_store_load_backends()
FolksBackends referenced in this signal are also included in "enabled-backends".
|
the FolksBackendStore instance that received the signal |
|
the new FolksBackend |
|
user data set when the signal handler was connected. |