Top |
FolksDummyBackendFolksDummyBackend — A backend which allows FolksDummyPersonaStores and FolksDummyPersonas to be programmatically created and manipulated, for the purposes of testing the core of libfolks itself. |
gboolean | is-prepared | Read |
gboolean | is-quiescent | Read |
gchar * | name | Read |
GeeMap * | persona-stores | Read |
This backend is not meant to be enabled in production use. The methods on FolksDummyBackend (and other classes) for programmatically manipulating the backend's state are considered internal to libfolks and are not stable.
This backend maintains two sets of persona stores: the set of all persona stores, and the set of enabled persona stores (which must be a subset of the former). folks_dummy_backend_register_persona_stores()
adds persona stores to the set of all stores. Optionally it also enables them, adding them to the set of enabled stores. The set of persona stores advertised by the backend as "persona-stores" is the set of enabled stores. libfolks may internally enable or disable stores using
, folks_backend_enable_persona_store()
and folks_backend_disable_persona_store()
. The folks_backend_set_persona_stores()
register_
and unregister_
prefixes are commonly used for backend methods.
The API in FolksDummy is unstable and may change wildly. It is designed mostly for use by libfolks unit tests.
#define FOLKS_DUMMY_TYPE_BACKEND (folks_dummy_backend_get_type ())
The type for FolksDummyBackend.
void folks_dummy_backend_register_persona_stores (FolksDummyBackend *self
,GeeSet *stores
,gboolean enable_stores
);
Register and enable some FolksDummyPersonaStores.
For each of the persona stores in stores
, register it with this backend. If enable_stores
is true
, added stores will also be enabled, emitting "persona-store-added" for each newly-enabled store. After all addition signals are emitted, a change notification for "persona-stores" will be emitted (but only if at least one addition signal is emitted).
Persona stores are identified by their "id"; if a store in stores
has the same ID as a store previously registered through this method, the duplicate will be ignored (so "persona-store-added" won't be emitted for that store).
Persona stores must be instances of FolksDummyPersonaStore or subclasses of it, allowing for different persona store implementations to be tested.
self |
the FolksDummyBackend instance |
|
stores |
. set of persona stores to register . |
[in] |
enable_stores |
. whether to automatically enable the stores . |
[in] |
Since: 0.9.7
void folks_dummy_backend_unregister_persona_stores (FolksDummyBackend *self
,GeeSet *stores
);
Disable and unregister some FolksDummyPersonaStores.
For each of the persona stores in stores
, disable it (if it was enabled) and unregister it from the backend so that it cannot be re-enabled using
or folks_backend_enable_persona_store()
.folks_backend_set_persona_stores()
"persona-store-removed" will be emitted for all persona stores in stores
which were previously enabled. After all removal signals are emitted, a change notification for "persona-stores" will be emitted (but only if at least one removal signal is emitted).
Since: 0.9.7
struct FolksDummyBackend;
A backend which allows FolksDummyPersonaStores and FolksDummyPersonas to be programmatically created and manipulated, for the purposes of testing the core of libfolks itself.
This backend is not meant to be enabled in production use. The methods on FolksDummyBackend (and other classes) for programmatically manipulating the backend's state are considered internal to libfolks and are not stable.
This backend maintains two sets of persona stores: the set of all persona stores, and the set of enabled persona stores (which must be a subset of the former). folks_dummy_backend_register_persona_stores()
adds persona stores to the set of all stores. Optionally it also enables them, adding them to the set of enabled stores. The set of persona stores advertised by the backend as "persona-stores" is the set of enabled stores. libfolks may internally enable or disable stores using
, folks_backend_enable_persona_store()
and folks_backend_disable_persona_store()
. The folks_backend_set_persona_stores()
register_
and unregister_
prefixes are commonly used for backend methods.
The API in FolksDummy is unstable and may change wildly. It is designed mostly for use by libfolks unit tests.
Since: 0.9.7
struct FolksDummyBackendClass { FolksBackendClass parent_class; };
The class structure for FOLKS_DUMMY_TYPE_BACKEND
. All the fields in this structure are private and should never be accessed directly.