FolksGroupDetails

FolksGroupDetails — Interface for FolksPersonas or FolksIndividuals which can be grouped into sets of similar objects.

Synopsis

void                folks_group_details_change_group    (FolksGroupDetails *self,
                                                         const gchar *group,
                                                         gboolean is_member,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
void                folks_group_details_change_group_finish
                                                        (FolksGroupDetails *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);
void                folks_group_details_change_groups   (FolksGroupDetails *self,
                                                         GeeSet *groups,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
void                folks_group_details_change_groups_finish
                                                        (FolksGroupDetails *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);
GeeSet *            folks_group_details_get_groups      (FolksGroupDetails *self);
void                folks_group_details_set_groups      (FolksGroupDetails *self,
                                                         GeeSet *value);
enum                FolksGroupDetailsChangeReason;
                    FolksGroupDetails;

Object Hierarchy

  GEnum
   +----FolksGroupDetailsChangeReason
  GInterface
   +----FolksGroupDetails

Prerequisites

FolksGroupDetails requires GObject.

Known Implementations

FolksGroupDetails is implemented by FolksIndividual.

Properties

  "groups"                   GeeSet*               : Read / Write

Signals

  "group-changed"                                  : Run Last

Description

Details

folks_group_details_change_group ()

void                folks_group_details_change_group    (FolksGroupDetails *self,
                                                         const gchar *group,
                                                         gboolean is_member,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);

Add or remove the contact from the specified group.

If `is_member` is `true`, the contact will be added to the `group`. If it is `false`, they will be removed from the `group`.

See also: folks_group_details_change_group_finish()

self :

the FolksGroupDetails instance

group :

a freeform group identifier. [in]

is_member :

whether the contact should be a member of the group. [in]

_callback_ :

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

_user_data_ :

the data to pass to _callback_ function. [closure]

Since 0.1.11


folks_group_details_change_group_finish ()

void                folks_group_details_change_group_finish
                                                        (FolksGroupDetails *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);

Add or remove the contact from the specified group.

If `is_member` is `true`, the contact will be added to the `group`. If it is `false`, they will be removed from the `group`.

See also: folks_group_details_change_group()

self :

the FolksGroupDetails instance

_res_ :

a GAsyncResult

error :

location to store the error occuring, or NULL to ignore

Since 0.1.11


folks_group_details_change_groups ()

void                folks_group_details_change_groups   (FolksGroupDetails *self,
                                                         GeeSet *groups,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);

Change the contact's groups.

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

See also: folks_group_details_change_groups_finish()

self :

the FolksGroupDetails instance

groups :

the complete set of groups the contact should be a member of. [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_group_details_change_groups_finish ()

void                folks_group_details_change_groups_finish
                                                        (FolksGroupDetails *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);

Change the contact's groups.

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

See also: folks_group_details_change_groups()

self :

the FolksGroupDetails instance

_res_ :

a GAsyncResult

error :

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

Since 0.6.2


folks_group_details_get_groups ()

GeeSet *            folks_group_details_get_groups      (FolksGroupDetails *self);

self :

the FolksGroupDetails instance to query

Returns :

the value of the "groups" property

folks_group_details_set_groups ()

void                folks_group_details_set_groups      (FolksGroupDetails *self,
                                                         GeeSet *value);

self :

the FolksGroupDetails instance to modify

value :

the new value of the "groups" property

enum FolksGroupDetailsChangeReason

typedef enum {
	FOLKS_GROUP_DETAILS_CHANGE_REASON_NONE = 0,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_OFFLINE = 1,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_KICKED = 2,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_BUSY = 3,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_INVITED = 4,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_BANNED = 5,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_ERROR = 6,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_INVALID_MEMBER = 7,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_NO_ANSWER = 8,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_RENAMED = 9,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_PERMISSION_DENIED = 10,
	FOLKS_GROUP_DETAILS_CHANGE_REASON_SEPARATED = 11
} FolksGroupDetailsChangeReason;

The reason a group member has changed its membership in the group.

These closely follow the Channel_Group_Change_Reason interface in the Telepathy specification.

FOLKS_GROUP_DETAILS_CHANGE_REASON_NONE

No reason was provided for this change.

This is used when a member joins or leaves a group normally.

FOLKS_GROUP_DETAILS_CHANGE_REASON_OFFLINE

The change is due to a member going offline.

Also used when member is already offline, but this wasn't known previously.

FOLKS_GROUP_DETAILS_CHANGE_REASON_KICKED

The change is due to a kick operation.

FOLKS_GROUP_DETAILS_CHANGE_REASON_BUSY

The change is due to a busy indication.

FOLKS_GROUP_DETAILS_CHANGE_REASON_INVITED

The change is due to an invitation.

FOLKS_GROUP_DETAILS_CHANGE_REASON_BANNED

The change is due to a kick+ban operation.

FOLKS_GROUP_DETAILS_CHANGE_REASON_ERROR

The change is due to an error occurring.

FOLKS_GROUP_DETAILS_CHANGE_REASON_INVALID_MEMBER

The change is because the requested member does not exist.

For instance, if the user invites a nonexistent contact to a chatroom or attempts to call a nonexistent contact

FOLKS_GROUP_DETAILS_CHANGE_REASON_NO_ANSWER

The change is because the requested contact did not respond.

FOLKS_GROUP_DETAILS_CHANGE_REASON_RENAMED

The change is because a member's unique identifier changed.

There must be exactly one member in the removed set and exactly one member in one of the added sets.

FOLKS_GROUP_DETAILS_CHANGE_REASON_PERMISSION_DENIED

The change is because there was no permission to contact the requested member.

FOLKS_GROUP_DETAILS_CHANGE_REASON_SEPARATED

If members are removed with this reason code, the change is because the group has split into unconnected parts which can only communicate within themselves (e.g. netsplits on IRC use this reason code).

If members are added with this reason code, the change is because unconnected parts of the group have rejoined. If this channel carries messages (e.g. Text or Tubes channels) applications must assume that the contacts being added are likely to have missed some messages as a result of the separation, and that the contacts in the group are likely to have missed some messages from the contacts being added.

Note that from the added contacts' perspective, they have been in the group all along, and the contacts we indicate to be in the group (including the local user) have just rejoined the group with reason Separated. Application protocols in Tubes should be prepared to cope with this situation.


FolksGroupDetails

typedef struct _FolksGroupDetails FolksGroupDetails;

Interface for FolksPersonas or FolksIndividuals which can be grouped into sets of similar objects.

Property Details

The "groups" property

  "groups"                   GeeSet*               : Read / Write

A mapping of group ID to whether the contact is a member.

Freeform group IDs are mapped to a boolean which is `true` if the contact is a member of the group, and `false` otherwise.

Since 0.5.1

Signal Details

The "group-changed" signal

void                user_function                      (FolksGroupDetails *group_details,
                                                        gchar             *group,
                                                        gboolean           is_member,
                                                        gpointer           user_data)          : Run Last

Emitted when the contact's membership status changes for a group.

This is emitted if the contact becomes a member of a group they weren't in before, or leaves a group they were in.

group_details :

the FolksGroupDetails instance that received the signal

group :

a freeform group identifier for the group being left or joined

is_member :

whether the contact is joining or leaving the group

user_data :

user data set when the signal handler was connected.

Since 0.1.11