Top |
FolksDummyFullPersonaFolksDummyFullPersona — A persona subclass representing a single ‘full’ contact. |
GeeSet * | anti-links | Read / Write |
GLoadableIcon * | avatar | Read / Write |
GDateTime * | birthday | Read / Write |
gchar * | calendar-event-id | Read / Write |
GeeSet * | email-addresses | Read / Write |
gchar * | full-name | Read / Write |
FolksGender | gender | Read / Write |
GeeSet * | groups | Read / Write |
GeeMultiMap * | im-addresses | Read / Write |
gboolean | is-favourite | Read / Write |
GeeSet * | local-ids | Read / Write |
gchar * | nickname | Read / Write |
GeeSet * | notes | Read / Write |
GeeSet * | phone-numbers | Read / Write |
GeeSet * | postal-addresses | Read / Write |
GeeSet * | roles | Read / Write |
FolksStructuredName * | structured-name | Read / Write |
GeeSet * | urls | Read / Write |
GeeMultiMap * | web-service-addresses | Read / Write |
FolksDummyFullPersona implements FolksAntiLinkable, FolksAvatarDetails, FolksBirthdayDetails, FolksEmailDetails, FolksFavouriteDetails, FolksGenderDetails, FolksGroupDetails, FolksImDetails, FolksLocalIdDetails, FolksNameDetails, FolksNoteDetails, FolksPhoneDetails, FolksRoleDetails, FolksUrlDetails, FolksPostalAddressDetails and FolksWebServiceDetails.
This mocks up a ‘full’ persona which implements all the available property interfaces provided by libfolks. This is in contrast with FolksDummyPersona, which provides a base class implementing none of libfolks’ interfaces.
The full dummy persona can be used to simulate a persona from most libfolks backends, if writing a custom FolksDummyPersona subclass is not an option.
There are two sides to this class’ interface: the normal methods required by the libfolks ‘details’ interfaces, such as
, and the backend methods which should be called by test driver code to simulate changes in the backing store providing this persona, such as folks_gender_details_change_gender()
folks_dummy_full_persona_update_gender()
. For example, test driver code should call folks_dummy_full_persona_update_nickname()
to simulate the user editing a contact’s nickname in an online address book which is being exposed to libfolks. The update_
, 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_FULL_PERSONA (folks_dummy_full_persona_get_type ())
The type for FolksDummyFullPersona.
void folks_dummy_full_persona_update_gender (FolksDummyFullPersona *self
,FolksGender gender
);
Update persona's gender.
This simulates a backing-store-side update of the persona's "gender" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_calendar_event_id (FolksDummyFullPersona *self
,const gchar *calendar_event_id
);
Update persona's birthday calendar event ID.
This simulates a backing-store-side update of the persona's "calendar-event-id" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
self |
the FolksDummyFullPersona instance |
|
calendar_event_id |
. persona's new birthday calendar event ID . |
[in][allow-none] |
Since: 0.9.7
void folks_dummy_full_persona_update_birthday (FolksDummyFullPersona *self
,GDateTime *birthday
);
Update persona's birthday.
This simulates a backing-store-side update of the persona's "birthday" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
self |
the FolksDummyFullPersona instance |
|
birthday |
. persona's new birthday . |
[in][allow-none] |
Since: 0.9.7
void folks_dummy_full_persona_update_roles (FolksDummyFullPersona *self
,GeeSet *roles
);
Update persona's roles.
This simulates a backing-store-side update of the persona's "roles" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_groups (FolksDummyFullPersona *self
,GeeSet *groups
);
Update persona's groups.
This simulates a backing-store-side update of the persona's "groups" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_web_service_addresses (FolksDummyFullPersona *self
,GeeMultiMap *web_service_addresses
);
Update persona's web service addresses.
This simulates a backing-store-side update of the persona's "web-service-addresses" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
self |
the FolksDummyFullPersona instance |
|
web_service_addresses |
. persona's new web service addresses . |
[in] |
Since: 0.9.7
void folks_dummy_full_persona_update_email_addresses (FolksDummyFullPersona *self
,GeeSet *email_addresses
);
Update persona's e-mail addresses.
This simulates a backing-store-side update of the persona's "email-addresses" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
self |
the FolksDummyFullPersona instance |
|
email_addresses |
. persona's new e-mail addresses . |
[in] |
Since: 0.9.7
void folks_dummy_full_persona_update_notes (FolksDummyFullPersona *self
,GeeSet *notes
);
Update persona's notes.
This simulates a backing-store-side update of the persona's "notes" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_full_name (FolksDummyFullPersona *self
,const gchar *full_name
);
Update persona's full name.
This simulates a backing-store-side update of the persona's "full-name" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_nickname (FolksDummyFullPersona *self
,const gchar *nickname
);
Update persona's nickname.
This simulates a backing-store-side update of the persona's "nickname" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_structured_name (FolksDummyFullPersona *self
,FolksStructuredName *structured_name
);
Update persona's structured name.
This simulates a backing-store-side update of the persona's "structured-name" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
self |
the FolksDummyFullPersona instance |
|
structured_name |
. persona's new structured name . |
[in][allow-none] |
Since: 0.9.7
void folks_dummy_full_persona_update_avatar (FolksDummyFullPersona *self
,GLoadableIcon *avatar
);
Update persona's avatar.
This simulates a backing-store-side update of the persona's "avatar" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_urls (FolksDummyFullPersona *self
,GeeSet *urls
);
Update persona's URIs.
This simulates a backing-store-side update of the persona's "urls" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_im_addresses (FolksDummyFullPersona *self
,GeeMultiMap *im_addresses
);
Update persona's IM addresses.
This simulates a backing-store-side update of the persona's "im-addresses" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_phone_numbers (FolksDummyFullPersona *self
,GeeSet *phone_numbers
);
Update persona's phone numbers.
This simulates a backing-store-side update of the persona's "phone-numbers" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
self |
the FolksDummyFullPersona instance |
|
phone_numbers |
. persona's new phone numbers . |
[in] |
Since: 0.9.7
void folks_dummy_full_persona_update_postal_addresses (FolksDummyFullPersona *self
,GeeSet *postal_addresses
);
Update persona's postal addresses.
This simulates a backing-store-side update of the persona's "postal-addresses" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
self |
the FolksDummyFullPersona instance |
|
postal_addresses |
. persona's new postal addresses . |
[in] |
Since: 0.9.7
void folks_dummy_full_persona_update_local_ids (FolksDummyFullPersona *self
,GeeSet *local_ids
);
Update persona's local IDs.
This simulates a backing-store-side update of the persona's "local-ids" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
void folks_dummy_full_persona_update_is_favourite (FolksDummyFullPersona *self
,gboolean is_favourite
);
Update persona's status as a favourite.
This simulates a backing-store-side update of the persona's "is-favourite" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
self |
the FolksDummyFullPersona instance |
|
is_favourite |
. persona's new status as a favourite . |
[in] |
Since: 0.9.7
void folks_dummy_full_persona_update_anti_links (FolksDummyFullPersona *self
,GeeSet *anti_links
);
Update persona's anti-links.
This simulates a backing-store-side update of the persona's "anti-links" property. It is intended to be used for testing code which consumes this property. If the property value changes, this results in a property change notification on the persona.
Since: 0.9.7
FolksDummyFullPersona * folks_dummy_full_persona_new (FolksDummyPersonaStore *store
,const gchar *contact_id
,gboolean is_user
,gchar **linkable_properties
,int linkable_properties_length1
);
Create a new ‘full’ persona.
Create a new persona for the FolksDummyPersonaStore store
, with the given construct-only properties.
store |
. the store which will contain the persona . |
[in] |
contact_id |
. a unique free-form string identifier for the persona . |
[in] |
is_user |
.
. |
[in] |
linkable_properties |
. an array of names of the properties which should be used for linking this persona to others . |
[in][array length=linkable_properties_length1] |
linkable_properties_length1 |
length of the |
Since: 0.9.7
struct FolksDummyFullPersona;
A persona subclass representing a single ‘full’ contact.
This mocks up a ‘full’ persona which implements all the available property interfaces provided by libfolks. This is in contrast with FolksDummyPersona, which provides a base class implementing none of libfolks’ interfaces.
The full dummy persona can be used to simulate a persona from most libfolks backends, if writing a custom FolksDummyPersona subclass is not an option.
There are two sides to this class’ interface: the normal methods required by the libfolks ‘details’ interfaces, such as
, and the backend methods which should be called by test driver code to simulate changes in the backing store providing this persona, such as folks_gender_details_change_gender()
folks_dummy_full_persona_update_gender()
. For example, test driver code should call folks_dummy_full_persona_update_nickname()
to simulate the user editing a contact’s nickname in an online address book which is being exposed to libfolks. The update_
, 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 FolksDummyFullPersonaClass { FolksDummyPersonaClass parent_class; };
The class structure for FOLKS_DUMMY_TYPE_FULL_PERSONA
. All the fields in this structure are private and should never be accessed directly.
“calendar-event-id”
property“calendar-event-id” gchar *
calendar-event-id.
Flags: Read / Write
Default value: NULL
“gender”
property “gender” FolksGender
gender.
Flags: Read / Write
Default value: FOLKS_GENDER_UNSPECIFIED
“is-favourite”
property“is-favourite” gboolean
is-favourite.
Flags: Read / Write
Default value: FALSE
“structured-name”
property “structured-name” FolksStructuredName *
structured-name.
Flags: Read / Write