TpfPersona

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

Functions

Properties

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

Types and Values

struct TpfPersona
struct TpfPersonaClass

Object Hierarchy

    GObject
    ╰── FolksPersona
        ╰── TpfPersona

Implemented Interfaces

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

Description

There is a one-to-one correspondence between TpfPersonas and TpContacts, although at any time the "contact" property of a persona may be null if the contact's Telepathy connection isn't available (e.g. due to being offline). In this case, the persona's properties persist from a local cache.

Functions

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.

Parameters

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);

Get and return the current value of the "is-in-contact-list" property.

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.

Parameters

self

the TpfPersona instance to query

 

Returns

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

Since: 0.3.5


tpf_persona_set_is_in_contact_list ()

void
tpf_persona_set_is_in_contact_list (TpfPersona *self,
                                    gboolean value);

Set the value of the "is-in-contact-list" property to value .

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.

Parameters

self

the TpfPersona instance to modify

 

value

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

 

Since: 0.3.5


tpf_persona_get_contact ()

TpContact *
tpf_persona_get_contact (TpfPersona *self);

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

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).

Parameters

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.

Parameters

contact

 .

the Telepathy contact of the persona

.

[in]

Returns

the persona associated with the contact, or null

Since: 0.6.6

Types and Values

struct TpfPersona

struct TpfPersona;

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

There is a one-to-one correspondence between TpfPersonas and TpContacts, although at any time the "contact" property of a persona may be null if the contact's Telepathy connection isn't available (e.g. due to being offline). In this case, the persona's properties persist from a local cache.


struct TpfPersonaClass

struct TpfPersonaClass {
	FolksPersonaClass parent_class;
};

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

Members

FolksPersonaClass parent_class;

the parent class structure

 

Property Details

The “alias” property

  “alias”                    gchar *

alias.

Flags: Read / Write

Default value: NULL


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 “call-interaction-count” property

  “call-interaction-count”   guint

call-interaction-count.

Flags: Read

Default value: 0


The “client-types” property

  “client-types”             GStrv

client-types.

Flags: Read / Write


The “contact” property

  “contact”                  TpContact *

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).

Flags: Read / Write / Construct Only


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 “groups” property

  “groups”                   GeeSet *

groups.

Flags: Read / Write


The “im-addresses” property

  “im-addresses”             GeeMultiMap *

im-addresses.

Flags: Read / Write


The “im-interaction-count” property

  “im-interaction-count”     guint

im-interaction-count.

Flags: Read

Default value: 0


The “is-favourite” property

  “is-favourite”             gboolean

is-favourite.

Flags: Read / Write

Default value: FALSE


The “is-in-contact-list” property

  “is-in-contact-list”       gboolean

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.

Flags: Read / Write

Default value: FALSE

Since: 0.3.5


The “last-call-interaction-datetime” property

  “last-call-interaction-datetime” GDateTime *

last-call-interaction-datetime.

Flags: Read


The “last-im-interaction-datetime” property

  “last-im-interaction-datetime” GDateTime *

last-im-interaction-datetime.

Flags: Read


The “linkable-properties” property

  “linkable-properties”      GStrv

linkable-properties.

Flags: Read


The “nickname” property

  “nickname”                 gchar *

nickname.

Flags: Read / Write

Default value: NULL


The “phone-numbers” property

  “phone-numbers”            GeeSet *

phone-numbers.

Flags: Read / Write


The “presence-message” property

  “presence-message”         gchar *

presence-message.

Flags: Read / Write

Default value: NULL


The “presence-status” property

  “presence-status”          gchar *

presence-status.

Flags: Read / Write

Default value: NULL


The “presence-type” property

  “presence-type”            FolksPresenceType

presence-type.

Flags: Read / Write

Default value: FOLKS_PRESENCE_TYPE_UNSET


The “structured-name” property

  “structured-name”          FolksStructuredName *

structured-name.

Flags: Read / Write


The “urls” property

  “urls”                     GeeSet *

urls.

Flags: Read / Write


The “writeable-properties” property

  “writeable-properties”     GStrv

writeable-properties.

Flags: Read