Top |
gchar * | additional-names | Read / Write / Construct |
gchar * | family-name | Read / Write / Construct |
gchar * | given-name | Read / Write / Construct |
gchar * | prefixes | Read / Write / Construct |
gchar * | suffixes | Read / Write / Construct |
gchar * | full-name | Read / Write |
gchar * | nickname | Read / Write |
FolksStructuredName * | structured-name | Read / Write |
struct | FolksStructuredName |
struct | FolksStructuredNameClass |
FolksNameDetails | |
struct | FolksNameDetailsIface |
Represents 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.
#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.
Since 0.3.5
gboolean folks_structured_name_equal (FolksStructuredName *self
,FolksStructuredName *other
);
Whether two StructuredNames are the same.
self |
the FolksStructuredName instance |
|
other |
. the other structured name to compare with . |
[in] |
Since 0.5.0
gchar *
folks_structured_name_to_string (FolksStructuredName *self
);
Formatted version of the structured name.
Since 0.4.0
gchar * folks_structured_name_to_string_with_format (FolksStructuredName *self
,const gchar *name_fmt
);
Formatted version of the structured name.
This allows a custom format string to be specified, using the placeholders described on http://lh.2xlibre.net/values/name_fmt/. This name_fmt
must almost always be translated to the current locale. (Ideally it would be translated to the locale of the persona whose name is being formatted, but such locale information isn’t available.)
Since 0.9.7
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.
family_name |
. the family (last) name . |
[in][allow-none] |
given_name |
. the given (first) name . |
[in][allow-none] |
additional_names |
. additional names . |
[in][allow-none] |
prefixes |
. prefixes of the name . |
[in][allow-none] |
suffixes |
. suffixes of the name . |
[in][allow-none] |
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 folks_structured_name_new()
and passing null
for all the other components.
family_name |
. the family (last) name . |
[in][allow-none] |
given_name |
. the given (first) name . |
[in][allow-none] |
Since 0.3.5
const gchar *
folks_structured_name_get_family_name (FolksStructuredName *self
);
Get and return the current value of the "family-name" property.
The family name.
The family name (also known as surname or last name) of a contact.
Since 0.3.5
void folks_structured_name_set_family_name (FolksStructuredName *self
,const gchar *value
);
Set the value of the "family-name" property to value
.
The family name.
The family name (also known as surname or last name) of a contact.
self |
the FolksStructuredName instance to modify |
|
value |
the new value of the "family-name" property |
Since 0.3.5
const gchar *
folks_structured_name_get_given_name (FolksStructuredName *self
);
Get and return the current value of the "given-name" property.
The given name.
The family name (also known as first name) of a contact.
Since 0.3.5
void folks_structured_name_set_given_name (FolksStructuredName *self
,const gchar *value
);
Set the value of the "given-name" property to value
.
The given name.
The family name (also known as first name) of a contact.
self |
the FolksStructuredName instance to modify |
|
value |
the new value of the "given-name" property |
Since 0.3.5
const gchar *
folks_structured_name_get_additional_names
(FolksStructuredName *self
);
Get and return the current value of the "additional-names" property.
Additional names.
The additional names of a contact, for instance the contact's middle name.
Since 0.3.5
void folks_structured_name_set_additional_names (FolksStructuredName *self
,const gchar *value
);
Set the value of the "additional-names" property to value
.
Additional names.
The additional names of a contact, for instance the contact's middle name.
self |
the FolksStructuredName instance to modify |
|
value |
the new value of the "additional-names" property |
Since 0.3.5
const gchar *
folks_structured_name_get_prefixes (FolksStructuredName *self
);
Get and return the current value of the "prefixes" property.
The prefixes of a name.
The prefixes used in front of the name (for instance "Mr", "Mrs", "Doctor" or honorific titles).
Since 0.3.5
void folks_structured_name_set_prefixes (FolksStructuredName *self
,const gchar *value
);
Set the value of the "prefixes" property to value
.
The prefixes of a name.
The prefixes used in front of the name (for instance "Mr", "Mrs", "Doctor" or honorific titles).
self |
the FolksStructuredName instance to modify |
|
value |
the new value of the "prefixes" property |
Since 0.3.5
const gchar *
folks_structured_name_get_suffixes (FolksStructuredName *self
);
Get and return the current value of the "suffixes" property.
The suffixes of a name.
The suffixes used after a name (for instance "PhD" or "Junior").
Since 0.3.5
void folks_structured_name_set_suffixes (FolksStructuredName *self
,const gchar *value
);
Set the value of the "suffixes" property to value
.
The suffixes of a name.
The suffixes used after a name (for instance "PhD" or "Junior").
self |
the FolksStructuredName instance to modify |
|
value |
the new value of the "suffixes" property |
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).
FolksPropertyError will be returned in error
if setting the structured name failed
See also: folks_name_details_change_structured_name_finish()
self |
the FolksNameDetails instance |
|
name |
. the structured name ( . |
[in][allow-none] |
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[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).
FolksPropertyError will be returned in error
if setting the structured name failed
See also: folks_name_details_change_structured_name()
self |
the FolksNameDetails instance |
|
_res_ |
||
error |
location to store the error occuring, or |
[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).
FolksPropertyError will be returned in error
if setting the full name failed
See also: folks_name_details_change_full_name_finish()
self |
the FolksNameDetails instance |
|
full_name |
. the full name (empty string to unset it) . |
[in] |
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[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).
FolksPropertyError will be returned in error
if setting the full name failed
See also: folks_name_details_change_full_name()
self |
the FolksNameDetails instance |
|
_res_ |
||
error |
location to store the error occuring, or |
[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).
FolksPropertyError will be returned in error
if setting the nickname failed
See also: folks_name_details_change_nickname_finish()
self |
the FolksNameDetails instance |
|
nickname |
. the nickname (empty string to unset it) . |
[in] |
_callback_ |
callback to call when the request is satisfied. |
[scope async] |
_user_data_ |
the data to pass to |
[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).
FolksPropertyError will be returned in error
if setting the nickname failed
See also: folks_name_details_change_nickname()
self |
the FolksNameDetails instance |
|
_res_ |
||
error |
location to store the error occuring, or |
[error-domains FolksPropertyError] |
Since 0.6.2
FolksStructuredName *
folks_name_details_get_structured_name
(FolksNameDetails *self
);
Get and return the current value of the "structured-name" property.
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
void folks_name_details_set_structured_name (FolksNameDetails *self
,FolksStructuredName *value
);
Set the value of the "structured-name" property to value
.
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.
self |
the FolksNameDetails instance to modify |
|
value |
the new value of the "structured-name" property |
Since 0.3.5
const gchar *
folks_name_details_get_full_name (FolksNameDetails *self
);
Get and return the current value of the "full-name" property.
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.
Since 0.3.5
void folks_name_details_set_full_name (FolksNameDetails *self
,const gchar *value
);
Set the value of the "full-name" property to value
.
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.
self |
the FolksNameDetails instance to modify |
|
value |
the new value of the "full-name" property |
Since 0.3.5
const gchar *
folks_name_details_get_nickname (FolksNameDetails *self
);
Get and return the current value of the "nickname" property.
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.
Since 0.3.5
void folks_name_details_set_nickname (FolksNameDetails *self
,const gchar *value
);
Set the value of the "nickname" property to value
.
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.
self |
the FolksNameDetails instance to modify |
|
value |
the new value of the "nickname" property |
Since 0.3.5
struct FolksStructuredName;
Structured name representation for human names.
Represents 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
struct FolksStructuredNameClass { GObjectClass parent_class; };
The class structure for FOLKS_TYPE_STRUCTURED_NAME
. All the fields in this structure are private and should never be accessed directly.
typedef struct _FolksNameDetails FolksNameDetails;
Interface for classes which represent contacts with names, such as FolksPersona and FolksIndividual.
Since 0.3.5
struct FolksNameDetailsIface { GTypeInterface parent_iface; void (*change_structured_name) (FolksNameDetails* self, FolksStructuredName* name, GAsyncReadyCallback _callback_, gpointer _user_data_); void (*change_structured_name_finish) (FolksNameDetails* self, GAsyncResult* _res_, GError** error); void (*change_full_name) (FolksNameDetails* self, const gchar* full_name, GAsyncReadyCallback _callback_, gpointer _user_data_); void (*change_full_name_finish) (FolksNameDetails* self, GAsyncResult* _res_, GError** error); void (*change_nickname) (FolksNameDetails* self, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_); void (*change_nickname_finish) (FolksNameDetails* self, GAsyncResult* _res_, GError** error); FolksStructuredName* (*get_structured_name) (FolksNameDetails* self); void (*set_structured_name) (FolksNameDetails* self, FolksStructuredName* value); const gchar* (*get_full_name) (FolksNameDetails* self); void (*set_full_name) (FolksNameDetails* self, const gchar* value); const gchar* (*get_nickname) (FolksNameDetails* self); void (*set_nickname) (FolksNameDetails* self, const gchar* value); };
Interface for creating FolksNameDetails implementations.
GTypeInterface |
the parent interface structure |
|
virtual method called by |
||
asynchronous finish function for |
||
virtual method called by |
||
asynchronous finish function for |
||
virtual method called by |
||
asynchronous finish function for |
||
getter method for the abstract property "structured-name" |
||
setter method for the abstract property "structured-name" |
||
getter method for the abstract property "full-name" |
||
setter method for the abstract property "full-name" |
||
getter method for the abstract property "nickname" |
||
setter method for the abstract property "nickname" |
“additional-names”
property“additional-names” gchar *
Additional names.
The additional names of a contact, for instance the contact's middle name.
Flags: Read / Write / Construct
Default value: NULL
Since 0.3.5
“family-name”
property“family-name” gchar *
The family name.
The family name (also known as surname or last name) of a contact.
Flags: Read / Write / Construct
Default value: NULL
Since 0.3.5
“given-name”
property“given-name” gchar *
The given name.
The family name (also known as first name) of a contact.
Flags: Read / Write / Construct
Default value: NULL
Since 0.3.5
“prefixes”
property“prefixes” gchar *
The prefixes of a name.
The prefixes used in front of the name (for instance "Mr", "Mrs", "Doctor" or honorific titles).
Flags: Read / Write / Construct
Default value: NULL
Since 0.3.5
“suffixes”
property“suffixes” gchar *
The suffixes of a name.
The suffixes used after a name (for instance "PhD" or "Junior").
Flags: Read / Write / Construct
Default value: NULL
Since 0.3.5
“full-name”
property“full-name” gchar *
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.
Flags: Read / Write
Default value: NULL
Since 0.3.5
“nickname”
property“nickname” gchar *
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.
Flags: Read / Write
Default value: NULL
Since 0.3.5
“structured-name”
property“structured-name” FolksStructuredName *
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.
Flags: Read / Write
Since 0.3.5