FolksGroupDetails

FolksGroupDetails — Groups for a contact.

Functions

Properties

GeeSet * groups Read / Write

Signals

void group-changed Run Last

Types and Values

Object Hierarchy

    GEnum
    ╰── FolksGroupDetailsChangeReason
    GInterface
    ╰── FolksGroupDetails

Prerequisites

FolksGroupDetails requires GObject.

Known Implementations

FolksGroupDetails is implemented by FolksIndividual.

Description

This allows contacts to be collected into user-defined groups (or categories) for organisational purposes. Groups are non-exclusive and non-hierarchical, so a single contact can be put into many groups, but groups may not themselves be put into groups.

Functions

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.

GError will be returned in error

if changing the group failed in the backing store

See also: folks_group_details_change_group_finish()

Parameters

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.

GError will be returned in error

if changing the group failed in the backing store

See also: folks_group_details_change_group()

Parameters

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

FolksPropertyError will be returned in error

if setting the groups failed

See also: folks_group_details_change_groups_finish()

Parameters

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

FolksPropertyError will be returned in error

if setting the groups failed

See also: folks_group_details_change_groups()

Parameters

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

Get and return the current value of the "groups" property.

A set of group IDs for groups containing the member.

The complete set of freeform identifiers for all the groups the contact is a member of.

Parameters

self

the FolksGroupDetails instance to query

 

Returns

the value of the "groups" property

Since 0.5.1


folks_group_details_set_groups ()

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

Set the value of the "groups" property to value .

A set of group IDs for groups containing the member.

The complete set of freeform identifiers for all the groups the contact is a member of.

Parameters

self

the FolksGroupDetails instance to modify

 

value

the new value of the "groups" property

 

Since 0.5.1

Types and Values

enum 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.

Members

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;

Groups for a contact.

This allows contacts to be collected into user-defined groups (or categories) for organisational purposes. Groups are non-exclusive and non-hierarchical, so a single contact can be put into many groups, but groups may not themselves be put into groups.


struct FolksGroupDetailsIface

struct FolksGroupDetailsIface {
	GTypeInterface parent_iface;
	void (*change_group) (FolksGroupDetails* self, const gchar* group, gboolean is_member, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_group_finish) (FolksGroupDetails* self, GAsyncResult* _res_, GError** error);
	void (*change_groups) (FolksGroupDetails* self, GeeSet* groups, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_groups_finish) (FolksGroupDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_groups) (FolksGroupDetails* self);
	void (*set_groups) (FolksGroupDetails* self, GeeSet* value);
};

Interface for creating FolksGroupDetails implementations.

Members

GTypeInterface parent_iface;

the parent interface structure

 

change_group ()

virtual method called by folks_group_details_change_group()

 

change_group_finish ()

asynchronous finish function for change_group, called by folks_group_details_change_group()

 

change_groups ()

virtual method called by folks_group_details_change_groups()

 

change_groups_finish ()

asynchronous finish function for change_groups, called by folks_group_details_change_groups()

 

get_groups ()

getter method for the abstract property "groups"

 

set_groups ()

setter method for the abstract property "groups"

 

Property Details

The “groups” property

  “groups”                   GeeSet *

A set of group IDs for groups containing the member.

The complete set of freeform identifiers for all the groups the contact is a member of.

Flags: Read / Write

Since 0.5.1

Signal Details

The “group-changed” signal

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

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.

Parameters

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.

 

Flags: Run Last

Since 0.1.11