prepare
Description:
Prepare the Backend for use.
This connects the Backend to whichever backend-specific services it requires, and causes it to create its PersonaStores. This should be called after connecting to the Backend.persona_store_added and Backend.persona_store_removed signals, or a race condition could occur, with the signals being emitted before your code has connected to them, and PersonaStores getting "lost" as a result.
This is normally handled transparently by the IndividualAggregator.
If this function throws an error, the Backend will not be functional.
This function is guaranteed to be idempotent (since version 0.3.0).
Concurrent calls to this function from different threads will block until preparation has completed. However, concurrent calls to this function from a single thread might not, i.e. the first call will block but subsequent calls might return before the first one. (Though they will be safe in every other respect.)
Exceptions:
GLib.Error |
if preparing the backend-specific services failed — this will be a backend-specific error |
GLib.DBusError.SERVICE_UNKNOWN |
if a required D-Bus service was not installed or could not be started |
Since:
0.1.11