TpfPersona

TpfPersona — A persona subclass which represents a single instant messaging contact from Telepathy.

Synopsis

#define             TPF_TYPE_PERSONA
TpfPersona *        tpf_persona_new                     (TpContact *contact,
                                                         TpfPersonaStore *store);
gboolean            tpf_persona_get_is_in_contact_list  (TpfPersona *self);
void                tpf_persona_set_is_in_contact_list  (TpfPersona *self,
                                                         gboolean value);
TpContact *         tpf_persona_get_contact             (TpfPersona *self);
TpfPersona *        tpf_persona_dup_for_contact         (TpContact *contact);
struct              TpfPersona;

Object Hierarchy

  GObject
   +----FolksPersona
         +----TpfPersona

Implemented Interfaces

TpfPersona implements FolksAliasDetails, FolksAvatarDetails, FolksBirthdayDetails, FolksEmailDetails, FolksFavouriteDetails, FolksGroupDetails, FolksImDetails, FolksNameDetails, FolksPhoneDetails, FolksPresenceDetails and FolksUrlDetails.

Properties

  "alias"                    gchar*                : Read / Write
  "avatar"                   GLoadableIcon*        : Read / Write
  "birthday"                 GDateTime*            : Read / Write
  "calendar-event-id"        gchar*                : Read / Write
  "contact"                  TpContact*            : Read / Write / Construct Only
  "email-addresses"          GeeSet*               : Read / Write
  "full-name"                gchar*                : Read / Write
  "groups"                   GeeSet*               : Read / Write
  "im-addresses"             GeeMultiMap*          : Read / Write
  "is-favourite"             gboolean              : Read / Write
  "is-in-contact-list"       gboolean              : Read / Write
  "linkable-properties"      GStrv                 : Read
  "nickname"                 gchar*                : Read / Write
  "phone-numbers"            GeeSet*               : Read / Write
  "presence-message"         gchar*                : Read / Write
  "presence-status"          gchar*                : Read / Write
  "presence-type"            FolksPresenceType     : Read / Write
  "structured-name"          FolksStructuredName*  : Read / Write
  "urls"                     GeeSet*               : Read / Write
  "writeable-properties"     GStrv                 : Read

Description

Details

TPF_TYPE_PERSONA

#define TPF_TYPE_PERSONA (tpf_persona_get_type ())

The type for TpfPersona.


tpf_persona_new ()

TpfPersona *        tpf_persona_new                     (TpContact *contact,
                                                         TpfPersonaStore *store);

Create a new persona.

Create a new persona for the TpfPersonaStore `store`, representing the Telepathy contact given by `contact`.

contact :

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

store :

the persona store to place the persona in. [in]

tpf_persona_get_is_in_contact_list ()

gboolean            tpf_persona_get_is_in_contact_list  (TpfPersona *self);

self :

the TpfPersona instance to query

Returns :

the value of the "is-in-contact-list" property

tpf_persona_set_is_in_contact_list ()

void                tpf_persona_set_is_in_contact_list  (TpfPersona *self,
                                                         gboolean value);

self :

the TpfPersona instance to modify

value :

the new value of the "is-in-contact-list" property

tpf_persona_get_contact ()

TpContact *         tpf_persona_get_contact             (TpfPersona *self);

self :

the TpfPersona instance to query

Returns :

the value of the "contact" property

tpf_persona_dup_for_contact ()

TpfPersona *        tpf_persona_dup_for_contact         (TpContact *contact);

Look up a TpfPersona by its TpContact.

If the TpAccount for the contact's TpConnection is `null`, or if a TpfPersonaStore can't be found for that account, `null` will be returned. Otherwise, if a TpfPersona already exists for the given contact, that will be returned; if one doesn't exist a new one will be created and returned. In this case, the TpfPersona will be added to the TpfPersonaStore associated with the account, and will be removed when `contact` is destroyed.

contact :

the Telepathy contact of the persona. [in]

Returns :

the persona associated with the contact, or `null`

Since 0.6.6


struct TpfPersona

struct TpfPersona;

A persona subclass which represents a single instant messaging contact from Telepathy.

Property Details

The "alias" property

  "alias"                    gchar*                : Read / Write

alias.

Default value: NULL


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"                  TpContact*            : Read / Write / Construct Only

The Telepathy contact represented by this persona.

Note that this may be `null` if the TpfPersonaStore providing this tpf_persona_new() isn't currently available (e.g. due to not being connected to the network). In this case, most other properties of the tpf_persona_new() are being retrieved from a cache and may not be current (though there's no way to tell this).


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 "groups" property

  "groups"                   GeeSet*               : Read / Write

groups.


The "im-addresses" property

  "im-addresses"             GeeMultiMap*          : Read / Write

im-addresses.


The "is-favourite" property

  "is-favourite"             gboolean              : Read / Write

is-favourite.

Default value: FALSE


The "is-in-contact-list" property

  "is-in-contact-list"       gboolean              : Read / Write

Whether the Persona is in the user's contact list.

This will be true for most FolksPersonas, but may not be true for personas where "is-user" is true. If it's false in this case, it means that the persona has been retrieved from the Telepathy connection, but has not been added to the user's contact list.

Default value: FALSE

Since 0.3.5


The "linkable-properties" property

  "linkable-properties"      GStrv                 : Read

linkable-properties.


The "nickname" property

  "nickname"                 gchar*                : Read / Write

nickname.

Default value: NULL


The "phone-numbers" property

  "phone-numbers"            GeeSet*               : Read / Write

phone-numbers.


The "presence-message" property

  "presence-message"         gchar*                : Read / Write

presence-message.

Default value: NULL


The "presence-status" property

  "presence-status"          gchar*                : Read / Write

presence-status.

Default value: NULL


The "presence-type" property

  "presence-type"            FolksPresenceType     : Read / Write

presence-type.

Default value: FOLKS_PRESENCE_TYPE_UNSET


The "structured-name" property

  "structured-name"          FolksStructuredName*  : Read / Write

structured-name.


The "urls" property

  "urls"                     GeeSet*               : Read / Write

urls.


The "writeable-properties" property

  "writeable-properties"     GStrv                 : Read

writeable-properties.