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 (see for example
FolksDummy.PersonaStore.set_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:
- public override string[] always_writeable_properties { get; }
- public override MaybeBool can_add_personas { get; }
Whether this PersonaStore can add
Folks.Personas.
- public override MaybeBool can_alias_personas { get; }
Whether this PersonaStore can set the alias of
Folks.Personas.
- public override MaybeBool can_group_personas { get; }
Whether this PersonaStore can set the groups of
Folks.Personas.
- public override MaybeBool can_remove_personas { get; }
Whether this PersonaStore can remove
Folks.Personas.
- public override bool is_prepared { get; }
Whether this PersonaStore has been prepared.
- public override bool is_quiescent { get; }
- public Type persona_type { get; set; }
Type of programmatically created personas.
- public override Map<string,Persona> personas { get; }
The Personas
exposed by this PersonaStore.
- public override string type_id { get; }
The type of persona store this is.
Delegates:
- public delegate int AddPersonaFromDetailsMock (Persona persona) throws PersonaStoreError
Type of a mock function for
Folks.PersonaStore.add_persona_from_details.
- public delegate int PrepareMock () throws PersonaStoreError
Type of a mock function for
Folks.PersonaStore.prepare.
- public delegate int RemovePersonaMock (Persona persona) throws PersonaStoreError
Type of a mock function for
Folks.PersonaStore.remove_persona.
Creation methods:
Methods:
Inherited Members:
All known members inherited from class Folks.PersonaStore
- add_persona_from_details
- always_writeable_properties
- can_add_personas
- can_alias_personas
- can_group_personas
- can_remove_personas
- detail_key
- display_name
- flush
- id
- is_prepared
- is_primary_store
- is_quiescent
- is_user_set_default
- is_writeable
- personas
- personas_changed
- prepare
- remove_persona
- removed
- trust_level
- type_id
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref