folks Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Properties |
#define FOLKS_TYPE_STRUCTURED_NAME gboolean folks_structured_name_is_empty (FolksStructuredName *self
); gboolean folks_structured_name_equal (FolksStructuredName *self
,FolksStructuredName *other
); gchar * folks_structured_name_to_string (FolksStructuredName *self
); FolksStructuredName * folks_structured_name_new (const gchar *family_name
,const gchar *given_name
,const gchar *additional_names
,const gchar *prefixes
,const gchar *suffixes
); FolksStructuredName * folks_structured_name_new_simple (const gchar *family_name
,const gchar *given_name
); const gchar * folks_structured_name_get_family_name (FolksStructuredName *self
); void folks_structured_name_set_family_name (FolksStructuredName *self
,const gchar *value
); const gchar * folks_structured_name_get_given_name (FolksStructuredName *self
); void folks_structured_name_set_given_name (FolksStructuredName *self
,const gchar *value
); const gchar * folks_structured_name_get_additional_names (FolksStructuredName *self
); void folks_structured_name_set_additional_names (FolksStructuredName *self
,const gchar *value
); const gchar * folks_structured_name_get_prefixes (FolksStructuredName *self
); void folks_structured_name_set_prefixes (FolksStructuredName *self
,const gchar *value
); const gchar * folks_structured_name_get_suffixes (FolksStructuredName *self
); void folks_structured_name_set_suffixes (FolksStructuredName *self
,const gchar *value
); struct FolksStructuredName; void folks_name_details_change_structured_name (FolksNameDetails *self
,FolksStructuredName *name
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); void folks_name_details_change_structured_name_finish (FolksNameDetails *self
,GAsyncResult *_res_
,GError **error
); void folks_name_details_change_full_name (FolksNameDetails *self
,const gchar *full_name
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); void folks_name_details_change_full_name_finish (FolksNameDetails *self
,GAsyncResult *_res_
,GError **error
); void folks_name_details_change_nickname (FolksNameDetails *self
,const gchar *nickname
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); void folks_name_details_change_nickname_finish (FolksNameDetails *self
,GAsyncResult *_res_
,GError **error
); FolksStructuredName * folks_name_details_get_structured_name (FolksNameDetails *self
); void folks_name_details_set_structured_name (FolksNameDetails *self
,FolksStructuredName *value
); const gchar * folks_name_details_get_full_name (FolksNameDetails *self
); void folks_name_details_set_full_name (FolksNameDetails *self
,const gchar *value
); const gchar * folks_name_details_get_nickname (FolksNameDetails *self
); void folks_name_details_set_nickname (FolksNameDetails *self
,const gchar *value
); FolksNameDetails;
"additional-names" gchar* : Read / Write / Construct "family-name" gchar* : Read / Write / Construct "given-name" gchar* : Read / Write / Construct "prefixes" gchar* : Read / Write / Construct "suffixes" gchar* : Read / Write / Construct "full-name" gchar* : Read / Write "nickname" gchar* : Read / Write "structured-name" FolksStructuredName* : Read / Write
#define FOLKS_TYPE_STRUCTURED_NAME (folks_structured_name_get_type ())
The type for FolksStructuredName.
gboolean folks_structured_name_is_empty (FolksStructuredName *self
);
Whether none of the components is set.
|
the FolksStructuredName instance |
Returns : |
`true` if all the components are the empty string, `false` otherwise. |
Since 0.3.5
gboolean folks_structured_name_equal (FolksStructuredName *self
,FolksStructuredName *other
);
Whether two StructuredNames are the same.
|
the FolksStructuredName instance |
|
the other structured name to compare with. [in] |
Returns : |
`true` if all the components are the same, `false` otherwise. |
Since 0.5.0
gchar * folks_structured_name_to_string (FolksStructuredName *self
);
Formatted version of the structured name.
|
the FolksStructuredName instance |
Since 0.4.0
FolksStructuredName * folks_structured_name_new (const gchar *family_name
,const gchar *given_name
,const gchar *additional_names
,const gchar *prefixes
,const gchar *suffixes
);
Create a StructuredName.
You can pass `null` if a component is not set.
|
the family (last) name. [in][allow-none] |
|
the given (first) name. [in][allow-none] |
|
additional names. [in][allow-none] |
|
prefixes of the name. [in][allow-none] |
|
suffixes of the name. [in][allow-none] |
Returns : |
a new StructuredName |
Since 0.3.5
FolksStructuredName * folks_structured_name_new_simple (const gchar *family_name
,const gchar *given_name
);
Create a StructuredName.
Shorthand for the common case of just having the family and given name of a contact. It's equivalent to calling
and passing `null` for all the other components.folks_structured_name_new()
|
the family (last) name. [in][allow-none] |
|
the given (first) name. [in][allow-none] |
Returns : |
a new StructuredName |
Since 0.3.5
const gchar * folks_structured_name_get_family_name
(FolksStructuredName *self
);
|
the FolksStructuredName instance to query |
Returns : |
the value of the "family-name" property |
void folks_structured_name_set_family_name (FolksStructuredName *self
,const gchar *value
);
|
the FolksStructuredName instance to modify |
|
the new value of the "family-name" property |
const gchar * folks_structured_name_get_given_name
(FolksStructuredName *self
);
|
the FolksStructuredName instance to query |
Returns : |
the value of the "given-name" property |
void folks_structured_name_set_given_name (FolksStructuredName *self
,const gchar *value
);
|
the FolksStructuredName instance to modify |
|
the new value of the "given-name" property |
const gchar * folks_structured_name_get_additional_names
(FolksStructuredName *self
);
|
the FolksStructuredName instance to query |
Returns : |
the value of the "additional-names" property |
void folks_structured_name_set_additional_names (FolksStructuredName *self
,const gchar *value
);
|
the FolksStructuredName instance to modify |
|
the new value of the "additional-names" property |
const gchar * folks_structured_name_get_prefixes (FolksStructuredName *self
);
|
the FolksStructuredName instance to query |
Returns : |
the value of the "prefixes" property |
void folks_structured_name_set_prefixes (FolksStructuredName *self
,const gchar *value
);
|
the FolksStructuredName instance to modify |
|
the new value of the "prefixes" property |
const gchar * folks_structured_name_get_suffixes (FolksStructuredName *self
);
|
the FolksStructuredName instance to query |
Returns : |
the value of the "suffixes" property |
void folks_structured_name_set_suffixes (FolksStructuredName *self
,const gchar *value
);
|
the FolksStructuredName instance to modify |
|
the new value of the "suffixes" property |
struct FolksStructuredName;
Object for a full name split in its constituent parts (given name, family name, etc.). This structure corresponds to the "N" field in VCards. The parts of the name are never null, an empty string indicates that a property is not set.
Since 0.3.5
void folks_name_details_change_structured_name (FolksNameDetails *self
,FolksStructuredName *name
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Change the contact's structured name.
It's preferred to call this rather than setting "structured-name" directly, as this method gives error notification and will only return once the name has been written to the relevant backing store (or the operation's failed).
See also: folks_name_details_change_structured_name_finish()
|
the FolksNameDetails instance |
|
the structured name (`null` to unset it). [in][allow-none] |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [closure]
|
Since 0.6.2
void folks_name_details_change_structured_name_finish (FolksNameDetails *self
,GAsyncResult *_res_
,GError **error
);
Change the contact's structured name.
It's preferred to call this rather than setting "structured-name" directly, as this method gives error notification and will only return once the name has been written to the relevant backing store (or the operation's failed).
See also: folks_name_details_change_structured_name()
|
the FolksNameDetails instance |
|
a GAsyncResult |
|
location to store the error occuring, or NULL to ignore. [error-domains FolksPropertyError]
|
Since 0.6.2
void folks_name_details_change_full_name (FolksNameDetails *self
,const gchar *full_name
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Change the contact's full name.
It's preferred to call this rather than setting "full-name" directly, as this method gives error notification and will only return once the name has been written to the relevant backing store (or the operation's failed).
See also: folks_name_details_change_full_name_finish()
|
the FolksNameDetails instance |
|
the full name (empty string to unset it). [in] |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [closure]
|
Since 0.6.2
void folks_name_details_change_full_name_finish (FolksNameDetails *self
,GAsyncResult *_res_
,GError **error
);
Change the contact's full name.
It's preferred to call this rather than setting "full-name" directly, as this method gives error notification and will only return once the name has been written to the relevant backing store (or the operation's failed).
See also: folks_name_details_change_full_name()
|
the FolksNameDetails instance |
|
a GAsyncResult |
|
location to store the error occuring, or NULL to ignore. [error-domains FolksPropertyError]
|
Since 0.6.2
void folks_name_details_change_nickname (FolksNameDetails *self
,const gchar *nickname
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Change the contact's nickname.
It's preferred to call this rather than setting "nickname" directly, as this method gives error notification and will only return once the name has been written to the relevant backing store (or the operation's failed).
See also: folks_name_details_change_nickname_finish()
|
the FolksNameDetails instance |
|
the nickname (empty string to unset it). [in] |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [closure]
|
Since 0.6.2
void folks_name_details_change_nickname_finish (FolksNameDetails *self
,GAsyncResult *_res_
,GError **error
);
Change the contact's nickname.
It's preferred to call this rather than setting "nickname" directly, as this method gives error notification and will only return once the name has been written to the relevant backing store (or the operation's failed).
See also: folks_name_details_change_nickname()
|
the FolksNameDetails instance |
|
a GAsyncResult |
|
location to store the error occuring, or NULL to ignore. [error-domains FolksPropertyError]
|
Since 0.6.2
FolksStructuredName * folks_name_details_get_structured_name
(FolksNameDetails *self
);
|
the FolksNameDetails instance to query |
Returns : |
the value of the "structured-name" property |
void folks_name_details_set_structured_name (FolksNameDetails *self
,FolksStructuredName *value
);
|
the FolksNameDetails instance to modify |
|
the new value of the "structured-name" property |
const gchar * folks_name_details_get_full_name (FolksNameDetails *self
);
|
the FolksNameDetails instance to query |
Returns : |
the value of the "full-name" property |
void folks_name_details_set_full_name (FolksNameDetails *self
,const gchar *value
);
|
the FolksNameDetails instance to modify |
|
the new value of the "full-name" property |
const gchar * folks_name_details_get_nickname (FolksNameDetails *self
);
|
the FolksNameDetails instance to query |
Returns : |
the value of the "nickname" property |
void folks_name_details_set_nickname (FolksNameDetails *self
,const gchar *value
);
|
the FolksNameDetails instance to modify |
|
the new value of the "nickname" property |
typedef struct _FolksNameDetails FolksNameDetails;
Interface for classes which represent contacts with names, such as FolksPersona and FolksIndividual.
Since 0.3.5
"additional-names"
property "additional-names" gchar* : Read / Write / Construct
Additional names.
The additional names of a contact, for instance the contact's middle name.
Default value: NULL
Since 0.3.5
"family-name"
property "family-name" gchar* : Read / Write / Construct
The family name.
The family name (also known as surname or last name) of a contact.
Default value: NULL
Since 0.3.5
"given-name"
property "given-name" gchar* : Read / Write / Construct
The given name.
The family name (also known as first name) of a contact.
Default value: NULL
Since 0.3.5
"prefixes"
property "prefixes" gchar* : Read / Write / Construct
The prefixes of a name.
The prefixes used in front of the name (for instance "Mr", "Mrs", "Doctor" or honorific titles).
Default value: NULL
Since 0.3.5
"suffixes"
property "suffixes" gchar* : Read / Write / Construct
The suffixes of a name.
The suffixes used after a name (for instance "PhD" or "Junior").
Default value: NULL
Since 0.3.5
"full-name"
property "full-name" gchar* : Read / Write
The full name of the contact.
The full name is the name of the contact written in the way the contact prefers. For instance for English names this is usually the given name followed by the family name, but Chinese names are usually the family name followed by the given name. The full name could or could not contain additional names (like a middle name), prefixes or suffixes.
The full name must not be `null`: the empty string represents an unset full name.
Default value: NULL
Since 0.3.5
"nickname"
property "nickname" gchar* : Read / Write
The nickname of the contact.
The nickname is the name that the contact chose for himself. This is different from "alias" as aliases can be chosen by the user and not by the contacts themselves.
Consequently, setting the nickname only makes sense in the context of an address book when updating the information a contact has specified about themselves.
The nickname must not be `null`: the empty string represents an unset nickname.
Default value: NULL
Since 0.3.5
"structured-name"
property"structured-name" FolksStructuredName* : Read / Write
The contact name split in its constituent parts.
Note that most of the time the structured name is not set (i.e. it's `null`) or just some of the components are set. The components are immutable. To get notification of changes of the structured name, you just have to connect to the `notify` signal of this property.
Since 0.3.5