2 * Copyright (C) 2010 Collabora Ltd.
4 * This library is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 2.1 of the License, or
7 * (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library. If not, see <http://www.gnu.org/licenses/>.
18 * Travis Reitter <travis.reitter@collabora.co.uk>
25 * Interface for {@link Persona}s or {@link Individual}s which can be grouped
26 * into sets of similar objects.
28 public interface Folks.GroupDetails : Object
31 * The reason a group member has changed its membership in the group.
33 * These closely follow the
34 * [[http://telepathy.freedesktop.org/spec/Channel_Interface_Group.html#Channel_Group_Change_Reason|Channel_Group_Change_Reason]]
35 * interface in the Telepathy specification.
37 public enum ChangeReason
40 * No reason was provided for this change.
42 * This is used when a member joins or leaves a group normally.
46 * The change is due to a member going offline.
48 * Also used when member is already offline, but this wasn't known
53 * The change is due to a kick operation.
57 * The change is due to a busy indication.
61 * The change is due to an invitation.
65 * The change is due to a kick+ban operation.
69 * The change is due to an error occurring.
73 * The change is because the requested member does not exist.
75 * For instance, if the user invites a nonexistent contact to a chatroom
76 * or attempts to call a nonexistent contact
80 * The change is because the requested contact did not respond.
84 * The change is because a member's unique identifier changed.
86 * There must be exactly one member in the removed set and exactly one
87 * member in one of the added sets.
91 * The change is because there was no permission to contact the requested
94 PERMISSION_DENIED = 10,
96 * If members are removed with this reason code, the change is because the
97 * group has split into unconnected parts which can only communicate
98 * within themselves (e.g. netsplits on IRC use this reason code).
100 * If members are added with this reason code, the change is because
101 * unconnected parts of the group have rejoined. If this channel carries
102 * messages (e.g. Text or Tubes channels) applications must assume that
103 * the contacts being added are likely to have missed some messages as a
104 * result of the separation, and that the contacts in the group are likely
105 * to have missed some messages from the contacts being added.
107 * Note that from the added contacts' perspective, they have been in the
108 * group all along, and the contacts we indicate to be in the group
109 * (including the local user) have just rejoined the group with reason
110 * Separated. Application protocols in Tubes should be prepared to cope
111 * with this situation.
117 * A mapping of group ID to whether the contact is a member.
119 * Freeform group IDs are mapped to a boolean which is `true` if the
120 * contact is a member of the group, and `false` otherwise.
124 public abstract Set<string> groups { get; set; }
127 * Add or remove the contact from the specified group.
129 * If `is_member` is `true`, the contact will be added to the `group`. If
130 * it is `false`, they will be removed from the `group`.
132 * @param group a freeform group identifier
133 * @param is_member whether the contact should be a member of the group
136 public async abstract void change_group (string group, bool is_member)
140 * Emitted when the contact's membership status changes for a group.
142 * This is emitted if the contact becomes a member of a group they weren't in
143 * before, or leaves a group they were in.
145 * @param group a freeform group identifier for the group being left or joined
146 * @param is_member whether the contact is joining or leaving the group
149 public async signal void group_changed (string group, bool is_member);