FolksStructuredName

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.

Synopsis

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

Object Hierarchy

  GObject
   +----FolksStructuredName
  GInterface
   +----FolksNameDetails

Prerequisites

FolksNameDetails requires GObject.

Known Implementations

FolksNameDetails is implemented by FolksIndividual.

Properties

  "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

Description

Details

FOLKS_TYPE_STRUCTURED_NAME

#define FOLKS_TYPE_STRUCTURED_NAME (folks_structured_name_get_type ())

The type for FolksStructuredName.


folks_structured_name_is_empty ()

gboolean            folks_structured_name_is_empty      (FolksStructuredName *self);

Whether none of the components is set.

self :

the FolksStructuredName instance

Returns :

`true` if all the components are the empty string, `false` otherwise.

Since 0.3.5


folks_structured_name_equal ()

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]

Returns :

`true` if all the components are the same, `false` otherwise.

Since 0.5.0


folks_structured_name_to_string ()

gchar *             folks_structured_name_to_string     (FolksStructuredName *self);

Formatted version of the structured name.

self :

the FolksStructuredName instance

Since 0.4.0


folks_structured_name_new ()

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]

Returns :

a new StructuredName

Since 0.3.5


folks_structured_name_new_simple ()

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]

Returns :

a new StructuredName

Since 0.3.5


folks_structured_name_get_family_name ()

const gchar *       folks_structured_name_get_family_name
                                                        (FolksStructuredName *self);

self :

the FolksStructuredName instance to query

Returns :

the value of the "family-name" property

folks_structured_name_set_family_name ()

void                folks_structured_name_set_family_name
                                                        (FolksStructuredName *self,
                                                         const gchar *value);

self :

the FolksStructuredName instance to modify

value :

the new value of the "family-name" property

folks_structured_name_get_given_name ()

const gchar *       folks_structured_name_get_given_name
                                                        (FolksStructuredName *self);

self :

the FolksStructuredName instance to query

Returns :

the value of the "given-name" property

folks_structured_name_set_given_name ()

void                folks_structured_name_set_given_name
                                                        (FolksStructuredName *self,
                                                         const gchar *value);

self :

the FolksStructuredName instance to modify

value :

the new value of the "given-name" property

folks_structured_name_get_additional_names ()

const gchar *       folks_structured_name_get_additional_names
                                                        (FolksStructuredName *self);

self :

the FolksStructuredName instance to query

Returns :

the value of the "additional-names" property

folks_structured_name_set_additional_names ()

void                folks_structured_name_set_additional_names
                                                        (FolksStructuredName *self,
                                                         const gchar *value);

self :

the FolksStructuredName instance to modify

value :

the new value of the "additional-names" property

folks_structured_name_get_prefixes ()

const gchar *       folks_structured_name_get_prefixes  (FolksStructuredName *self);

self :

the FolksStructuredName instance to query

Returns :

the value of the "prefixes" property

folks_structured_name_set_prefixes ()

void                folks_structured_name_set_prefixes  (FolksStructuredName *self,
                                                         const gchar *value);

self :

the FolksStructuredName instance to modify

value :

the new value of the "prefixes" property

folks_structured_name_get_suffixes ()

const gchar *       folks_structured_name_get_suffixes  (FolksStructuredName *self);

self :

the FolksStructuredName instance to query

Returns :

the value of the "suffixes" property

folks_structured_name_set_suffixes ()

void                folks_structured_name_set_suffixes  (FolksStructuredName *self,
                                                         const gchar *value);

self :

the FolksStructuredName instance to modify

value :

the new value of the "suffixes" property

struct FolksStructuredName

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


folks_name_details_change_structured_name ()

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

self :

the FolksNameDetails instance

name :

the structured name (`null` to unset it). [in][allow-none]

_callback_ :

callback to call when the request is satisfied. [scope async]

_user_data_ :

the data to pass to _callback_ function. [closure]

Since 0.6.2


folks_name_details_change_structured_name_finish ()

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

self :

the FolksNameDetails instance

_res_ :

a GAsyncResult

error :

location to store the error occuring, or NULL to ignore. [error-domains FolksPropertyError]

Since 0.6.2


folks_name_details_change_full_name ()

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

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 _callback_ function. [closure]

Since 0.6.2


folks_name_details_change_full_name_finish ()

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

self :

the FolksNameDetails instance

_res_ :

a GAsyncResult

error :

location to store the error occuring, or NULL to ignore. [error-domains FolksPropertyError]

Since 0.6.2


folks_name_details_change_nickname ()

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

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 _callback_ function. [closure]

Since 0.6.2


folks_name_details_change_nickname_finish ()

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

self :

the FolksNameDetails instance

_res_ :

a GAsyncResult

error :

location to store the error occuring, or NULL to ignore. [error-domains FolksPropertyError]

Since 0.6.2


folks_name_details_get_structured_name ()

FolksStructuredName * folks_name_details_get_structured_name
                                                        (FolksNameDetails *self);

self :

the FolksNameDetails instance to query

Returns :

the value of the "structured-name" property

folks_name_details_set_structured_name ()

void                folks_name_details_set_structured_name
                                                        (FolksNameDetails *self,
                                                         FolksStructuredName *value);

self :

the FolksNameDetails instance to modify

value :

the new value of the "structured-name" property

folks_name_details_get_full_name ()

const gchar *       folks_name_details_get_full_name    (FolksNameDetails *self);

self :

the FolksNameDetails instance to query

Returns :

the value of the "full-name" property

folks_name_details_set_full_name ()

void                folks_name_details_set_full_name    (FolksNameDetails *self,
                                                         const gchar *value);

self :

the FolksNameDetails instance to modify

value :

the new value of the "full-name" property

folks_name_details_get_nickname ()

const gchar *       folks_name_details_get_nickname     (FolksNameDetails *self);

self :

the FolksNameDetails instance to query

Returns :

the value of the "nickname" property

folks_name_details_set_nickname ()

void                folks_name_details_set_nickname     (FolksNameDetails *self,
                                                         const gchar *value);

self :

the FolksNameDetails instance to modify

value :

the new value of the "nickname" property

FolksNameDetails

typedef struct _FolksNameDetails FolksNameDetails;

Interface for classes which represent contacts with names, such as FolksPersona and FolksIndividual.

Since 0.3.5

Property Details

The "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


The "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


The "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


The "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


The "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


The "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


The "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


The "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