EdsfPersona

EdsfPersona — A persona subclass which represents a single EDS contact.

Synopsis

#define             EDSF_TYPE_PERSONA
void                edsf_persona_change_system_groups   (EdsfPersona *self,
                                                         GeeSet *system_groups,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
void                edsf_persona_change_system_groups_finish
                                                        (EdsfPersona *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);
void                edsf_persona_change_in_google_personal_group
                                                        (EdsfPersona *self,
                                                         gboolean in_personal,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
void                edsf_persona_change_in_google_personal_group_finish
                                                        (EdsfPersona *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);
#define             EDSF_PERSONA_gender_attribute_name
#define             EDSF_PERSONA_gender_male
#define             EDSF_PERSONA_gender_female
EdsfPersona *       edsf_persona_new                    (EdsfPersonaStore *store,
                                                         EContact *contact);
EContact *          edsf_persona_get_contact            (EdsfPersona *self);
const gchar *       edsf_persona_get_contact_id         (EdsfPersona *self);
GeeSet *            edsf_persona_get_system_groups      (EdsfPersona *self);
void                edsf_persona_set_system_groups      (EdsfPersona *self,
                                                         GeeSet *value);
gboolean            edsf_persona_get_in_google_personal_group
                                                        (EdsfPersona *self);
void                edsf_persona_set_in_google_personal_group
                                                        (EdsfPersona *self,
                                                         gboolean value);
struct              EdsfPersona;
struct              EdsfPersonaClass;

Object Hierarchy

  GObject
   +----FolksPersona
         +----EdsfPersona

Implemented Interfaces

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

Properties

  "anti-links"               GeeSet*               : Read / Write
  "avatar"                   GLoadableIcon*        : Read / Write
  "birthday"                 GDateTime*            : Read / Write
  "calendar-event-id"        gchar*                : Read / Write
  "contact"                  EContact*             : Read / Write / Construct Only
  "contact-id"               gchar*                : Read / Write / Construct Only
  "email-addresses"          GeeSet*               : Read / Write
  "full-name"                gchar*                : Read / Write
  "gender"                   FolksGender           : Read / Write
  "groups"                   GeeSet*               : Read / Write
  "im-addresses"             GeeMultiMap*          : Read / Write
  "in-google-personal-group" gboolean              : Read / Write
  "is-favourite"             gboolean              : Read / Write
  "linkable-properties"      GStrv                 : Read
  "local-ids"                GeeSet*               : Read / Write
  "nickname"                 gchar*                : Read / Write
  "notes"                    GeeSet*               : Read / Write
  "phone-numbers"            GeeSet*               : Read / Write
  "postal-addresses"         GeeSet*               : Read / Write
  "roles"                    GeeSet*               : Read / Write
  "structured-name"          FolksStructuredName*  : Read / Write
  "system-groups"            GeeSet*               : Read / Write
  "urls"                     GeeSet*               : Read / Write
  "web-service-addresses"    GeeMultiMap*          : Read / Write
  "writeable-properties"     GStrv                 : Read

Description

Each EdsfPersona instance represents a single EDS EContact. When the contact is modified (either by this folks client, or a different client), the EdsfPersona remains the same, but is assigned a new EContact. It then updates its properties from this new contact.

Details

EDSF_TYPE_PERSONA

#define EDSF_TYPE_PERSONA (edsf_persona_get_type ())

The type for EdsfPersona.


edsf_persona_change_system_groups ()

void                edsf_persona_change_system_groups   (EdsfPersona *self,
                                                         GeeSet *system_groups,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);

Change the contact's system groups.

The system groups are a property exposed by Google Contacts address books, and can include any combination of the following identifier: - "Contacts" - "Family" - "Friends" - "Coworkers"

Setting the system groups will also change the group membership to include the localized version of those groups, and may change the value of "in-google-personal-group".

Attempting to call this method on a persona beloging to a PersonaStore which is not Google will throw a PropertyError.

It's preferred to call this rather than setting "system-groups" directly, as this method gives error notification and will only return once the groups have been written to the relevant backing store (or the operation's failed).

FolksPropertyError will be returned in error if setting the groups failed

See also: edsf_persona_change_system_groups_finish()

self :

the EdsfPersona instance

system_groups :

the complete set of system group ids the contact should be a member of. [in]

_callback_ :

callback to call when the request is satisfied. [scope async]

_user_data_ :

the data to pass to _callback_ function. [closure]

Since 0.9.0


edsf_persona_change_system_groups_finish ()

void                edsf_persona_change_system_groups_finish
                                                        (EdsfPersona *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);

Change the contact's system groups.

The system groups are a property exposed by Google Contacts address books, and can include any combination of the following identifier: - "Contacts" - "Family" - "Friends" - "Coworkers"

Setting the system groups will also change the group membership to include the localized version of those groups, and may change the value of "in-google-personal-group".

Attempting to call this method on a persona beloging to a PersonaStore which is not Google will throw a PropertyError.

It's preferred to call this rather than setting "system-groups" directly, as this method gives error notification and will only return once the groups have been written to the relevant backing store (or the operation's failed).

