FolksDummyFullPersona

FolksDummyFullPersona — A persona subclass representing a single ‘full’ contact.

Functions

Properties

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

Types and Values

Object Hierarchy

    GObject
    ╰── FolksPersona
        ╰── FolksDummyPersona
            ╰── FolksDummyFullPersona

Implemented Interfaces

FolksDummyFullPersona implements FolksAntiLinkable, FolksAvatarDetails, FolksBirthdayDetails, FolksEmailDetails, FolksFavouriteDetails, FolksGenderDetails, FolksGroupDetails, FolksImDetails, FolksLocalIdDetails, FolksNameDetails, FolksNoteDetails, FolksPhoneDetails, FolksRoleDetails, FolksUrlDetails, FolksPostalAddressDetails and FolksWebServiceDetails.

Description

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 folks_gender_details_change_gender(), 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_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.

Functions

FOLKS_DUMMY_TYPE_FULL_PERSONA

#define FOLKS_DUMMY_TYPE_FULL_PERSONA (folks_dummy_full_persona_get_type ())

The type for FolksDummyFullPersona.


folks_dummy_full_persona_update_gender ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

gender

 .

persona's new gender

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_calendar_event_id ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

calendar_event_id

 .

persona's new birthday calendar event ID

.

[in][allow-none]

Since: 0.9.7


folks_dummy_full_persona_update_birthday ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

birthday

 .

persona's new birthday

.

[in][allow-none]

Since: 0.9.7


folks_dummy_full_persona_update_roles ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

roles

 .

persona's new roles

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_groups ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

groups

 .

persona's new groups

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_web_service_addresses ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

web_service_addresses

 .

persona's new web service addresses

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_email_addresses ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

email_addresses

 .

persona's new e-mail addresses

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_notes ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

notes

 .

persona's new notes

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_full_name ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

full_name

 .

persona's new full name

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_nickname ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

nickname

 .

persona's new nickname

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_structured_name ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

structured_name

 .

persona's new structured name

.

[in][allow-none]

Since: 0.9.7


folks_dummy_full_persona_update_avatar ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

avatar

 .

persona's new avatar

.

[in][allow-none]

Since: 0.9.7


folks_dummy_full_persona_update_urls ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

urls

 .

persona's new URIs

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_im_addresses ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

im_addresses

 .

persona's new IM addresses

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_phone_numbers ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

phone_numbers

 .

persona's new phone numbers

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_postal_addresses ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

postal_addresses

 .

persona's new postal addresses

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_local_ids ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

local_ids

 .

persona's new local IDs

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_is_favourite ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

is_favourite

 .

persona's new status as a favourite

.

[in]

Since: 0.9.7


folks_dummy_full_persona_update_anti_links ()

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.

Parameters

self

the FolksDummyFullPersona instance

 

anti_links

 .

persona's new anti-links

.

[in]

Since: 0.9.7


folks_dummy_full_persona_new ()

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.

Parameters

store

 .

the store which will contain the persona

.

[in]

contact_id

 .

a unique free-form string identifier for the persona

.

[in]

is_user

 .

true if the persona represents the user, false otherwise

.

[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 linkable_properties array

 

Since: 0.9.7

Types and Values

struct FolksDummyFullPersona

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 folks_gender_details_change_gender(), 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_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

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.

Members

FolksDummyPersonaClass parent_class;

the parent class structure

 

Property Details

The “anti-links” property

  “anti-links”               GeeSet *

anti-links.

Flags: Read / Write


The “avatar” property

  “avatar”                   GLoadableIcon *

avatar.

Flags: Read / Write


The “birthday” property

  “birthday”                 GDateTime *

birthday.

Flags: Read / Write


The “calendar-event-id” property

  “calendar-event-id”        gchar *

calendar-event-id.

Flags: Read / Write

Default value: NULL


The “email-addresses” property

  “email-addresses”          GeeSet *

email-addresses.

Flags: Read / Write


The “full-name” property

  “full-name”                gchar *

full-name.

Flags: Read / Write

Default value: NULL


The “gender” property

  “gender”                   FolksGender

gender.

Flags: Read / Write

Default value: FOLKS_GENDER_UNSPECIFIED


The “groups” property

  “groups”                   GeeSet *

groups.

Flags: Read / Write


The “im-addresses” property

  “im-addresses”             GeeMultiMap *

im-addresses.

Flags: Read / Write


The “is-favourite” property

  “is-favourite”             gboolean

is-favourite.

Flags: Read / Write

Default value: FALSE


The “local-ids” property

  “local-ids”                GeeSet *

local-ids.

Flags: Read / Write


The “nickname” property

  “nickname”                 gchar *

nickname.

Flags: Read / Write

Default value: NULL


The “notes” property

  “notes”                    GeeSet *

notes.

Flags: Read / Write


The “phone-numbers” property

  “phone-numbers”            GeeSet *

phone-numbers.

Flags: Read / Write


The “postal-addresses” property

  “postal-addresses”         GeeSet *

postal-addresses.

Flags: Read / Write


The “roles” property

  “roles”                    GeeSet *

roles.

Flags: Read / Write


The “structured-name” property

  “structured-name”          FolksStructuredName *

structured-name.

Flags: Read / Write


The “urls” property

  “urls”                     GeeSet *

urls.

Flags: Read / Write


The “web-service-addresses” property

  “web-service-addresses”    GeeMultiMap *

web-service-addresses.

Flags: Read / Write