folks Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
FolksIndividualFolksIndividual — A physical person, aggregated from the various FolksPersonas the person might have, such as their different IM addresses or vCard entries. |
#define FOLKS_TYPE_INDIVIDUAL FolksIndividual * folks_individual_new (GeeSet *personas
); FolksTrustLevel folks_individual_get_trust_level (FolksIndividual *self
); gboolean folks_individual_get_is_user (FolksIndividual *self
); const gchar * folks_individual_get_id (FolksIndividual *self
); GeeSet * folks_individual_get_personas (FolksIndividual *self
); void folks_individual_set_personas (FolksIndividual *self
,GeeSet *value
); struct FolksIndividual; enum FolksTrustLevel;
FolksIndividual implements FolksAliasDetails, FolksAvatarDetails, FolksBirthdayDetails, FolksEmailDetails, FolksFavouriteDetails, FolksGenderDetails, FolksGroupDetails, FolksImDetails, FolksLocalIdDetails, FolksNameDetails, FolksNoteDetails, FolksPresenceDetails, FolksPhoneDetails, FolksPostalAddressDetails, FolksRoleDetails, FolksUrlDetails and FolksWebServiceDetails.
"alias" gchar* : Read / Write "avatar" GLoadableIcon* : Read / Write "birthday" GDateTime* : Read / Write "calendar-event-id" gchar* : Read / Write "email-addresses" GeeSet* : Read / Write "full-name" gchar* : Read / Write "gender" FolksGender : Read / Write "groups" GeeSet* : Read / Write "id" gchar* : Read "im-addresses" GeeMultiMap* : Read / Write "is-favourite" gboolean : Read / Write "is-user" gboolean : Read "local-ids" GeeSet* : Read / Write "nickname" gchar* : Read / Write "notes" GeeSet* : Read / Write "personas" GeeSet* : Read / Write "phone-numbers" GeeSet* : Read / Write "postal-addresses" GeeSet* : Read / Write "presence-message" gchar* : Read / Write "presence-status" gchar* : Read / Write "presence-type" FolksPresenceType : Read / Write "roles" GeeSet* : Read / Write "structured-name" FolksStructuredName* : Read / Write "trust-level" FolksTrustLevel : Read "urls" GeeSet* : Read / Write "web-service-addresses" GeeMultiMap* : Read / Write
When choosing the values of single-valued properties (such as "alias" and "avatar"; but not multi-valued properties such as "groups" and "im-addresses") from the FolksPersonas in the individual to present as the values of those properties of the individual, it is guaranteed that if the individual contains a persona from the primary persona store (see "primary-store"), its property values will be chosen above all others. This means that any changes to property values made through folks (which are normally written to the primary store) will always be used by
s.folks_individual_new()
No further guarantees are made about the order of preference used for choosing which property values to use for the
, other than that the order may vary between properties, but is guaranteed to be stable for a given property.folks_individual_new()
#define FOLKS_TYPE_INDIVIDUAL (folks_individual_get_type ())
The type for FolksIndividual.
FolksIndividual * folks_individual_new (GeeSet *personas
);
Create a new Individual.
The Individual can optionally be seeded with the FolksPersonas in `personas`. Otherwise, it will have to have personas added using the "personas" property after construction.
|
a list of FolksPersonas to initialise the with, or `null`. [in][allow-none]
|
Returns : |
a new Individual |
Since 0.5.1
FolksTrustLevel folks_individual_get_trust_level (FolksIndividual *self
);
|
the FolksIndividual instance to query |
Returns : |
the value of the "trust-level" property |
gboolean folks_individual_get_is_user (FolksIndividual *self
);
|
the FolksIndividual instance to query |
Returns : |
the value of the "is-user" property |
const gchar * folks_individual_get_id (FolksIndividual *self
);
|
the FolksIndividual instance to query |
Returns : |
the value of the "id" property |
GeeSet * folks_individual_get_personas (FolksIndividual *self
);
|
the FolksIndividual instance to query |
Returns : |
the value of the "personas" property |
void folks_individual_set_personas (FolksIndividual *self
,GeeSet *value
);
|
the FolksIndividual instance to modify |
|
the new value of the "personas" property |
struct FolksIndividual;
A physical person, aggregated from the various FolksPersonas the person might have, such as their different IM addresses or vCard entries.
When choosing the values of single-valued properties (such as "alias" and "avatar"; but not multi-valued properties such as "groups" and "im-addresses") from the FolksPersonas in the individual to present as the values of those properties of the individual, it is guaranteed that if the individual contains a persona from the primary persona store (see "primary-store"), its property values will be chosen above all others. This means that any changes to property values made through folks (which are normally written to the primary store) will always be used by
s.folks_individual_new()
No further guarantees are made about the order of preference used for choosing which property values to use for the
, other than that the order may vary between properties, but is guaranteed to be stable for a given property.folks_individual_new()
typedef enum { FOLKS_TRUST_LEVEL_NONE, FOLKS_TRUST_LEVEL_PERSONAS } FolksTrustLevel;
Trust level for an FolksIndividual for use in the UI.
The FolksIndividual's FolksPersonas aren't trusted at all. This is the trust level for an FolksIndividual which contains one or more FolksPersonas which cannot be guaranteed to be the same FolksPersonas as were originally linked together. For example, an FolksIndividual containing a link-local XMPP FolksPersona would have this trust level, since someone else could easily spoof the link-local XMPP FolksPersona's identity. |
|
The FolksIndividual's FolksPersonas are trusted. This trust level is for FolksIndividuals where it can be guaranteed that all the FolksPersonas are the same ones as when they were originally linked together. Note that this doesn't guarantee that the user who behind each FolksPersona is who they claim to be. |
Since 0.1.15
"calendar-event-id"
property "calendar-event-id" gchar* : Read / Write
calendar-event-id.
Default value: NULL
"gender"
property"gender" FolksGender : Read / Write
gender.
Default value: FOLKS_GENDER_UNSPECIFIED
"id"
property "id" gchar* : Read
A unique identifier for the Individual.
This uniquely identifies the Individual, and persists across FolksIndividualAggregator instances. It may not persist across linking the Individual with other Individuals.
This is an opaque string and has no structure.
If an identifier is required which will be used for a long-lived link between different stored data, it may be more desirable to use the "uid" of the most relevant FolksPersona in the Individual instead. For example, if storing references to Individuals who are tagged in a photo, it may be safer to store the UID of the Persona whose backend provided the photo (e.g. Facebook).
Default value: NULL
"is-favourite"
property "is-favourite" gboolean : Read / Write
is-favourite.
Default value: FALSE
"is-user"
property "is-user" gboolean : Read
Whether the Individual is the user.
Iff the Individual represents the user – the person who owns the account in the backend for each FolksPersona in the Individual – this is `true`.
It is not guaranteed that every FolksPersona in the Individual has its "is-user" set to the same value as the Individual. For example, the user could own two Telepathy accounts, and have added the other account as a contact in each account. The accounts will expose a FolksPersona for the user (which will have "is-user" set to `true`) and a FolksPersona for the contact for the other account (which will have "is-user" set to `false`).
It is guaranteed that iff this property is set to `true` on an Individual, there will be at least one FolksPersona in the Individual with its "is-user" set to `true`.
It is guaranteed that there will only ever be one Individual with this property set to `true`.
Default value: FALSE
Since 0.3.0
"personas"
property "personas" GeeSet* : Read / Write
The set of FolksPersonas encapsulated by this Individual.
No order is specified over the set of personas, as such an order may be different across each of the properties implemented by the personas (e.g. should they be ordered by presence, name, star sign, etc.?).
Changing the set of personas may cause updates to the aggregated properties provided by the Individual, resulting in property notifications for them.
Changing the set of personas will not cause permanent linking/unlinking of the added/removed personas to/from this Individual. To do that, call
or folks_individual_aggregator_link_personas()
, which will ensure the link changes are written to the appropriate backend.folks_individual_aggregator_unlink_individual()
Since 0.5.1
"presence-message"
property "presence-message" gchar* : Read / Write
presence-message.
Default value: NULL
"presence-status"
property "presence-status" gchar* : Read / Write
presence-status.
Default value: NULL
"presence-type"
property"presence-type" FolksPresenceType : Read / Write
presence-type.
Default value: FOLKS_PRESENCE_TYPE_UNSET
"structured-name"
property"structured-name" FolksStructuredName* : Read / Write
structured-name.
"trust-level"
property"trust-level" FolksTrustLevel : Read
The trust level of the Individual.
This specifies how far the Individual can be trusted to be who it claims to be. See the descriptions for the elements of FolksTrustLevel.
Clients should not allow linking of Individuals who have a trust level of TrustLevel.NONE.
Default value: FOLKS_TRUST_LEVEL_NONE
Since 0.1.15
"personas-changed"
signalvoid user_function (FolksIndividual *individual,
GeeSet *added,
GeeSet *removed,
gpointer user_data) : Run Last
Emitted when one or more FolksPersonas are added to or removed from the Individual. As the parameters are (unordered) sets, the orders of their elements are undefined.
|
the FolksIndividual instance that received the signal |
|
a set of FolksPersonas which have been added |
|
a set of FolksPersonas which have been removed |
|
user data set when the signal handler was connected. |
Since 0.5.1
"removed"
signalvoid user_function (FolksIndividual *individual,
FolksIndividual *replacement_individual,
gpointer user_data) : Run Last
Emitted when the last of the Individual's FolksPersonas has been removed.
At this point, the Individual is invalid, so any client referencing it should unreference it and remove it from their UI.
|
the FolksIndividual instance that received the signal |
|
the individual which has replaced this one due to linking, or `null` if this individual was removed for another reason |
|
user data set when the signal handler was connected. |
Since 0.1.13