FolksRole

FolksRole — This interface represents the role a FolksPersona and FolksIndividual have in a given Organisation.

Synopsis

#define             FOLKS_TYPE_ROLE
gboolean            folks_role_is_empty                 (FolksRole *self);
gchar *             folks_role_to_string                (FolksRole *self);
FolksRole *         folks_role_new                      (const gchar *title,
                                                         const gchar *organisation_name,
                                                         const gchar *uid);
const gchar *       folks_role_get_organisation_name    (FolksRole *self);
void                folks_role_set_organisation_name    (FolksRole *self,
                                                         const gchar *value);
const gchar *       folks_role_get_title                (FolksRole *self);
void                folks_role_set_title                (FolksRole *self,
                                                         const gchar *value);
const gchar *       folks_role_get_role                 (FolksRole *self);
void                folks_role_set_role                 (FolksRole *self,
                                                         const gchar *value);
const gchar *       folks_role_get_uid                  (FolksRole *self);
void                folks_role_set_uid                  (FolksRole *self,
                                                         const gchar *value);
gboolean            folks_role_equal                    (FolksRole *a,
                                                         FolksRole *b);
guint               folks_role_hash                     (FolksRole *r);
struct              FolksRole;
#define             FOLKS_TYPE_ROLE_FIELD_DETAILS
FolksRoleFieldDetails * folks_role_field_details_new    (FolksRole *value,
                                                         GeeMultiMap *parameters);
struct              FolksRoleFieldDetails;
void                folks_role_details_change_roles     (FolksRoleDetails *self,
                                                         GeeSet *roles,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
void                folks_role_details_change_roles_finish
                                                        (FolksRoleDetails *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);
GeeSet *            folks_role_details_get_roles        (FolksRoleDetails *self);
void                folks_role_details_set_roles        (FolksRoleDetails *self,
                                                         GeeSet *value);
                    FolksRoleDetails;

Object Hierarchy

  GObject
   +----FolksRole
  GObject
   +----FolksAbstractFieldDetails
         +----FolksRoleFieldDetails
  GInterface
   +----FolksRoleDetails

Prerequisites

FolksRoleDetails requires GObject.

Known Implementations

FolksRoleDetails is implemented by FolksIndividual.

Properties

  "organisation-name"        gchar*                : Read / Write
  "role"                     gchar*                : Read / Write
  "title"                    gchar*                : Read / Write
  "uid"                      gchar*                : Read / Write
  "id"                       gchar*                : Read / Write
  "roles"                    GeeSet*               : Read / Write

Description

Details

FOLKS_TYPE_ROLE

#define FOLKS_TYPE_ROLE (folks_role_get_type ())

The type for FolksRole.


folks_role_is_empty ()

gboolean            folks_role_is_empty                 (FolksRole *self);

Whether none of the components is set.

self :

the FolksRole instance

Returns :

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

Since 0.6.7


folks_role_to_string ()

gchar *             folks_role_to_string                (FolksRole *self);

Formatted version of this role.

self :

the FolksRole instance

Since 0.4.0


folks_role_new ()

FolksRole *         folks_role_new                      (const gchar *title,
                                                         const gchar *organisation_name,
                                                         const gchar *uid);

Default constructor.

title :

title of the position. [in][allow-none]

organisation_name :

organisation where the role is hold. [in][allow-none]

uid :

a Unique ID associated to this Role. [in][allow-none]

Returns :

a new Role

Since 0.4.0


folks_role_get_organisation_name ()

const gchar *       folks_role_get_organisation_name    (FolksRole *self);

self :

the FolksRole instance to query

Returns :

the value of the "organisation-name" property

folks_role_set_organisation_name ()

void                folks_role_set_organisation_name    (FolksRole *self,
                                                         const gchar *value);

self :

the FolksRole instance to modify

value :

the new value of the "organisation-name" property

folks_role_get_title ()

const gchar *       folks_role_get_title                (FolksRole *self);

self :

the FolksRole instance to query

Returns :

the value of the "title" property

folks_role_set_title ()

void                folks_role_set_title                (FolksRole *self,
                                                         const gchar *value);

self :

the FolksRole instance to modify

value :

the new value of the "title" property

folks_role_get_role ()

const gchar *       folks_role_get_role                 (FolksRole *self);

self :

the FolksRole instance to query

Returns :

the value of the "role" property

folks_role_set_role ()

void                folks_role_set_role                 (FolksRole *self,
                                                         const gchar *value);

self :

the FolksRole instance to modify

value :

the new value of the "role" property

folks_role_get_uid ()

const gchar *       folks_role_get_uid                  (FolksRole *self);

self :

the FolksRole instance to query

Returns :

the value of the "uid" property

folks_role_set_uid ()

void                folks_role_set_uid                  (FolksRole *self,
                                                         const gchar *value);

self :

the FolksRole instance to modify

value :

the new value of the "uid" property

folks_role_equal ()

gboolean            folks_role_equal                    (FolksRole *a,
                                                         FolksRole *b);

Compare if two roles are equal. Roles are equal if their titles and organisation names are equal.

a :

a role to compare. [in]

b :

another role to compare. [in]

Returns :

`true` if the roles are equal, `false` otherwise

folks_role_hash ()

guint               folks_role_hash                     (FolksRole *r);

Hash function for the class. Suitable for use as a hash table key.

r :

a role to hash. [in]

Returns :

hash value for the role instance

struct FolksRole

struct FolksRole;

This interface represents the role a FolksPersona and FolksIndividual have in a given Organisation.

Since 0.4.0


FOLKS_TYPE_ROLE_FIELD_DETAILS

#define FOLKS_TYPE_ROLE_FIELD_DETAILS (folks_role_field_details_get_type ())

The type for FolksRoleFieldDetails.


folks_role_field_details_new ()

FolksRoleFieldDetails * folks_role_field_details_new    (FolksRole *value,
                                                         GeeMultiMap *parameters);

Create a new RoleFieldDetails.

value :

the non-empty FolksRole of the field. [in]

parameters :

initial parameters. See "parameters". A `null` value is equivalent to an empty map of parameters. [in][allow-none]

Returns :

a new RoleFieldDetails

Since 0.6.0


struct FolksRoleFieldDetails

struct FolksRoleFieldDetails;

Object representing details of a contact in an organisation which can have some parameters associated with it.

See FolksAbstractFieldDetails.

Since 0.6.0


folks_role_details_change_roles ()

void                folks_role_details_change_roles     (FolksRoleDetails *self,
                                                         GeeSet *roles,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);

Change the contact's roles.

It's preferred to call this rather than setting "roles" directly, as this method gives error notification and will only return once the roles have been written to the relevant backing store (or the operation's failed).