FolksPropertyError will be returned in error if setting the groups failed

See also: edsf_persona_change_system_groups()

self :

the EdsfPersona instance

_res_ :

a GAsyncResult

error :

location to store the error occuring, or NULL to ignore. [error-domains FolksPropertyError]

Since 0.9.0


edsf_persona_change_in_google_personal_group ()

void                edsf_persona_change_in_google_personal_group
                                                        (EdsfPersona *self,
                                                         gboolean in_personal,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);

Change whether this contact belongs to the personal group or not.

The personal contact group is a concept that exists only in Google address books. Other backends will throw a PropertyError.

It's preferred to call this rather than setting "in-google-personal-group" directly, as this method gives error notification and will only return once the membership has been written to the relevant backing store (or the operation's failed).

FolksPropertyError will be returned in error if the address book is not Google, or if setting the property failed

See also: edsf_persona_change_in_google_personal_group_finish()

self :

the EdsfPersona instance

in_personal :

Whether to add or remove the personal group membership. [in]

_callback_ :

callback to call when the request is satisfied. [scope async]

_user_data_ :

the data to pass to _callback_ function. [closure]

Since 0.9.0


edsf_persona_change_in_google_personal_group_finish ()

void                edsf_persona_change_in_google_personal_group_finish
                                                        (EdsfPersona *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);

Change whether this contact belongs to the personal group or not.

The personal contact group is a concept that exists only in Google address books. Other backends will throw a PropertyError.

It's preferred to call this rather than setting "in-google-personal-group" directly, as this method gives error notification and will only return once the membership has been written to the relevant backing store (or the operation's failed).

FolksPropertyError will be returned in error if the address book is not Google, or if setting the property failed

See also: edsf_persona_change_in_google_personal_group()

self :

the EdsfPersona instance

_res_ :

a GAsyncResult

error :

location to store the error occuring, or NULL to ignore. [error-domains FolksPropertyError]

Since 0.9.0


EDSF_PERSONA_gender_attribute_name

#define EDSF_PERSONA_gender_attribute_name "X-GENDER"

The vCard attribute used to specify a Contact's gender

Based on: http://tools.ietf.org/html/draft-ietf-vcarddav-vcardrev-22

Note that the above document is a draft and the gender property is still considered experimental, hence the "X-" prefix in the attribute name. So this might change.

Since 0.6.0


EDSF_PERSONA_gender_male

#define EDSF_PERSONA_gender_male "M"

The value used to define the male gender for the X-GENDER vCard property.

Based on: http://tools.ietf.org/html/draft-ietf-vcarddav-vcardrev-22

Since 0.6.0


EDSF_PERSONA_gender_female

#define EDSF_PERSONA_gender_female "F"

The value used to define the female gender for the X-GENDER vCard property.

Based on: http://tools.ietf.org/html/draft-ietf-vcarddav-vcardrev-22

Since 0.6.0


edsf_persona_new ()

EdsfPersona *       edsf_persona_new                    (EdsfPersonaStore *store,
                                                         EContact *contact);

Create a new persona.

Create a new persona for the EdsfPersonaStore store, representing the EDS contact given by contact.

store :

the store which will contain the persona. [in]

contact :

the EDS contact being represented by the persona. [in]

Since 0.6.0


edsf_persona_get_contact ()

EContact *          edsf_persona_get_contact            (EdsfPersona *self);

Get and return the current value of the "contact" property.

self :

the EdsfPersona instance to query

Returns :

the value of the "contact" property

edsf_persona_get_contact_id ()

const gchar *       edsf_persona_get_contact_id         (EdsfPersona *self);

Get and return the current value of the "contact-id" property.

self :

the EdsfPersona instance to query

Returns :

the value of the "contact-id" property

Since 0.6.0


edsf_persona_get_system_groups ()

GeeSet *            edsf_persona_get_system_groups      (EdsfPersona *self);

