PersonaStore
Object Hierarchy:
Description:
public class PersonaStore : PersonaStore
A persona store which allows FolksDummy.Personas to be programmatically created and
manipulated, for the purposes of testing the core of libfolks itself. This should not be used in user-visible applications.
There are two sides to this class’ interface: the methods and properties declared by Folks.PersonaStore
, which form the normal libfolks persona store API; and the mock methods and properties (such as
FolksDummy.PersonaStore.add_persona_from_details_mock) which are intended to be used by test driver code to simulate the behaviour
of a real backing store. Calls to these mock methods effect state changes in the store which are visible in the normal libfolks API. The
update_
, register_
and unregister_
prefixes and the mock
suffix are commonly used for
backing store methods.
The main action performed with a dummy persona store is to change its set of personas, adding and removing them dynamically to test
client-side behaviour. The client-side APIs (Folks.PersonaStore.add_persona_from_details and
Folks.PersonaStore.remove_persona) should not be used for this. Instead, the mock APIs should
be used: FolksDummy.PersonaStore.freeze_personas_changed
, FolksDummy.PersonaStore.register_personas,
FolksDummy.PersonaStore.unregister_personas and
FolksDummy.PersonaStore.thaw_personas_changed. These can
be used to build up complex Folks.PersonaStore.personas_changed signal emissions, which are only emitted after
the final call to
FolksDummy.PersonaStore.thaw_personas_changed.
The API in FolksDummy is unstable and may change wildly. It is designed mostly for use by
libfolks unit tests.
Since:
0.9.7
Content:
Properties:
Delegates:
- public delegate int AddPersonaFromDetailsMock (Persona persona) throws PersonaStoreError
Type of a mock function for
Folks.PersonaStore.add_persona_from_details.
- public delegate int RemovePersonaMock (Persona persona) throws PersonaStoreError
Type of a mock function for
Folks.PersonaStore.remove_persona.
- public delegate int PrepareMock () throws PersonaStoreError
Type of a mock function for
Folks.PersonaStore.prepare.
Creation methods:
Methods:
- public override async Persona? add_persona_from_details (HashTable<string,Value?> details) throws PersonaStoreError
Add a new Persona
to the PersonaStore.
- public override async void remove_persona (Persona persona) throws PersonaStoreError
Remove a Persona
from the PersonaStore.
- public override async void prepare () throws PersonaStoreError
Prepare the PersonaStore for use.
- public void update_capabilities (MaybeBool can_add_personas, MaybeBool can_alias_personas, MaybeBool can_remove_personas)
Set capabilities of the persona store.
- public void freeze_personas_changed ()
Freeze persona changes in the store.
- public void thaw_personas_changed ()
Thaw persona changes in the store.
- public void register_personas (Set<Persona> personas)
Register new personas with the persona store.
- public void unregister_personas (Set<Persona> personas)
Unregister existing personas with the persona store.
- public void reach_quiescence ()
Reach quiescence on the store.
- public void update_is_user_set_default (bool is_user_set_default)
Update the
Folks.PersonaStore.is_user_set_default property.
- public void update_trust_level (PersonaStoreTrust trust_level)
Update the Folks.PersonaStore.trust_level
property.
Inherited Members:
All known members inherited from class Folks.PersonaStore
- always_writeable_properties
- can_add_personas
- can_alias_personas
- can_group_personas
- can_remove_personas
- display_name
- id
- is_prepared
- is_primary_store
- is_quiescent
- is_user_set_default
- is_writeable
- personas
- trust_level
- type_id
- detail_key
- add_persona_from_details
- flush
- prepare
- remove_persona
- personas_changed
- removed
All known members inherited from class GLib.Object
- @new
- newv
- new_valist
- get_type
- get_class
- @ref
- unref
- ref_sink
- weak_ref
- weak_unref
- add_weak_pointer
- remove_weak_pointer
- @get
- @set
- get_property
- set_property
- get_data
- set_data
- set_data_full
- steal_data
- get_qdata
- set_qdata
- set_qdata_full
- steal_qdata
- freeze_notify
- thaw_notify
- dispose
- constructed
- notify_property
- connect
- disconnect
- add_toggle_ref
- remove_toggle_ref
- bind_property
- notify
- ref_count