See also: folks_role_details_change_roles_finish()

self :

the FolksRoleDetails instance

roles :

the set of roles. [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_role_details_change_roles_finish ()

void                folks_role_details_change_roles_finish
                                                        (FolksRoleDetails *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);

Change the contact's roles.

It's preferred to call this rather than setting "roles" directly, as this method gives error notification and will only return once the roles have been written to the relevant backing store (or the operation's failed).

See also: folks_role_details_change_roles()

self :

the FolksRoleDetails instance

_res_ :

a GAsyncResult

error :

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

Since 0.6.2


folks_role_details_get_roles ()

GeeSet *            folks_role_details_get_roles        (FolksRoleDetails *self);

self :

the FolksRoleDetails instance to query

Returns :

the value of the "roles" property

folks_role_details_set_roles ()

void                folks_role_details_set_roles        (FolksRoleDetails *self,
                                                         GeeSet *value);

self :

the FolksRoleDetails instance to modify

value :

the new value of the "roles" property

FolksRoleDetails

typedef struct _FolksRoleDetails FolksRoleDetails;

This interfaces represents the list of roles a FolksPersona and FolksIndividual might have.

Since 0.4.0

Property Details

The "organisation-name" property

  "organisation-name"        gchar*                : Read / Write

The name of the organisation in which the role is held.

Default value: NULL


The "role" property

  "role"                     gchar*                : Read / Write

The role of the position.

For example: “Programmer”

Default value: NULL

Since 0.6.0


The "title" property

  "title"                    gchar*                : Read / Write

The title of the position held.

For example: “Director, Ministry of Silly Walks”

Default value: NULL


The "uid" property

  "uid"                      gchar*                : Read / Write

The UID that distinguishes this role.

Default value: NULL


The "id" property

  "id"                       gchar*                : Read / Write

id.

Default value: NULL


The "roles" property

  "roles"                    GeeSet*               : Read / Write

The roles of the contact.

Since 0.6.0