Get and return the current value of the "system-groups" property.

self :

the EdsfPersona instance to query

Returns :

the value of the "system-groups" property

Since 0.9.0


edsf_persona_set_system_groups ()

void                edsf_persona_set_system_groups      (EdsfPersona *self,
                                                         GeeSet *value);

Set the value of the "system-groups" property to value.

self :

the EdsfPersona instance to modify

value :

the new value of the "system-groups" property

Since 0.9.0


edsf_persona_get_in_google_personal_group ()

gboolean            edsf_persona_get_in_google_personal_group
                                                        (EdsfPersona *self);

Get and return the current value of the "in-google-personal-group" property.

self :

the EdsfPersona instance to query

Returns :

the value of the "in-google-personal-group" property

Since 0.7.3


edsf_persona_set_in_google_personal_group ()

void                edsf_persona_set_in_google_personal_group
                                                        (EdsfPersona *self,
                                                         gboolean value);

Set the value of the "in-google-personal-group" property to value.

self :

the EdsfPersona instance to modify

value :

the new value of the "in-google-personal-group" property

Since 0.7.3


struct EdsfPersona

struct EdsfPersona;

A persona subclass which represents a single EDS contact.

Each EdsfPersona instance represents a single EDS EContact. When the contact is modified (either by this folks client, or a different client), the EdsfPersona remains the same, but is assigned a new EContact. It then updates its properties from this new contact.


struct EdsfPersonaClass

struct EdsfPersonaClass {
	FolksPersonaClass parent_class;
};

The class structure for EDSF_TYPE_PERSONA. All the fields in this structure are private and should never be accessed directly.

FolksPersonaClass parent_class;

the parent class structure

Property Details

The "anti-links" property

  "anti-links"               GeeSet*               : Read / Write

anti-links.


The "avatar" property

  "avatar"                   GLoadableIcon*        : Read / Write

avatar.


The "birthday" property

  "birthday"                 GDateTime*            : Read / Write

birthday.


The "calendar-event-id" property

  "calendar-event-id"        gchar*                : Read / Write

calendar-event-id.

Default value: NULL


The "contact" property

  "contact"                  EContact*             : Read / Write / Construct Only

The e-d-s contact represented by this Persona


The "contact-id" property

  "contact-id"               gchar*                : Read / Write / Construct Only

The e-d-s contact uid

Default value: NULL

Since 0.6.0


The "email-addresses" property

  "email-addresses"          GeeSet*               : Read / Write

email-addresses.


The "full-name" property

  "full-name"                gchar*                : Read / Write

full-name.

Default value: NULL


The "gender" property

  "gender"                   FolksGender           : Read / Write

gender.

Default value: FOLKS_GENDER_UNSPECIFIED


The "groups" property

  "groups"                   GeeSet*               : Read / Write

groups.


The "im-addresses" property

  "im-addresses"             GeeMultiMap*          : Read / Write

im-addresses.


The "in-google-personal-group" property

  "in-google-personal-group" gboolean              : Read / Write

Whether this contact is in the “My Contacts” section of the user’s address book, rather than the “Other” section.

Default value: FALSE

Since 0.7.3


The "is-favourite" property

  "is-favourite"             gboolean              : Read / Write

is-favourite.

Default value: FALSE


The "linkable-properties" property

  "linkable-properties"      GStrv                 : Read

linkable-properties.


The "local-ids" property

  "local-ids"                GeeSet*               : Read / Write

local-ids.


The "nickname" property

  "nickname"                 gchar*                : Read / Write

nickname.

Default value: NULL


The "notes" property

  "notes"                    GeeSet*               : Read / Write

notes.


The "phone-numbers" property

  "phone-numbers"            GeeSet*               : Read / Write

phone-numbers.


The "postal-addresses" property

  "postal-addresses"         GeeSet*               : Read / Write

postal-addresses.


The "roles" property

  "roles"                    GeeSet*               : Read / Write

roles.


The "structured-name" property

  "structured-name"          FolksStructuredName*  : Read / Write

structured-name.


The "system-groups" property

  "system-groups"            GeeSet*               : Read / Write

The complete set of system group identifiers the contact belongs to. See edsf_persona_change_system_groups() for details.

Since 0.9.0


The "urls" property

  "urls"                     GeeSet*               : Read / Write

urls.


The "web-service-addresses" property

  "web-service-addresses"    GeeMultiMap*          : Read / Write

web-service-addresses.


The "writeable-properties" property

  "writeable-properties"     GStrv                 : Read

writeable-properties.