summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-01-27 18:09:39 -0500
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-01-31 11:56:26 -0500
commit15fa5319f7a53745be21f2ed5fc1da8575fae79c (patch)
tree8c672b995b9ee6621006ae68e9fe30bff1f66c72
parent30c2bbb48b5189bcc6d8db7be6b94977332b5b41 (diff)
Group interface: remove deprecated methods & signals
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--docs/reference/telepathy-glib-sections.txt65
-rw-r--r--examples/cm/channelspecific/room.c40
-rw-r--r--spec/Channel_Interface_Group.xml606
-rw-r--r--telepathy-glib/channel-group.c78
-rw-r--r--telepathy-glib/channel.c44
-rw-r--r--telepathy-glib/group-mixin.c460
-rw-r--r--telepathy-glib/group-mixin.h6
-rw-r--r--telepathy-glib/proxy.c2
-rw-r--r--tests/dbus/call-example.c8
-rw-r--r--tests/dbus/cli-group.c260
-rw-r--r--tests/dbus/group-mixin.c80
-rw-r--r--tests/lib/textchan-group.c100
-rw-r--r--tests/lib/textchan-null.c2
13 files changed, 297 insertions, 1454 deletions
diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index 0e2b6163a..021df42ea 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -582,41 +582,12 @@ TpSvcChannelInterfaceGroupClass
tp_svc_channel_interface_group_add_members_impl
tp_svc_channel_interface_group_implement_add_members
tp_svc_channel_interface_group_return_from_add_members
-tp_svc_channel_interface_group_get_all_members_impl
-tp_svc_channel_interface_group_implement_get_all_members
-tp_svc_channel_interface_group_return_from_get_all_members
-tp_svc_channel_interface_group_get_group_flags_impl
-tp_svc_channel_interface_group_implement_get_group_flags
-tp_svc_channel_interface_group_return_from_get_group_flags
-tp_svc_channel_interface_group_get_handle_owners_impl
-tp_svc_channel_interface_group_implement_get_handle_owners
-tp_svc_channel_interface_group_return_from_get_handle_owners
-tp_svc_channel_interface_group_get_local_pending_members_impl
-tp_svc_channel_interface_group_implement_get_local_pending_members
-tp_svc_channel_interface_group_return_from_get_local_pending_members
-tp_svc_channel_interface_group_get_local_pending_members_with_info_impl
-tp_svc_channel_interface_group_implement_get_local_pending_members_with_info
-tp_svc_channel_interface_group_return_from_get_local_pending_members_with_info
-tp_svc_channel_interface_group_get_members_impl
-tp_svc_channel_interface_group_implement_get_members
-tp_svc_channel_interface_group_return_from_get_members
-tp_svc_channel_interface_group_get_remote_pending_members_impl
-tp_svc_channel_interface_group_implement_get_remote_pending_members
-tp_svc_channel_interface_group_return_from_get_remote_pending_members
-tp_svc_channel_interface_group_get_self_handle_impl
-tp_svc_channel_interface_group_implement_get_self_handle
-tp_svc_channel_interface_group_return_from_get_self_handle
tp_svc_channel_interface_group_remove_members_impl
tp_svc_channel_interface_group_implement_remove_members
tp_svc_channel_interface_group_return_from_remove_members
tp_svc_channel_interface_group_emit_group_flags_changed
tp_svc_channel_interface_group_emit_members_changed
-tp_svc_channel_interface_group_emit_members_changed_detailed
-tp_svc_channel_interface_group_implement_remove_members_with_reason
-tp_svc_channel_interface_group_remove_members_with_reason_impl
-tp_svc_channel_interface_group_return_from_remove_members_with_reason
tp_svc_channel_interface_group_emit_handle_owners_changed
-tp_svc_channel_interface_group_emit_self_handle_changed
<SUBSECTION Standard>
TP_SVC_CHANNEL_INTERFACE_GROUP
TP_IS_SVC_CHANNEL_INTERFACE_GROUP
@@ -1609,7 +1580,6 @@ tp_group_mixin_get_self_handle
tp_group_mixin_get_group_flags
tp_group_mixin_add_members
tp_group_mixin_remove_members
-tp_group_mixin_remove_members_with_reason
tp_group_mixin_get_members
tp_group_mixin_get_local_pending_members
tp_group_mixin_get_local_pending_members_with_info
@@ -1618,7 +1588,6 @@ tp_group_mixin_get_all_members
tp_group_mixin_get_handle_owners
tp_group_mixin_change_flags
tp_group_mixin_change_members
-tp_group_mixin_change_members_detailed
tp_group_mixin_add_handle_owner
tp_group_mixin_iface_init
tp_group_mixin_add_handle_owners
@@ -2767,53 +2736,19 @@ tp_cli_channel_interface_destroyable_run_destroy
<TITLE>channel-group</TITLE>
<INCLUDE>telepathy-glib/channel.h</INCLUDE>
tp_cli_channel_interface_group_run_add_members
-tp_cli_channel_interface_group_run_get_all_members
-tp_cli_channel_interface_group_run_get_group_flags
-tp_cli_channel_interface_group_run_get_handle_owners
-tp_cli_channel_interface_group_run_get_local_pending_members
-tp_cli_channel_interface_group_run_get_local_pending_members_with_info
-tp_cli_channel_interface_group_run_get_members
-tp_cli_channel_interface_group_run_get_remote_pending_members
-tp_cli_channel_interface_group_run_get_self_handle
tp_cli_channel_interface_group_run_remove_members
-tp_cli_channel_interface_group_run_remove_members_with_reason
tp_cli_channel_interface_group_call_add_members
-tp_cli_channel_interface_group_call_get_all_members
-tp_cli_channel_interface_group_call_get_group_flags
-tp_cli_channel_interface_group_call_get_handle_owners
-tp_cli_channel_interface_group_call_get_local_pending_members
-tp_cli_channel_interface_group_call_get_local_pending_members_with_info
-tp_cli_channel_interface_group_call_get_members
-tp_cli_channel_interface_group_call_get_remote_pending_members
-tp_cli_channel_interface_group_call_get_self_handle
tp_cli_channel_interface_group_call_remove_members
-tp_cli_channel_interface_group_call_remove_members_with_reason
tp_cli_channel_interface_group_callback_for_add_members
-tp_cli_channel_interface_group_callback_for_get_all_members
-tp_cli_channel_interface_group_callback_for_get_group_flags
-tp_cli_channel_interface_group_callback_for_get_handle_owners
-tp_cli_channel_interface_group_callback_for_get_local_pending_members
-tp_cli_channel_interface_group_callback_for_get_local_pending_members_with_info
-tp_cli_channel_interface_group_callback_for_get_members
-tp_cli_channel_interface_group_callback_for_get_remote_pending_members
-tp_cli_channel_interface_group_callback_for_get_self_handle
tp_cli_channel_interface_group_callback_for_remove_members
-tp_cli_channel_interface_group_callback_for_remove_members_with_reason
tp_cli_channel_interface_group_connect_to_group_flags_changed
tp_cli_channel_interface_group_connect_to_members_changed
-tp_cli_channel_interface_group_connect_to_members_changed_detailed
tp_cli_channel_interface_group_signal_callback_group_flags_changed
tp_cli_channel_interface_group_signal_callback_members_changed
-tp_cli_channel_interface_group_signal_callback_members_changed_detailed
tp_cli_channel_interface_group_connect_to_handle_owners_changed
-tp_cli_channel_interface_group_connect_to_self_handle_changed
tp_cli_channel_interface_group_signal_callback_handle_owners_changed
-tp_cli_channel_interface_group_signal_callback_self_handle_changed
-tp_cli_channel_interface_group_connect_to_handle_owners_changed_detailed
tp_cli_channel_interface_group_connect_to_self_contact_changed
-tp_cli_channel_interface_group_signal_callback_handle_owners_changed_detailed
tp_cli_channel_interface_group_signal_callback_self_contact_changed
-tp_svc_channel_interface_group_emit_handle_owners_changed_detailed
tp_svc_channel_interface_group_emit_self_contact_changed
<SUBSECTION>
diff --git a/examples/cm/channelspecific/room.c b/examples/cm/channelspecific/room.c
index 90a721224..c4586c6f2 100644
--- a/examples/cm/channelspecific/room.c
+++ b/examples/cm/channelspecific/room.c
@@ -93,6 +93,7 @@ complete_join (ExampleCSHRoomChannel *self)
TpHandle alice_global, bob_global, chris_global;
TpGroupMixin *mixin = TP_GROUP_MIXIN (self);
TpIntset *added;
+ GHashTable *details;
/* For this example, we assume that all chatrooms initially contain
* Alice, Bob and Chris (and that their global IDs are also known),
@@ -139,9 +140,16 @@ complete_join (ExampleCSHRoomChannel *self)
conn->self_handle);
tp_group_mixin_change_self_handle ((GObject *) self, new_self);
- tp_group_mixin_change_members ((GObject *) self, "", NULL, removed, NULL,
- rp, 0, TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
+ tp_group_mixin_change_members ((GObject *) self, NULL, removed, NULL,
+ rp, details);
+
+ tp_clear_pointer (&details, g_hash_table_unref);
tp_handle_unref (contact_repo, new_self);
tp_intset_destroy (removed);
tp_intset_destroy (rp);
@@ -165,8 +173,16 @@ complete_join (ExampleCSHRoomChannel *self)
tp_intset_add (added, anon_local);
tp_intset_add (added, mixin->self_handle);
- tp_group_mixin_change_members ((GObject *) self, "", added, NULL, NULL,
- NULL, 0, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
+
+ tp_group_mixin_change_members ((GObject *) self, added, NULL, NULL,
+ NULL, details);
+
+ tp_clear_pointer (&details, g_hash_table_unref);
tp_handle_unref (contact_repo, alice_local);
tp_handle_unref (contact_repo, bob_local);
@@ -191,6 +207,7 @@ join_room (ExampleCSHRoomChannel *self)
TpGroupMixin *mixin = TP_GROUP_MIXIN (self);
GObject *object = (GObject *) self;
TpIntset *add_remote_pending;
+ GHashTable *details;
g_assert (!tp_handle_set_is_member (mixin->members, mixin->self_handle));
g_assert (!tp_handle_set_is_member (mixin->remote_pending,
@@ -201,12 +218,18 @@ join_room (ExampleCSHRoomChannel *self)
add_remote_pending = tp_intset_new ();
tp_intset_add (add_remote_pending, mixin->self_handle);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "actor", G_TYPE_UINT, conn->self_handle,
+ NULL);
+
tp_group_mixin_add_handle_owner (object, mixin->self_handle,
conn->self_handle);
- tp_group_mixin_change_members (object, "", NULL, NULL, NULL,
- add_remote_pending, conn->self_handle,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ tp_group_mixin_change_members (object, NULL, NULL, NULL,
+ add_remote_pending, details);
+ g_hash_table_unref (details);
tp_intset_destroy (add_remote_pending);
/* Actually join the room. In a real implementation this would be a network
@@ -269,8 +292,7 @@ constructor (GType type,
/* Initially, we can't do anything. */
tp_group_mixin_change_flags (object,
- TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES |
- TP_CHANNEL_GROUP_FLAG_PROPERTIES,
+ TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES,
0);
/* Immediately attempt to join the group */
diff --git a/spec/Channel_Interface_Group.xml b/spec/Channel_Interface_Group.xml
index 890e84ebe..127aa69f8 100644
--- a/spec/Channel_Interface_Group.xml
+++ b/spec/Channel_Interface_Group.xml
@@ -18,8 +18,10 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Group">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <interface name="im.telepathy1.Channel.Interface.Group1">
+ <tp:requires interface="im.telepathy1.Channel"/>
+ <tp:changed version="UNRELEASED">Deprecated methods, signals, and
+ properties have all been removed.</tp:changed>
<tp:struct name="Local_Pending_Info" array-name="Local_Pending_Info_List">
<tp:docstring>A structure representing a contact whose attempt to
@@ -73,50 +75,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
connection managers must silently accept this, without error.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotCapable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Full"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.InviteOnly"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Banned"/>
- </tp:possible-errors>
- </method>
-
- <method name="GetAllMembers" tp:name-for-bindings="Get_All_Members">
- <tp:deprecated version="0.17.6">Use GetAll on the D-Bus
- Properties D-Bus interface to get properties including Members,
- RemotePendingMembers and LocalPendingMembers instead, falling back to
- this method and GetLocalPendingMembersWithInfo if necessary.
- </tp:deprecated>
-
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Members">
- <tp:docstring>
- array of handles of current members
- </tp:docstring>
- </arg>
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Local_Pending">
- <tp:docstring>
- array of handles of local pending members
- </tp:docstring>
- </arg>
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Remote_Pending">
- <tp:docstring>
- array of handles of remote pending members
- </tp:docstring>
- </arg>
- <tp:docstring>
- Returns arrays of all current, local and remote pending channel
- members.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.NotCapable"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.Channel.Full"/>
+ <tp:error name="im.telepathy1.Error.Channel.InviteOnly"/>
+ <tp:error name="im.telepathy1.Error.Channel.Banned"/>
</tp:possible-errors>
</method>
@@ -180,13 +147,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:flag suffix="Channel_Specific_Handles" value="256">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>
- The members of this group have handles which are specific to
- this channel, and are not valid as general-purpose handles on
- the connection. Depending on the channel, it may be possible to
- check the <tp:member-ref>HandleOwners</tp:member-ref> property or
- call <tp:member-ref>GetHandleOwners</tp:member-ref> to find the
- owners of these handles, which should be done if you wish to (e.g.)
- subscribe to the contact's presence.
+ The members of this group have handles which are specific
+ to this channel, and are not valid as general-purpose
+ handles on the connection. Depending on the channel, it
+ may be possible to check the
+ <tp:member-ref>HandleOwners</tp:member-ref> property to
+ find the owners of these handles, which should be done if
+ you wish to (e.g.) subscribe to the contact's presence.
</p>
<p>
@@ -206,43 +173,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:flag>
<tp:flag suffix="Handle_Owners_Not_Available" value="1024">
<tp:docstring>
- In rooms with channel specific handles (ie Channel_Specific_Handles
+ In rooms with channel specific handles (i.e. Channel_Specific_Handles
flag is set), this flag indicates that no handle owners are
available, apart from the owner of the
<tp:member-ref>SelfHandle</tp:member-ref>.
<tp:rationale>
- This used to be an important optimization to avoid repeated
- GetHandleOwners calls, before we introduced the
+ This used to be an important optimization to avoid
+ repeated calls to the now-removed GetHandleOwners method,
+ before we introduced the
<tp:member-ref>HandleOwners</tp:member-ref> property and
- <tp:member-ref>HandleOwnersChanged</tp:member-ref> signal.
+ <tp:member-ref>HandleOwnersChanged</tp:member-ref>
+ signal.
</tp:rationale>
</tp:docstring>
</tp:flag>
- <tp:flag suffix="Properties" value="2048">
- <tp:docstring>
- This flag indicates that all the properties introduced in
- specification 0.17.6 are fully supported.
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="Members_Changed_Detailed" value="4096">
- <tp:docstring>
- Indicates that <tp:member-ref>MembersChangedDetailed</tp:member-ref>
- will be emitted for changes to this group's members in addition to
- <tp:member-ref>MembersChanged</tp:member-ref>.
- Clients can then connect to the former and ignore emission of the
- latter. This flag's state MUST NOT change over the lifetime of a
- channel.
-
- <tp:rationale>
- If it were allowed to change, client bindings would have to always
- connect to MembersChanged just in case the flag ever went away (and
- generally be unnecessarily complicated), which would mostly negate
- the point of having this flag in the first place.
- </tp:rationale>
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="Message_Depart" value="8192">
+ <tp:flag suffix="Message_Depart" value="2048">
<tp:added version="0.17.21"/>
<tp:docstring>
A message may be sent to the server when calling
@@ -265,37 +211,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
which operations are currently valid. Change notification is via
the <tp:member-ref>GroupFlagsChanged</tp:member-ref> signal.
</tp:docstring>
- <tp:added version="0.17.6">For backwards compatibility,
- clients should fall back to calling GetGroupFlags if
- Channel_Group_Flag_Properties is not present.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
- <method name="GetGroupFlags" tp:name-for-bindings="Get_Group_Flags">
- <arg direction="out" type="u" tp:type="Channel_Group_Flags"
- name="Group_Flags">
- <tp:docstring>
- The value of the GroupFlags property
- </tp:docstring>
- </arg>
- <tp:docstring>
- Returns the value of the <tp:member-ref>GroupFlags</tp:member-ref> property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use GetAll on the D-Bus
- Properties D-Bus interface to get properties including GroupFlags
- instead, falling back to this method if necessary.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
<tp:mapping name="Handle_Owner_Map">
<tp:docstring>
A map from channel-specific handles to their owners.
</tp:docstring>
- <tp:added version="0.17.6">For backwards compatibility,
- clients should fall back to calling GetHandleOwners if
- Channel_Group_Flag_Properties is not present.</tp:added>
+ <tp:added version="0.17.6"/>
<tp:member type="u" name="Channel_Specific_Handle"
tp:type="Contact_Handle">
@@ -321,7 +244,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Handles which are channel-specific, but for which the owner is
unknown, MUST appear in this mapping with 0 as owner. Change
notification is via the
- <tp:member-ref>HandleOwnersChanged</tp:member-ref> signal.
+ <tp:member-ref>HandleOwnersChanged</tp:member-ref>
+ signal.
</tp:docstring>
<tp:added version="0.17.6"/>
</property>
@@ -329,36 +253,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<signal name="HandleOwnersChanged"
tp:name-for-bindings="Handle_Owners_Changed">
<tp:docstring>
- Emitted whenever the <tp:member-ref>HandleOwners</tp:member-ref>
- property changes.
- </tp:docstring>
- <tp:added version="0.17.6">This signal should not be relied on
- unless Channel_Group_Flag_Properties is present.</tp:added>
- <tp:deprecated version="0.23.4">Clients should listen to
- <tp:member-ref>HandleOwnersChangedDetailed</tp:member-ref> instead to
- get the new identifiers as well.
- </tp:deprecated>
-
- <arg name="Added" type="a{uu}" tp:type="Handle_Owner_Map">
- <tp:docstring>
- A map from channel-specific handles to their owners, in which the
- keys include all the handles that were added to the keys of the
- HandleOwners property, and all the handles in that property whose
- owner has changed
- </tp:docstring>
- </arg>
- <arg name="Removed" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- The channel-specific handles that were removed from the keys of the
- HandleOwners property, as a result of the contact leaving this group
- in a previous <tp:member-ref>MembersChanged</tp:member-ref> signal
- </tp:docstring>
- </arg>
- </signal>
-
- <signal name="HandleOwnersChangedDetailed"
- tp:name-for-bindings="Handle_Owners_Changed_Detailed">
- <tp:docstring>
<p>Emitted whenever the <tp:member-ref>HandleOwners</tp:member-ref>
property changes.</p>
@@ -394,102 +288,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
</signal>
- <method name="GetHandleOwners" tp:name-for-bindings="Get_Handle_Owners">
- <arg direction="in" name="Handles" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of integer handles representing members of the channel
- </tp:docstring>
- </arg>
- <arg direction="out" type="au" tp:type="Contact_Handle[]" name="Owners">
- <tp:docstring>
- An array of integer handles representing the owner handles of
- the given room members, in the same order, or 0 if the
- owner is not available
- </tp:docstring>
- </arg>
- <tp:docstring>
- If the CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES flag is set on
- the channel, then the handles of the group members are specific
- to this channel, and are not meaningful in a connection-wide
- context such as contact lists. This method allows you to find
- the owner of the handle if it can be discovered in this channel,
- or 0 if the owner is not available.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Clients should use the
- HandleOwners property and HandleOwnersChanged signal if
- Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- This channel doesn't have the CHANNEL_SPECIFIC_HANDLES flag,
- so handles in this channel are globally meaningful and calling
- this method is not necessary
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- One of the given handles is not a member
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <method name="GetLocalPendingMembers"
- tp:name-for-bindings="Get_Local_Pending_Members">
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Handles"/>
- <tp:docstring>
- Returns the To_Be_Added handle (only) for each structure in the
- <tp:member-ref>LocalPendingMembers</tp:member-ref> property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use the LocalPendingMembers
- property, if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
- <method name="GetLocalPendingMembersWithInfo"
- tp:name-for-bindings="Get_Local_Pending_Members_With_Info">
- <tp:added version="0.15.0" />
- <tp:docstring>
- Returns the <tp:member-ref>LocalPendingMembers</tp:member-ref> property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use the LocalPendingMembers
- property, if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <arg direction="out" type="a(uuus)" tp:type="Local_Pending_Info[]"
- name="Info">
- <tp:docstring>
- An array of structs containing:
- <ul>
- <li>
- A handle representing the contact requesting channel membership
- </li>
- <li>
- A handle representing the contact making the request, or 0 if
- unknown
- </li>
- <li>
- The reason for the request: one of the values of
- <tp:type>Channel_Group_Change_Reason</tp:type>
- </li>
- <li>
- A string message containing the reason for the request if any (or
- blank if none)
- </li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
<property name="LocalPendingMembers" access="read"
type="a(uuus)" tp:type="Local_Pending_Info[]"
tp:name-for-bindings="Local_Pending_Members">
@@ -498,10 +296,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
requesting channel membership and awaiting local approval with
<tp:member-ref>AddMembers</tp:member-ref>.
</tp:docstring>
- <tp:added version="0.17.6">If Channel_Group_Flag_Properties is
- not present, clients should fall back to using the
- deprecated GetLocalPendingMembersWithInfo method, or fall back
- from that to the deprecated GetAllMembers method.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
<property name="Members" tp:name-for-bindings="Members"
@@ -509,70 +304,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring>
The members of this channel.
</tp:docstring>
- <tp:added version="0.17.6">If Channel_Group_Flag_Properties
- is not set, fall back to calling GetAllMembers.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
- <method name="GetMembers" tp:name-for-bindings="Get_Members">
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Handles"/>
- <tp:docstring>
- Returns the <tp:member-ref>Members</tp:member-ref> property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use the Members
- property, if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
<property name="RemotePendingMembers" access="read" type="au"
tp:type="Contact_Handle[]" tp:name-for-bindings="Remote_Pending_Members">
<tp:docstring>
An array of handles representing contacts who have been
invited to the channel and are awaiting remote approval.
</tp:docstring>
- <tp:added version="0.17.6">If Channel_Group_Flag_Properties
- is not set, fall back to calling GetAllMembers.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
- <method name="GetRemotePendingMembers"
- tp:name-for-bindings="Get_Remote_Pending_Members">
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Handles"/>
- <tp:docstring>
- Returns an array of handles representing contacts who have been
- invited to the channel and are awaiting remote approval.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use the
- <tp:member-ref>RemotePendingMembers</tp:member-ref>
- property, if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
- <signal name="SelfHandleChanged" tp:name-for-bindings="Self_Handle_Changed">
- <tp:docstring>
- Emitted whenever the <tp:member-ref>SelfHandle</tp:member-ref> property
- changes.
- </tp:docstring>
- <tp:added version="0.17.6">This signal should not be relied on
- unless Channel_Group_Flag_Properties is present.</tp:added>
- <tp:deprecated version="0.23.4">Clients should listen to
- <tp:member-ref>SelfContactChanged</tp:member-ref> instead to get the new
- identifier as well.
- </tp:deprecated>
-
- <arg type="u" tp:type="Contact_Handle" name="Self_Handle">
- <tp:docstring>
- The new value of the SelfHandle property.
- </tp:docstring>
- </arg>
- </signal>
-
<signal name="SelfContactChanged" tp:name-for-bindings="Self_Contact_Changed">
<tp:docstring>
<p>Emitted whenever the <tp:member-ref>SelfHandle</tp:member-ref> property
@@ -600,18 +343,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
access="read" tp:name-for-bindings="Self_Handle">
<tp:docstring>
The handle for the user on this channel (which can also be a
- local or remote pending member), or 0 if the user is not a member at
- all (which is likely to be the case, for instance, on <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">ContactList</tp:dbus-ref>
- channels). Note that this is different from the result of
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.GetSelfHandle</tp:dbus-ref>
- on some protocols, so the value of this handle should
+ local or remote pending member), or 0 if the user is not a
+ member at all (which is likely to be the case, for instance,
+ on the old ContactList channels). Note that this is different
+ from the value of the <tp:dbus-ref
+ namespace="im.telepathy1">Connection.SelfHandle</tp:dbus-ref>
+ property on some protocols, so the value of this handle should
always be used with the methods of this interface.
</tp:docstring>
- <tp:added version="0.17.6">For backwards compatibility,
- clients should fall back to calling GetSelfHandle if
- Channel_Group_Flag_Properties is not present.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
<property name="MemberIdentifiers" type="a{us}" tp:type="Handle_Identifier_Map"
@@ -623,30 +363,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
least the identifiers for
<tp:member-ref>SelfHandle</tp:member-ref>,
<tp:member-ref>Members</tp:member-ref>,
- <tp:member-ref>LocalPendingMembers</tp:member-ref> (and their actors if
- any),
<tp:member-ref>RemotePendingMembers</tp:member-ref> and
<tp:member-ref>HandleOwners</tp:member-ref>.
</tp:docstring>
<tp:added version="0.23.4"/>
</property>
- <method name="GetSelfHandle" tp:name-for-bindings="Get_Self_Handle">
- <arg direction="out" type="u" tp:type="Contact_Handle"
- name="Self_Handle"/>
- <tp:docstring>
- Returns the value of the <tp:member-ref>SelfHandle</tp:member-ref>
- property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Clients should retrieve the
- SelfHandle property using GetAll instead,
- if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
<signal name="GroupFlagsChanged" tp:name-for-bindings="Group_Flags_Changed">
<arg name="Added" type="u" tp:type="Channel_Group_Flags">
<tp:docstring>
@@ -659,9 +381,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
</arg>
<tp:docstring>
- Emitted when the flags as returned by
- <tp:member-ref>GetGroupFlags</tp:member-ref> are changed.
- The user interface should be updated as appropriate.
+ Emitted when the flags as retrieved by the
+ <tp:member-ref>GroupFlags</tp:member-ref> property are
+ changed. The user interface should be updated as appropriate.
</tp:docstring>
</signal>
@@ -669,14 +391,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The reason for a set of handles to move to one of
<tp:member-ref>Members</tp:member-ref>,
- <tp:member-ref>LocalPendingMembers</tp:member-ref> or
<tp:member-ref>RemotePendingMembers</tp:member-ref>, or to be removed
from the group. A client may supply a reason when attempting to
remove members from a group with
- <tp:member-ref>RemoveMembersWithReason</tp:member-ref>, and reasons
+ <tp:member-ref>RemoveMembers</tp:member-ref>, and reasons
are supplied by the CM when emitting
- <tp:member-ref>MembersChanged</tp:member-ref> and
- <tp:member-ref>MembersChangedDetailed</tp:member-ref>. Some reason
+ <tp:member-ref>MembersChanged</tp:member-ref>. Some reason
codes have different meanings depending on the <var>Actor</var> in a
MembersChanged signal.</p>
</tp:docstring>
@@ -693,11 +413,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is removed from
a group for this reason and the actor is not the SelfHandle, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Terminated</code>.</p>
+ <code>im.telepathy1.Error.Terminated</code>.</p>
<p>If the SelfHandle is removed from a group for this reason and
the actor is also the SelfHandle, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cancelled</code>.</p>
+ <code>im.telepathy1.Error.Cancelled</code>.</p>
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Offline" value="1">
@@ -705,12 +425,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>The change is due to a user going offline. Also used when
user is already offline, but this wasn't known previously.</p>
- <p>If a one-to-one <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- call fails because the contact being called is offline, the
- connection manager SHOULD indicate this by removing both the
- <tp:member-ref>SelfHandle</tp:member-ref> and the other contact's
- handle from the Group interface with reason Offline.</p>
+ <p>If a one-to-one StreamedMedia call fails because the
+ contact being called is offline, the connection manager
+ SHOULD indicate this by removing both the
+ <tp:member-ref>SelfHandle</tp:member-ref> and the other
+ contact's handle from the Group interface with reason
+ Offline.</p>
<tp:rationale>
For 1-1 calls, the call terminates as a result of removing the
@@ -720,7 +440,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If a handle is removed from a group for this reason, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Offline</code>.</p>
+ <code>im.telepathy1.Error.Offline</code>.</p>
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Kicked" value="2">
@@ -729,7 +449,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is removed
from a group for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Channel.Kicked</code>.
+ <code>im.telepathy1.Error.Channel.Kicked</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -737,12 +457,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The change is due to a busy indication.</p>
- <p>If a one-to-one <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- call fails because the contact being called is busy, the
- connection manager SHOULD indicate this by removing both the
- <tp:member-ref>SelfHandle</tp:member-ref> and the other contact's
- handle from the Group interface with reason Busy.</p>
+ <p>If a one-to-one StreamedMedia call fails because the
+ contact being called is busy, the connection manager
+ SHOULD indicate this by removing both the
+ <tp:member-ref>SelfHandle</tp:member-ref> and the other
+ contact's handle from the Group interface with reason
+ Busy.</p>
<tp:rationale>
For 1-1 calls, the call terminates as a result of removing the
@@ -752,7 +472,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is removed
from a group for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Busy</code>.
+ <code>im.telepathy1.Error.Busy</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -774,7 +494,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is removed
from a group for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Channel.Banned</code>.
+ <code>im.telepathy1.Error.Channel.Banned</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -803,7 +523,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If a contact is removed from a group for this reason, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.DoesNotExist</code>.
+ <code>im.telepathy1.Error.DoesNotExist</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -811,13 +531,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The change is because the requested contact did not respond.</p>
- <p>If a one-to-one <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- call fails because the contact being called did not respond, or the
- local user did not respond to an incoming call, the
- connection manager SHOULD indicate this by removing both the
- <tp:member-ref>SelfHandle</tp:member-ref> and the other contact's
- handle from the Group interface with reason No_Answer.</p>
+ <p>If a one-to-one StreamedMedia call fails because the
+ contact being called did not respond, or the local user
+ did not respond to an incoming call, the connection
+ manager SHOULD indicate this by removing both the
+ <tp:member-ref>SelfHandle</tp:member-ref> and the other
+ contact's handle from the Group interface with reason
+ No_Answer.</p>
<tp:rationale>
Documenting existing practice.
@@ -825,7 +545,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If a contact is removed from a group for this reason, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.NoAnswer</code>.
+ <code>im.telepathy1.Error.NoAnswer</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -834,10 +554,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>The change is because a contact's unique identifier changed.
There must be exactly one handle in the removed set and exactly
one handle in one of the added sets. The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Renaming">Renamed</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Renaming1">Renamed</tp:dbus-ref>
signal on the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Renaming</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface">Renaming1</tp:dbus-ref>
interface will have been emitted for the same handles,
shortly before this <tp:member-ref>MembersChanged</tp:member-ref> signal is emitted.</p>
</tp:docstring>
@@ -849,7 +569,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If a contact is removed from a group for this reason, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.PermissionDenied</code>.
+ <code>im.telepathy1.Error.PermissionDenied</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -864,9 +584,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
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. <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>
- or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Tubes</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>
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
@@ -886,66 +604,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:enumvalue>
</tp:enum>
- <signal name="MembersChanged" tp:name-for-bindings="Members_Changed">
- <arg name="Message" type="s">
- <tp:docstring>
- A string message from the server, or blank if not
- </tp:docstring>
- </arg>
- <arg name="Added" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of members added to the channel
- </tp:docstring>
- </arg>
- <arg name="Removed" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of members removed from the channel
- </tp:docstring>
- </arg>
- <arg name="Local_Pending" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of members who are pending local approval
- </tp:docstring>
- </arg>
- <arg name="Remote_Pending" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of members who are pending remote approval
- </tp:docstring>
- </arg>
- <arg name="Actor" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- The contact handle of the person who made the change, or 0
- if not known
- </tp:docstring>
- </arg>
- <arg name="Reason" type="u" tp:type="Channel_Group_Change_Reason">
- <tp:docstring>
- A reason for the change
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when contacts join any of the three lists (members, local
- pending or remote pending) or when they leave any of the three lists.
- There may also be a message from the server regarding this change,
- which may be displayed to the user if desired.</p>
-
- <p>All channel-specific handles that are mentioned in this signal
- MUST be represented in the value of the
- <tp:member-ref>HandleOwners</tp:member-ref> property.
- In practice, this will mean that
- <tp:member-ref>HandleOwnersChanged</tp:member-ref> is
- emitted <em>before</em> emitting a MembersChanged signal in which
- channel-specific handles are added, but that it is emitted
- <em>after</em> emitting a MembersChanged signal in which
- channel-specific handles are removed.</p>
-
- <p>See <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- for an overview of how group state changes are used to indicate the
- progress of a call.</p>
- </tp:docstring>
- </signal>
-
<tp:mapping name="Handle_Identifier_Map">
<tp:docstring>
A map from handles to the corresponding normalized string identifier.
@@ -960,14 +618,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member type="s" name="Identifier">
<tp:docstring>
The same string that would be returned by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>
+ namespace="im.telepathy1.Connection">InspectHandles</tp:dbus-ref>
for this handle.
</tp:docstring>
</tp:member>
</tp:mapping>
- <signal name="MembersChangedDetailed"
- tp:name-for-bindings="Members_Changed_Detailed">
+ <signal name="MembersChanged"
+ tp:name-for-bindings="Members_Changed">
<arg name="Added" type="au" tp:type="Contact_Handle[]">
<tp:docstring>
A list of members added to the channel
@@ -1055,26 +713,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Emitted when contacts join any of the three lists (members, local
pending or remote pending) or when they leave any of the three
- lists. This signal provides a superset of the information provided by
- <tp:member-ref>MembersChanged</tp:member-ref>;
- if the channel's <tp:member-ref>GroupFlags</tp:member-ref>
- contains Members_Changed_Detailed, then clients may listen exclusively
- to this signal in preference to that signal.</p>
+ lists.</p>
<p>All channel-specific handles that are mentioned in this signal
MUST be represented in the value of the
- <tp:member-ref>HandleOwners</tp:member-ref> property. In practice,
- this will mean that
- <tp:member-ref>HandleOwnersChanged</tp:member-ref> is emitted
- <em>before</em> emitting a MembersChangedDetailed signal in which
- channel-specific handles are added, but that it is emitted
- <em>after</em> emitting a MembersChangedDetailed signal in which
- channel-specific handles are removed.</p>
-
- <p>See <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- for an overview of how group state changes are used to indicate the
- progress of a call.</p>
+ <tp:member-ref>HandleOwners</tp:member-ref> property.</p>
</tp:docstring>
<tp:added version="0.17.16"/>
</signal>
@@ -1090,6 +733,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
A string message, which can be blank if desired
</tp:docstring>
</arg>
+ <arg direction="in" name="Reason" type="u"
+ tp:type="Channel_Group_Change_Reason">
+ <tp:docstring>
+ A reason for the change
+ </tp:docstring>
+ </arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Requests the removal of contacts from a channel, reject their
request for channel membership on the pending local list, or
@@ -1097,10 +746,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is in a Group,
it can be removed via this method, in order to leave the group
- gracefully. This is the recommended way to leave a chatroom, close
- or reject a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- call, and so on.</p>
+ gracefully. This is the recommended way to leave a chatroom.</p>
<p>Accordingly, connection managers SHOULD support
doing this, regardless of the value of
@@ -1108,7 +754,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
If doing so fails with PermissionDenied, this is considered to a bug
in the connection manager, but clients MUST recover by falling back
to closing the channel with the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">Close</tp:dbus-ref>
method.</p>
<p>Removing any contact from the local pending list is always
@@ -1129,47 +775,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Channel_Group_Flag_Message_Rescind
<tp:member-ref>GroupFlags</tp:member-ref> to see in which cases this
message should be provided.</p>
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- </tp:possible-errors>
- </method>
- <method name="RemoveMembersWithReason"
- tp:name-for-bindings="Remove_Members_With_Reason">
- <arg direction="in" name="Contacts" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- An array of contact handles to remove from the channel
- </tp:docstring>
- </arg>
- <arg direction="in" name="Message" type="s">
- <tp:docstring>
- A string message, which can be blank if desired
- </tp:docstring>
- </arg>
- <arg direction="in" name="Reason" type="u"
- tp:type="Channel_Group_Change_Reason">
- <tp:docstring>
- A reason for the change
- </tp:docstring>
- </arg>
- <tp:docstring>
- As <tp:member-ref>RemoveMembers</tp:member-ref>, but a reason code may
- be provided where
- appropriate. The reason code may be ignored if the underlying
- protocol is unable to represent the given reason.
+ <p>The reason code may be ignored if the underlying
+ protocol is unable to represent the given reason.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The provided reason code was invalid.
</tp:docstring>
@@ -1183,11 +799,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
cannot be presumed by the channel's existence (for example, a channel you
may request membership of but your request may not be granted).</p>
- <p>This interface implements three lists: a list of current members
- (<tp:member-ref>Members</tp:member-ref>), and two lists of local pending
- and remote pending members
- (<tp:member-ref>LocalPendingMembers</tp:member-ref> and
- <tp:member-ref>RemotePendingMembers</tp:member-ref>, respectively).
+ <p>This interface implements two lists: a list of current members
+ (<tp:member-ref>Members</tp:member-ref>), and a list of remote
+ pending members (<tp:member-ref>RemotePendingMembers</tp:member-ref>).
Contacts on the remote
pending list have been invited to the channel, but the remote user has not
accepted the invitation. Contacts on the local pending list have requested
@@ -1195,19 +809,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
their request before they may join. A single contact should never appear on
more than one of the three lists. The lists are empty when the channel is
created, and the <tp:member-ref>MembersChanged</tp:member-ref> signal
- (and, if the channel's <tp:member-ref>GroupFlags</tp:member-ref> contains
- Members_Changed_Detailed, the
- <tp:member-ref>MembersChangedDetailed</tp:member-ref> signal)
- should be emitted when information
- is retrieved from the server, or changes occur.</p>
-
- <p>If the <tp:member-ref>MembersChanged</tp:member-ref> or
- <tp:member-ref>MembersChangedDetailed</tp:member-ref> signal indicates
+ should be emitted when information is retrieved from the server,
+ or changes occur.</p>
+
+ <p>If the <tp:member-ref>MembersChanged</tp:member-ref> signal indicates
that the <tp:member-ref>SelfHandle</tp:member-ref> has been removed from
the channel, and the channel subsequently emits <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Closed</tp:dbus-ref>,
- clients SHOULD consider the details given in the MembersChanged or
- MembersChangedDetailed signal to be the reason why the channel closed.</p>
+ namespace="im.telepathy1.Channel">Closed</tp:dbus-ref>,
+ clients SHOULD consider the details given in the MembersChanged
+ signal to be the reason why the channel closed.</p>
<p>Addition of members to the channel may be requested by using
<tp:member-ref>AddMembers</tp:member-ref>. If
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index ca5aaa58a..90c8f49ac 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -542,16 +542,6 @@ tp_channel_got_group_properties_cb (TpProxy *proxy,
_got_initial_group_flags (self,
tp_asv_get_uint32 (asv, "GroupFlags", NULL));
- if ((self->priv->group_flags & TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED) == 0 ||
- (self->priv->group_flags & TP_CHANNEL_GROUP_FLAG_PROPERTIES) == 0)
- {
- GError e = { TP_ERRORS, TP_ERROR_SOFTWARE_UPGRADE_REQUIRED,
- "MembersChangedDetailed and Properties group flags are "
- "mandatory" };
- _tp_channel_abort_introspection (self, "Invalid group flags", &e);
- return;
- }
-
tp_channel_group_self_handle_changed_cb (self,
tp_asv_get_uint32 (asv, "SelfHandle", NULL), NULL, NULL);
@@ -868,9 +858,7 @@ handle_members_changed (TpChannel *self,
}
}
- g_signal_emit_by_name (self, "group-members-changed", message,
- added, removed, local_pending, remote_pending, actor, reason);
- g_signal_emit_by_name (self, "group-members-changed-detailed", added,
+ g_signal_emit_by_name (self, "group-members-changed", added,
removed, local_pending, remote_pending, details);
_tp_channel_contacts_members_changed (self, added, removed,
@@ -878,20 +866,20 @@ handle_members_changed (TpChannel *self,
}
static void
-tp_channel_group_members_changed_detailed_cb (TpChannel *self,
- const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
- GHashTable *details,
- gpointer unused G_GNUC_UNUSED,
- GObject *weak_obj G_GNUC_UNUSED)
+tp_channel_group_members_changed_cb (TpChannel *self,
+ const GArray *added,
+ const GArray *removed,
+ const GArray *local_pending,
+ const GArray *remote_pending,
+ GHashTable *details,
+ gpointer unused G_GNUC_UNUSED,
+ GObject *weak_obj G_GNUC_UNUSED)
{
const gchar *message;
guint actor;
guint reason;
- DEBUG ("%p MembersChangedDetailed: added %u, removed %u, "
+ DEBUG ("%p MembersChanged: added %u, removed %u, "
"moved %u to LP and %u to RP",
self, added->len, removed->len, local_pending->len, remote_pending->len);
@@ -911,6 +899,7 @@ static void
tp_channel_handle_owners_changed_cb (TpChannel *self,
GHashTable *added,
const GArray *removed,
+ GHashTable *identifiers,
gpointer unused G_GNUC_UNUSED,
GObject *unused_object G_GNUC_UNUSED)
{
@@ -927,29 +916,12 @@ tp_channel_handle_owners_changed_cb (TpChannel *self,
g_hash_table_remove (self->priv->group_handle_owners,
GUINT_TO_POINTER (g_array_index (removed, guint, i)));
}
-}
-
-
-static void
-tp_channel_handle_owners_changed_detailed_cb (TpChannel *self,
- GHashTable *added,
- const GArray *removed,
- GHashTable *identifiers,
- gpointer user_data,
- GObject *weak_object)
-{
- tp_channel_handle_owners_changed_cb (self, added, removed, user_data,
- weak_object);
_tp_channel_contacts_handle_owners_changed (self, added, removed,
identifiers);
}
-#define IMMUTABLE_FLAGS \
- (TP_CHANNEL_GROUP_FLAG_PROPERTIES | \
- TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED)
-
static void
tp_channel_group_flags_changed_cb (TpChannel *self,
guint added,
@@ -967,19 +939,6 @@ tp_channel_group_flags_changed_cb (TpChannel *self,
DEBUG ("%p GroupFlagsChanged (after filtering): +%u -%u",
self, added, removed);
- if ((added & IMMUTABLE_FLAGS) || (removed & IMMUTABLE_FLAGS))
- {
- GError *e = g_error_new (TP_DBUS_ERRORS, TP_DBUS_ERROR_INCONSISTENT,
- "CM is broken: it changed the Properties/"
- "Members_Changed_Detailed flags on an existing group channel "
- "(offending changes: added=%u, removed=%u)",
- added & IMMUTABLE_FLAGS, removed & IMMUTABLE_FLAGS);
-
- tp_proxy_invalidate ((TpProxy *) self, e);
- g_error_free (e);
- return;
- }
-
self->priv->group_flags |= added;
self->priv->group_flags &= ~removed;
@@ -991,9 +950,6 @@ tp_channel_group_flags_changed_cb (TpChannel *self,
}
}
-#undef IMMUTABLE_FLAGS
-
-
void
_tp_channel_get_group_properties (TpChannel *self)
{
@@ -1024,11 +980,11 @@ _tp_channel_get_group_properties (TpChannel *self)
return; \
}
- sc = tp_cli_channel_interface_group_connect_to_members_changed_detailed (self,
- tp_channel_group_members_changed_detailed_cb, NULL, NULL, NULL, &error);
+ sc = tp_cli_channel_interface_group_connect_to_members_changed (self,
+ tp_channel_group_members_changed_cb, NULL, NULL, NULL, &error);
if (sc == NULL)
- DIE ("MembersChangedDetailed");
+ DIE ("MembersChanged");
sc = tp_cli_channel_interface_group_connect_to_group_flags_changed (self,
tp_channel_group_flags_changed_cb, NULL, NULL, NULL, &error);
@@ -1042,12 +998,12 @@ _tp_channel_get_group_properties (TpChannel *self)
if (sc == NULL)
DIE ("SelfContactChanged");
- sc = tp_cli_channel_interface_group_connect_to_handle_owners_changed_detailed (
- self, tp_channel_handle_owners_changed_detailed_cb, NULL, NULL, NULL,
+ sc = tp_cli_channel_interface_group_connect_to_handle_owners_changed (
+ self, tp_channel_handle_owners_changed_cb, NULL, NULL, NULL,
&error);
if (sc == NULL)
- DIE ("HandleOwnersChangedDetailed");
+ DIE ("HandleOwnersChanged");
tp_cli_dbus_properties_call_get_all (self, -1,
TP_IFACE_CHANNEL_INTERFACE_GROUP, tp_channel_got_group_properties_cb,
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 4765dea3b..81dc5a210 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -111,7 +111,6 @@ enum
enum {
SIGNAL_GROUP_FLAGS_CHANGED,
SIGNAL_GROUP_MEMBERS_CHANGED,
- SIGNAL_GROUP_MEMBERS_CHANGED_DETAILED,
SIGNAL_GROUP_CONTACTS_CHANGED,
SIGNAL_CHAT_STATE_CHANGED,
N_SIGNALS
@@ -1499,35 +1498,7 @@ tp_channel_class_init (TpChannelClass *klass)
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
/**
- * TpChannel::group-members-changed: (skip)
- * @self: a channel
- * @message: an optional textual message
- * @added: a #GArray of #guint containing the full members added
- * @removed: a #GArray of #guint containing the members (full,
- * local-pending or remote-pending) removed
- * @local_pending: a #GArray of #guint containing the local-pending
- * members added
- * @remote_pending: a #GArray of #guint containing the remote-pending
- * members added
- * @actor: the #TpHandle of the contact causing the change, or 0
- * @reason: the reason for the change as a #TpChannelGroupChangeReason
- *
- * Emitted when the group members change in a Group channel that is ready.
- *
- * Since: 0.7.12
- */
- signals[SIGNAL_GROUP_MEMBERS_CHANGED] = g_signal_new (
- "group-members-changed", G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0,
- NULL, NULL,
- _tp_marshal_VOID__STRING_BOXED_BOXED_BOXED_BOXED_UINT_UINT,
- G_TYPE_NONE, 7,
- G_TYPE_STRING, au_type, au_type, au_type, au_type, G_TYPE_UINT,
- G_TYPE_UINT);
-
- /**
- * TpChannel::group-members-changed-detailed:
+ * TpChannel::group-members-changed:
* @self: a channel
* @added: (type GLib.Array) (element-type uint): a #GArray of #guint
* containing the full members added
@@ -1540,17 +1511,14 @@ tp_channel_class_init (TpChannelClass *klass)
* @details: (type GLib.HashTable) (element-type utf8 GObject.Value):
* a #GHashTable mapping (gchar *) to #GValue containing details
* about the change, as described in the specification of the
- * MembersChangedDetailed signal.
+ * MembersChanged signal.
*
* Emitted when the group members change in a Group channel that is ready.
- * Contains a superset of the information in the
- * TpChannel::group-members-changed signal, and is emitted at the same time;
- * applications can connect to this signal and ignore the other.
*
* Since: 0.7.21
*/
- signals[SIGNAL_GROUP_MEMBERS_CHANGED_DETAILED] = g_signal_new (
- "group-members-changed-detailed", G_OBJECT_CLASS_TYPE (klass),
+ signals[SIGNAL_GROUP_MEMBERS_CHANGED] = g_signal_new (
+ "group-members-changed", G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
NULL, NULL,
@@ -1663,7 +1631,7 @@ tp_channel_class_init (TpChannelClass *klass)
* @details: (type GLib.HashTable) (element-type utf8 GObject.Value):
* a #GHashTable mapping (gchar *) to #GValue containing details
* about the change, as described in the specification of the
- * MembersChangedDetailed signal.
+ * MembersChanged signal.
*
* Emitted when the group members change in a Group channel.
*
@@ -2297,7 +2265,7 @@ group_prepared_cb (GObject *source,
handles = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 1);
g_array_append_val (handles, self_handle);
- tp_cli_channel_interface_group_call_remove_members_with_reason (
+ tp_cli_channel_interface_group_call_remove_members (
self, -1, handles, ctx->message, ctx->reason,
channel_remove_self_cb, g_object_ref (ctx->result), NULL, NULL);
diff --git a/telepathy-glib/group-mixin.c b/telepathy-glib/group-mixin.c
index db90b001e..43dddc8f7 100644
--- a/telepathy-glib/group-mixin.c
+++ b/telepathy-glib/group-mixin.c
@@ -334,8 +334,6 @@ tp_group_mixin_init (GObject *obj,
if (self_handle != 0)
mixin->self_handle = tp_handle_ref (handle_repo, self_handle);
- mixin->group_flags = TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED;
-
mixin->members = tp_handle_set_new (handle_repo);
mixin->local_pending = tp_handle_set_new (handle_repo);
mixin->remote_pending = tp_handle_set_new (handle_repo);
@@ -471,8 +469,6 @@ tp_group_mixin_change_self_handle (GObject *obj,
mixin->self_handle = tp_handle_ref (mixin->handle_repo,
new_self_handle);
- tp_svc_channel_interface_group_emit_self_handle_changed (obj,
- new_self_handle);
tp_svc_channel_interface_group_emit_self_contact_changed (obj,
new_self_handle, new_self_id);
@@ -481,25 +477,6 @@ tp_group_mixin_change_self_handle (GObject *obj,
}
-static void
-tp_group_mixin_get_self_handle_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- guint ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_self_handle ((GObject *) obj, &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_self_handle (
- context, ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_group_flags: (skip)
* @obj: An object implementing the group mixin using this interface
@@ -523,25 +500,6 @@ tp_group_mixin_get_group_flags (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_group_flags_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- guint ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_group_flags ((GObject *) obj, &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_group_flags (
- context, ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_add_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -643,32 +601,6 @@ tp_group_mixin_add_members_async (TpSvcChannelInterfaceGroup *obj,
* @obj: An object implementing the group interface using this mixin
* @contacts: A GArray of guint representing contacts
* @message: A message to be sent to those contacts, if supported
- * @error: Used to return an error if %FALSE is returned
- *
- * Request that the given contacts be removed from the group as if in response
- * to user action. If the group's flags prohibit this, raise
- * PermissionDenied. If any of the handles is invalid, raise InvalidHandle.
- * If any of the handles is absent from the group, raise NotAvailable.
- * Otherwise attempt to remove the contacts by calling the callbacks provided
- * by the channel implementation.
- *
- * Returns: %TRUE on success
- */
-gboolean
-tp_group_mixin_remove_members (GObject *obj,
- const GArray *contacts,
- const gchar *message,
- GError **error)
-{
- return tp_group_mixin_remove_members_with_reason (obj, contacts, message,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE, error);
-}
-
-/**
- * tp_group_mixin_remove_members_with_reason: (skip)
- * @obj: An object implementing the group interface using this mixin
- * @contacts: A GArray of guint representing contacts
- * @message: A message to be sent to those contacts, if supported
* @reason: A #TpChannelGroupChangeReason
* @error: Used to return an error if %FALSE is returned
*
@@ -682,7 +614,7 @@ tp_group_mixin_remove_members (GObject *obj,
* Returns: %TRUE on success
*/
gboolean
-tp_group_mixin_remove_members_with_reason (GObject *obj,
+tp_group_mixin_remove_members (GObject *obj,
const GArray *contacts,
const gchar *message,
guint reason,
@@ -784,7 +716,7 @@ tp_group_mixin_remove_members_with_reason (GObject *obj,
}
static void
-tp_group_mixin_remove_members_with_reason_async
+tp_group_mixin_remove_members_async
(TpSvcChannelInterfaceGroup *obj,
const GArray *contacts,
const gchar *message,
@@ -793,10 +725,10 @@ tp_group_mixin_remove_members_with_reason_async
{
GError *error = NULL;
- if (tp_group_mixin_remove_members_with_reason ((GObject *) obj, contacts,
+ if (tp_group_mixin_remove_members ((GObject *) obj, contacts,
message, reason, &error))
{
- tp_svc_channel_interface_group_return_from_remove_members_with_reason
+ tp_svc_channel_interface_group_return_from_remove_members
(context);
}
else
@@ -806,26 +738,6 @@ tp_group_mixin_remove_members_with_reason_async
}
}
-static void
-tp_group_mixin_remove_members_async (TpSvcChannelInterfaceGroup *obj,
- const GArray *contacts,
- const gchar *message,
- DBusGMethodInvocation *context)
-{
- GError *error = NULL;
-
- if (tp_group_mixin_remove_members_with_reason ((GObject *) obj, contacts,
- message, TP_CHANNEL_GROUP_CHANGE_REASON_NONE, &error))
- {
- tp_svc_channel_interface_group_return_from_remove_members (context);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -848,26 +760,6 @@ tp_group_mixin_get_members (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_members ((GObject *) obj, &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_members (
- context, ret);
- g_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_local_pending_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -890,26 +782,6 @@ tp_group_mixin_get_local_pending_members (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_local_pending_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_local_pending_members ((GObject *) obj, &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_local_pending_members (
- context, ret);
- g_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
typedef struct {
TpGroupMixin *mixin;
GPtrArray *array;
@@ -973,32 +845,6 @@ tp_group_mixin_get_local_pending_members_with_info (
return TRUE;
}
-static void
-tp_group_mixin_get_local_pending_members_with_info_async (
- TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GPtrArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_local_pending_members_with_info ((GObject *) obj,
- &ret, &error))
- {
- guint i;
- tp_svc_channel_interface_group_return_from_get_local_pending_members_with_info (
- context, ret);
- for (i = 0 ; i < ret->len; i++) {
- g_value_array_free (g_ptr_array_index (ret,i));
- }
- g_ptr_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_remote_pending_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -1022,27 +868,6 @@ tp_group_mixin_get_remote_pending_members (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_remote_pending_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_remote_pending_members ((GObject *) obj,
- &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_remote_pending_members (
- context, ret);
- g_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_all_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -1074,29 +899,6 @@ tp_group_mixin_get_all_members (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_all_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GArray *mem, *local, *remote;
- GError *error = NULL;
-
- if (tp_group_mixin_get_all_members ((GObject *) obj, &mem, &local, &remote,
- &error))
- {
- tp_svc_channel_interface_group_return_from_get_all_members (
- context, mem, local, remote);
- g_array_unref (mem);
- g_array_unref (local);
- g_array_unref (remote);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_handle_owners: (skip)
* @obj: An object implementing the group interface with this mixin
@@ -1164,28 +966,6 @@ tp_group_mixin_get_handle_owners (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_handle_owners_async (TpSvcChannelInterfaceGroup *obj,
- const GArray *handles,
- DBusGMethodInvocation *context)
-{
- GArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_handle_owners ((GObject *) obj, handles,
- &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_handle_owners (
- context, ret);
- g_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
#define GFTS_APPEND_FLAG_IF_SET(flag) \
if (flags & flag) \
{ \
@@ -1214,8 +994,6 @@ group_flags_to_string (TpChannelGroupFlags flags)
GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES);
GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_ONLY_ONE_GROUP);
GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_HANDLE_OWNERS_NOT_AVAILABLE);
- GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_PROPERTIES);
- GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED);
/* Print out any remaining flags that weren't removed in the above cases
* numerically.
@@ -1508,9 +1286,7 @@ emit_members_changed_signals (GObject *channel,
added_contact_ids = maybe_add_contact_ids (mixin, add, local_pending,
remote_pending, actor, details_);
- tp_svc_channel_interface_group_emit_members_changed (channel, message,
- add, del, local_pending, remote_pending, actor, reason);
- tp_svc_channel_interface_group_emit_members_changed_detailed (channel,
+ tp_svc_channel_interface_group_emit_members_changed (channel,
add, del, local_pending, remote_pending, details_);
if (mixin->priv->externals != NULL)
@@ -1521,9 +1297,7 @@ emit_members_changed_signals (GObject *channel,
{
GObject *external = g_ptr_array_index (mixin->priv->externals, i);
- tp_svc_channel_interface_group_emit_members_changed (external,
- message, add, del, local_pending, remote_pending, actor, reason);
- tp_svc_channel_interface_group_emit_members_changed_detailed (
+ tp_svc_channel_interface_group_emit_members_changed (
external, add, del, local_pending, remote_pending, details_);
}
}
@@ -1658,9 +1432,7 @@ change_members (GObject *obj,
{
GHashTable *empty_hash_table = g_hash_table_new (NULL, NULL);
- tp_svc_channel_interface_group_emit_handle_owners_changed (obj,
- empty_hash_table, arr_owners_removed);
- tp_svc_channel_interface_group_emit_handle_owners_changed_detailed (
+ tp_svc_channel_interface_group_emit_handle_owners_changed (
obj, empty_hash_table, arr_owners_removed, empty_hash_table);
if (mixin->priv->externals != NULL)
@@ -1671,9 +1443,6 @@ change_members (GObject *obj,
{
tp_svc_channel_interface_group_emit_handle_owners_changed (
g_ptr_array_index (mixin->priv->externals, i),
- empty_hash_table, arr_owners_removed);
- tp_svc_channel_interface_group_emit_handle_owners_changed_detailed (
- g_ptr_array_index (mixin->priv->externals, i),
empty_hash_table, arr_owners_removed, empty_hash_table);
}
}
@@ -1713,80 +1482,6 @@ change_members (GObject *obj,
/**
* tp_group_mixin_change_members: (skip)
* @obj: An object implementing the group interface using this mixin
- * @message: A message to be sent to the affected contacts if possible;
- * %NULL is allowed, and is mapped to an empty string
- * @add: A set of contact handles to be added to the members (if not
- * already present) and removed from local pending and remote pending
- * (if present)
- * @del: A set of contact handles to be removed from members,
- * local pending or remote pending, wherever they are present
- * @add_local_pending: A set of contact handles to be added to local pending,
- * and removed from members and remote pending
- * @add_remote_pending: A set of contact handles to be added to remote pending,
- * and removed from members and local pending
- * @actor: The handle of the contact responsible for this change
- * @reason: The reason for this change
- *
- * Change the sets of members as given by the arguments, and emit the
- * MembersChanged and MembersChangedDetailed signals if the changes were not a
- * no-op.
- *
- * This function must be called in response to events on the underlying
- * IM protocol, and must not be called in direct response to user input;
- * it does not respect the permissions flags, but changes the group directly.
- *
- * If any two of add, del, add_local_pending and add_remote_pending have
- * a non-empty intersection, the result is undefined. Don't do that.
- *
- * Each of the TpIntset arguments may be %NULL, which is treated as
- * equivalent to an empty set.
- *
- * Returns: %TRUE if the group was changed and the MembersChanged(Detailed)
- * signals were emitted; %FALSE if nothing actually changed and the signals
- * were suppressed.
- */
-gboolean
-tp_group_mixin_change_members (GObject *obj,
- const gchar *message,
- const TpIntset *add,
- const TpIntset *del,
- const TpIntset *add_local_pending,
- const TpIntset *add_remote_pending,
- TpHandle actor,
- TpChannelGroupChangeReason reason)
-{
- GHashTable *details = g_hash_table_new_full (g_str_hash, g_str_equal,
- NULL, (GDestroyNotify) tp_g_value_slice_free);
- gboolean ret;
-
- if (actor != 0)
- {
- g_hash_table_insert (details, "actor",
- tp_g_value_slice_new_uint (actor));
- }
-
- if (reason != TP_CHANNEL_GROUP_CHANGE_REASON_NONE)
- {
- g_hash_table_insert (details, "change-reason",
- tp_g_value_slice_new_uint (reason));
- }
-
- if (message != NULL && message[0] != '\0')
- {
- g_hash_table_insert (details, "message",
- tp_g_value_slice_new_string (message));
- }
-
- ret = change_members (obj, message, add, del, add_local_pending,
- add_remote_pending, actor, reason, details);
-
- g_hash_table_unref (details);
- return ret;
-}
-
-/**
- * tp_group_mixin_change_members_detailed: (skip)
- * @obj: An object implementing the group interface using this mixin
* @add: A set of contact handles to be added to the members (if not
* already present) and removed from local pending and remote pending
* (if present)
@@ -1799,8 +1494,7 @@ tp_group_mixin_change_members (GObject *obj,
* @details: a map from strings to GValues detailing the change
*
* Change the sets of members as given by the arguments, and emit the
- * MembersChanged and MembersChangedDetailed signals if the changes were not a
- * no-op.
+ * MembersChanged signal if the changes were not a no-op.
*
* This function must be called in response to events on the underlying
* IM protocol, and must not be called in direct response to user input;
@@ -1814,32 +1508,24 @@ tp_group_mixin_change_members (GObject *obj,
*
* details may contain, among other entries, the well-known
* keys (and corresponding type, wrapped in a GValue) defined by the
- * Group.MembersChangedDetailed signal's specification; these include "actor"
+ * Group.MembersChanged signal's specification; these include "actor"
* (a handle as G_TYPE_UINT), "change-reason" (an element of
* #TpChannelGroupChangeReason as G_TYPE_UINT), "message" (G_TYPE_STRING),
* "error" (G_TYPE_STRING), "debug-message" (G_TYPE_STRING).
*
- * If all of the information in details could be passed to
- * tp_group_mixin_change_members() then calling this function instead provides
- * no benefit. Calling this function without setting
- * #TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED with
- * tp_group_mixin_change_members() first is not very useful, as clients will
- * not know to listen for MembersChangedDetailed and thus will miss the
- * details.
- *
- * Returns: %TRUE if the group was changed and the MembersChanged(Detailed)
+ * Returns: %TRUE if the group was changed and the MembersChanged
* signals were emitted; %FALSE if nothing actually changed and the signals
* were suppressed.
*
* Since: 0.7.21
*/
gboolean
-tp_group_mixin_change_members_detailed (GObject *obj,
- const TpIntset *add,
- const TpIntset *del,
- const TpIntset *add_local_pending,
- const TpIntset *add_remote_pending,
- const GHashTable *details)
+tp_group_mixin_change_members (GObject *obj,
+ const TpIntset *add,
+ const TpIntset *del,
+ const TpIntset *add_local_pending,
+ const TpIntset *add_remote_pending,
+ const GHashTable *details)
{
const gchar *message;
TpHandle actor;
@@ -2006,11 +1692,8 @@ tp_group_mixin_add_handle_owners (GObject *obj,
g_hash_table_foreach (local_to_owner_handle, add_handle_owners_helper,
mixin);
- tp_svc_channel_interface_group_emit_handle_owners_changed (obj,
- local_to_owner_handle, empty_array);
-
add_us_mapping_for_owners_map (ids, mixin->handle_repo, local_to_owner_handle);
- tp_svc_channel_interface_group_emit_handle_owners_changed_detailed (obj,
+ tp_svc_channel_interface_group_emit_handle_owners_changed (obj,
local_to_owner_handle, empty_array, ids);
g_array_unref (empty_array);
@@ -2093,16 +1776,7 @@ tp_group_mixin_iface_init (gpointer g_iface, gpointer iface_data)
#define IMPLEMENT(x) tp_svc_channel_interface_group_implement_##x (klass,\
tp_group_mixin_##x##_async)
IMPLEMENT(add_members);
- IMPLEMENT(get_all_members);
- IMPLEMENT(get_group_flags);
- IMPLEMENT(get_handle_owners);
- IMPLEMENT(get_local_pending_members);
- IMPLEMENT(get_local_pending_members_with_info);
- IMPLEMENT(get_members);
- IMPLEMENT(get_remote_pending_members);
- IMPLEMENT(get_self_handle);
IMPLEMENT(remove_members);
- IMPLEMENT(remove_members_with_reason);
#undef IMPLEMENT
}
@@ -2409,94 +2083,7 @@ tp_external_group_mixin_add_members_async (TpSvcChannelInterfaceGroup *obj,
}
static void
-tp_external_group_mixin_get_self_handle_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_self_handle_async ((TpSvcChannelInterfaceGroup *) group,
- context);
-}
-
-static void
-tp_external_group_mixin_get_group_flags_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_group_flags_async ((TpSvcChannelInterfaceGroup *) group,
- context);
-}
-
-static void
-tp_external_group_mixin_get_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_members_async ((TpSvcChannelInterfaceGroup *) group,
- context);
-}
-
-static void
-tp_external_group_mixin_get_local_pending_members_async
- (TpSvcChannelInterfaceGroup *obj, DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_local_pending_members_async
- ((TpSvcChannelInterfaceGroup *) group, context);
-}
-
-static void
-tp_external_group_mixin_get_local_pending_members_with_info_async
- (TpSvcChannelInterfaceGroup *obj, DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_local_pending_members_with_info_async
- ((TpSvcChannelInterfaceGroup *) group, context);
-}
-
-static void
-tp_external_group_mixin_get_remote_pending_members_async
- (TpSvcChannelInterfaceGroup *obj, DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_remote_pending_members_async
- ((TpSvcChannelInterfaceGroup *) group, context);
-}
-
-static void
-tp_external_group_mixin_get_all_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_all_members_async ((TpSvcChannelInterfaceGroup *) group,
- context);
-}
-
-static void
-tp_external_group_mixin_get_handle_owners_async
- (TpSvcChannelInterfaceGroup *obj,
- const GArray *handles,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_handle_owners_async ((TpSvcChannelInterfaceGroup *) group,
- handles, context);
-}
-
-static void
-tp_external_group_mixin_remove_members_async (TpSvcChannelInterfaceGroup *obj,
- const GArray *contacts,
- const gchar *message,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_remove_members_with_reason_async
- ((TpSvcChannelInterfaceGroup *) group, contacts, message,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE, context);
-}
-
-
-static void
-tp_external_group_mixin_remove_members_with_reason_async
+tp_external_group_mixin_remove_members_async
(TpSvcChannelInterfaceGroup *obj,
const GArray *contacts,
const gchar *message,
@@ -2504,7 +2091,7 @@ tp_external_group_mixin_remove_members_with_reason_async
DBusGMethodInvocation *context)
{
EXTERNAL_OR_DIE (group)
- tp_group_mixin_remove_members_with_reason_async
+ tp_group_mixin_remove_members_async
((TpSvcChannelInterfaceGroup *) group, contacts, message, reason,
context);
}
@@ -2528,15 +2115,6 @@ tp_external_group_mixin_iface_init (gpointer g_iface,
#define IMPLEMENT(x) tp_svc_channel_interface_group_implement_##x (klass,\
tp_external_group_mixin_##x##_async)
IMPLEMENT(add_members);
- IMPLEMENT(get_all_members);
- IMPLEMENT(get_group_flags);
- IMPLEMENT(get_handle_owners);
- IMPLEMENT(get_local_pending_members);
- IMPLEMENT(get_local_pending_members_with_info);
- IMPLEMENT(get_members);
- IMPLEMENT(get_remote_pending_members);
- IMPLEMENT(get_self_handle);
IMPLEMENT(remove_members);
- IMPLEMENT(remove_members_with_reason);
#undef IMPLEMENT
}
diff --git a/telepathy-glib/group-mixin.h b/telepathy-glib/group-mixin.h
index caf8ce31e..48a558db8 100644
--- a/telepathy-glib/group-mixin.h
+++ b/telepathy-glib/group-mixin.h
@@ -181,8 +181,6 @@ gboolean tp_group_mixin_get_group_flags (GObject *obj,
gboolean tp_group_mixin_add_members (GObject *obj,
const GArray *contacts, const gchar *message, GError **error);
gboolean tp_group_mixin_remove_members (GObject *obj,
- const GArray *contacts, const gchar *message, GError **error);
-gboolean tp_group_mixin_remove_members_with_reason (GObject *obj,
const GArray *contacts, const gchar *message, guint reason,
GError **error);
@@ -204,10 +202,6 @@ gboolean tp_group_mixin_get_handle_owners (GObject *obj,
void tp_group_mixin_change_flags (GObject *obj,
TpChannelGroupFlags add, TpChannelGroupFlags del);
gboolean tp_group_mixin_change_members (GObject *obj,
- const gchar *message, const TpIntset *add, const TpIntset *del,
- const TpIntset *add_local_pending, const TpIntset *add_remote_pending,
- TpHandle actor, TpChannelGroupChangeReason reason);
-gboolean tp_group_mixin_change_members_detailed (GObject *obj,
const TpIntset *add, const TpIntset *del,
const TpIntset *add_local_pending, const TpIntset *add_remote_pending,
const GHashTable *details);
diff --git a/telepathy-glib/proxy.c b/telepathy-glib/proxy.c
index e7166c1c4..b42a87a66 100644
--- a/telepathy-glib/proxy.c
+++ b/telepathy-glib/proxy.c
@@ -733,7 +733,7 @@ error_mapping_quark (void)
* Convert a D-Bus error name into a GError as if it was returned by a method
* on this proxy. This method is useful when D-Bus error names are emitted in
* signals, such as Connection.ConnectionError and
- * Group.MembersChangedDetailed.
+ * Group.MembersChanged.
*
* Since: 0.7.24
*/
diff --git a/tests/dbus/call-example.c b/tests/dbus/call-example.c
index 8a6ac3551..df4117f8b 100644
--- a/tests/dbus/call-example.c
+++ b/tests/dbus/call-example.c
@@ -54,8 +54,6 @@ typedef struct
GHashTable *get_members_return;
guint uint_return;
- gulong members_changed_detailed_id;
-
FutureCallContent *added_content;
FutureCallContent *audio_content;
FutureCallContent *video_content;
@@ -1045,12 +1043,6 @@ teardown (Test *test,
tp_cli_connection_run_disconnect (test->conn, -1, &test->error, NULL);
g_assert_no_error (test->error);
- if (test->members_changed_detailed_id != 0)
- {
- g_signal_handler_disconnect (test->chan,
- test->members_changed_detailed_id);
- }
-
g_array_unref (test->audio_request);
g_array_unref (test->video_request);
g_array_unref (test->invalid_request);
diff --git a/tests/dbus/cli-group.c b/tests/dbus/cli-group.c
index 606c39a4f..da38e316a 100644
--- a/tests/dbus/cli-group.c
+++ b/tests/dbus/cli-group.c
@@ -32,86 +32,43 @@ TpHandleRepoIface *contact_repo;
TpHandle self_handle, h1, h2, h3;
gboolean expecting_group_members_changed = FALSE;
-gboolean expecting_group_members_changed_detailed = FALSE;
TpChannelGroupChangeReason expected_reason = TP_CHANNEL_GROUP_CHANGE_REASON_NONE;
gboolean expecting_invalidated = FALSE;
static void
group_members_changed_cb (TpChannel *chan_,
- gchar *message,
GArray *added,
GArray *removed,
GArray *local_pending,
GArray *remote_pending,
- guint actor,
- guint reason,
+ GHashTable *details,
gpointer user_data)
{
- DEBUG ("\"%s\", %u, %u, %u, %u, %u, %u", message, added->len, removed->len,
- local_pending->len, remote_pending->len, actor, reason);
-
- MYASSERT (expecting_group_members_changed, "");
- g_assert_cmpuint (reason, ==, expected_reason);
-
- expecting_group_members_changed = FALSE;
-}
-
-static void
-group_members_changed_detailed_cb (TpChannel *chan_,
- GArray *added,
- GArray *removed,
- GArray *local_pending,
- GArray *remote_pending,
- GHashTable *details,
- gpointer user_data)
-{
guint reason = tp_asv_get_uint32 (details, "change-reason", NULL);
DEBUG ("%u, %u, %u, %u, %u details", added->len, removed->len,
local_pending->len, remote_pending->len, g_hash_table_size (details));
- MYASSERT (expecting_group_members_changed_detailed, "");
+ MYASSERT (expecting_group_members_changed, "");
g_assert_cmpuint (reason, ==, expected_reason);
- expecting_group_members_changed_detailed = FALSE;
+ expecting_group_members_changed = FALSE;
}
static void
test_channel_proxy (TpTestsTextChannelGroup *service_chan,
- TpChannel *chan,
- gboolean detailed,
- gboolean properties)
+ TpChannel *chan)
{
TpIntset *add, *rem, *expected_members;
- GArray *arr, *yarr;
GError *error = NULL;
- TpChannelGroupFlags flags;
- gboolean has_detailed_flag, has_properties_flag;
+ GHashTable *details;
MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
g_assert_no_error (error);
- /* We want to ensure that each of these signals fires exactly once per
- * change. The channel emits both MembersChanged and MembersChangedDetailed,
- * but TpChannel should only be reacting to one of them, based on whether the
- * Members_Changed_Detailed flag is set. So, each signal's handler has a
- * corresponding "expected" flag, which it asserts on then sets back to FALSE.
- */
g_signal_connect (chan, "group-members-changed",
(GCallback) group_members_changed_cb, NULL);
- g_signal_connect (chan, "group-members-changed-detailed",
- (GCallback) group_members_changed_detailed_cb, NULL);
-
- flags = tp_channel_group_get_flags (chan);
- has_detailed_flag = !!(flags & TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED);
- MYASSERT (detailed == has_detailed_flag,
- ": expected Members_Changed_Detailed to be %sset",
- (detailed ? "" : "un"));
- has_properties_flag = !!(flags & TP_CHANNEL_GROUP_FLAG_PROPERTIES);
- MYASSERT (properties == has_properties_flag,
- ": expected Properties to be %sset",
- (detailed ? "" : "un"));
/* Add a couple of members. */
add = tp_intset_new ();
@@ -119,13 +76,22 @@ test_channel_proxy (TpTestsTextChannelGroup *service_chan,
tp_intset_add (add, h2);
expecting_group_members_changed = TRUE;
- expecting_group_members_changed_detailed = TRUE;
+
expected_reason++;
+
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "quantum tunnelling",
+ "change-reason", G_TYPE_UINT, expected_reason,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
+
tp_group_mixin_change_members ((GObject *) service_chan,
- "quantum tunnelling", add, NULL, NULL, NULL, 0, expected_reason);
+ add, NULL, NULL, NULL, details);
+
+ tp_clear_pointer (&details, g_hash_table_unref);
/* Clear the queue to ensure that there aren't any more
- * MembersChanged[Detailed] signals waiting for us.
+ * MembersChanged signals waiting for us.
*/
tp_tests_proxy_run_until_dbus_queue_processed (conn);
@@ -140,10 +106,18 @@ test_channel_proxy (TpTestsTextChannelGroup *service_chan,
tp_intset_add (rem, h1);
expecting_group_members_changed = TRUE;
- expecting_group_members_changed_detailed = TRUE;
expected_reason++;
+
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "goat",
+ "change-reason", G_TYPE_UINT, expected_reason,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
+
tp_group_mixin_change_members ((GObject *) service_chan,
- "goat", add, rem, NULL, NULL, 0, expected_reason);
+ add, rem, NULL, NULL, details);
+
+ tp_clear_pointer (&details, g_hash_table_unref);
tp_intset_destroy (add);
tp_intset_destroy (rem);
@@ -155,44 +129,6 @@ test_channel_proxy (TpTestsTextChannelGroup *service_chan,
MYASSERT (tp_intset_is_equal (expected_members,
tp_channel_group_get_members (chan)), "");
- /* Now, emit a spurious instance of whichever DBus signal the proxy should
- * not be listening to to check it's really not listening to it. If the
- * TpChannel is reacting to the wrong DBus signal, it'll trigger an assertion
- * in the GObject signal handlers.
- */
- yarr = g_array_new (FALSE, FALSE, sizeof (TpHandle));
- arr = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 1);
- g_array_insert_val (arr, 0, h1);
-
- expecting_group_members_changed = FALSE;
- expecting_group_members_changed_detailed = FALSE;
-
- if (detailed)
- {
- tp_svc_channel_interface_group_emit_members_changed (service_chan,
- "whee", arr, yarr, yarr, yarr, 0,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
- }
- else
- {
- GHashTable *details = g_hash_table_new (NULL, NULL);
-
- tp_svc_channel_interface_group_emit_members_changed_detailed (
- service_chan, arr, yarr, yarr, yarr, details);
- g_hash_table_unref (details);
- }
-
- g_array_unref (yarr);
- g_array_unref (arr);
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- /* And, the cache of group members should be unaltered, since the signal the
- * TpChannel cares about was not fired.
- */
- MYASSERT (tp_intset_is_equal (expected_members,
- tp_channel_group_get_members (chan)), "");
-
tp_intset_destroy (expected_members);
}
@@ -209,58 +145,20 @@ channel_invalidated_cb (TpProxy *proxy,
}
static void
-test_invalidated_on_illegal_change (TpTestsTextChannelGroup *serv_chan,
- TpChannel *chan,
- gboolean detailed,
- gboolean properties)
-{
- TpChannelGroupFlags add, del;
-
- DEBUG ("This channel has detailed %sset and properties %sset",
- (detailed ? "" : "un"), (properties ? "" : "un"));
-
- /* If we re-set or -unset the flags the channel already has, then the
- * TpChannel shouldn't care. This emits the signal directly rather than going
- * through the mixin, because the mixin helpfully optimizes out the spurious
- * change notification.
- */
- expecting_invalidated = FALSE;
- add = del = 0;
- *(detailed ? &add : &del) |= TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED;
- *(properties ? &add : &del) |= TP_CHANNEL_GROUP_FLAG_PROPERTIES;
- DEBUG ("Changing flags: add %u, del %u", add, del);
- tp_svc_channel_interface_group_emit_group_flags_changed (serv_chan, add, del);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- /* Now, let's flip the Detailed and Properties flags, and check that the
- * proxy gets invalidated due to inconsistency on the part of the service.
- */
- expecting_invalidated = TRUE;
- DEBUG ("Changing flags: add %u, del %u", del, add);
- tp_group_mixin_change_flags ((GObject *) serv_chan, del, add);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- MYASSERT (!expecting_invalidated, ": invalidated should have fired");
-}
-
-static void
-run_membership_test (guint channel_number,
- gboolean detailed,
- gboolean properties)
+run_membership_test (void)
{
gchar *chan_path;
TpTestsTextChannelGroup *service_chan;
TpChannel *chan;
GError *error = NULL;
+ guint invalidated_id = 0;
- chan_path = g_strdup_printf ("%s/Channel%u", conn_path, channel_number);
+ chan_path = g_strdup_printf ("%s/Channel", conn_path);
service_chan = TP_TESTS_TEXT_CHANNEL_GROUP (
tp_tests_object_new_static_class (
TP_TESTS_TYPE_TEXT_CHANNEL_GROUP,
"connection", service_conn,
"object-path", chan_path,
- "detailed", detailed,
- "properties", properties,
NULL));
chan = tp_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
&error);
@@ -268,39 +166,18 @@ run_membership_test (guint channel_number,
g_assert_no_error (error);
expecting_invalidated = FALSE;
- g_signal_connect (chan, "invalidated", (GCallback) channel_invalidated_cb,
- NULL);
+ invalidated_id = g_signal_connect (chan, "invalidated",
+ (GCallback) channel_invalidated_cb, NULL);
- if (!detailed || !properties)
- {
- expecting_invalidated = TRUE;
- g_assert (!tp_channel_run_until_ready (chan, &error, NULL));
- g_assert_error (error, TP_ERRORS, TP_ERROR_SOFTWARE_UPGRADE_REQUIRED);
- g_assert (!expecting_invalidated);
- return;
- }
+ test_channel_proxy (service_chan, chan);
- test_channel_proxy (service_chan, chan, detailed, properties);
- test_invalidated_on_illegal_change (service_chan, chan, detailed, properties);
+ g_signal_handler_disconnect (chan, invalidated_id);
g_object_unref (chan);
g_object_unref (service_chan);
g_free (chan_path);
}
-static void
-run_membership_tests (void)
-{
- /* Run a set of sanity checks on a series of channels, with all 4
- * combinations of states of the of the Members_Changed_Detailed and
- * Properties group flags.
- */
- run_membership_test (1, FALSE, FALSE);
- run_membership_test (2, FALSE, TRUE);
- run_membership_test (3, TRUE, FALSE);
- run_membership_test (4, TRUE, TRUE);
-}
-
#define REMOVED_REASON TP_CHANNEL_GROUP_CHANGE_REASON_NO_ANSWER
#define REMOVED_KNOWN_ERROR_CODE TP_ERROR_CONNECTION_REFUSED
#define REMOVED_KNOWN_ERROR_STR TP_ERROR_STR_CONNECTION_REFUSED
@@ -340,10 +217,9 @@ check_removed_unknown_error_in_invalidated (void)
TpTestsTextChannelGroup *service_chan;
TpChannel *chan;
TpIntset *self_handle_singleton = tp_intset_new ();
- GHashTable *details = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
- (GDestroyNotify) tp_g_value_slice_free);
gboolean invalidated = FALSE;
GError *error = NULL;
+ GHashTable *details;
chan_path = g_strdup_printf ("%s/Channel_1_6180339887", conn_path);
service_chan = TP_TESTS_TEXT_CHANNEL_GROUP (
@@ -351,8 +227,6 @@ check_removed_unknown_error_in_invalidated (void)
TP_TESTS_TYPE_TEXT_CHANNEL_GROUP,
"connection", service_conn,
"object-path", chan_path,
- "detailed", TRUE,
- "properties", TRUE,
NULL));
chan = tp_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
&error);
@@ -366,30 +240,34 @@ check_removed_unknown_error_in_invalidated (void)
g_signal_connect (chan, "invalidated",
(GCallback) check_invalidated_unknown_error_cb, &invalidated);
- tp_intset_add (self_handle_singleton, self_handle);
- tp_group_mixin_change_members ((GObject *) service_chan, "hello",
- self_handle_singleton, NULL, NULL, NULL, 0,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "hello",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
+ tp_intset_add (self_handle_singleton, self_handle);
+ tp_group_mixin_change_members ((GObject *) service_chan,
+ self_handle_singleton, NULL, NULL, NULL, details);
- g_hash_table_insert (details, "change-reason",
- tp_g_value_slice_new_uint (REMOVED_REASON));
+ tp_clear_pointer (&details, g_hash_table_unref);
- g_hash_table_insert (details, "message",
- tp_g_value_slice_new_static_string (REMOVED_MESSAGE));
+ tp_tests_proxy_run_until_dbus_queue_processed (conn);
- g_hash_table_insert (details, "error",
- tp_g_value_slice_new_static_string (REMOVED_UNKNOWN_ERROR));
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, REMOVED_MESSAGE,
+ "change-reason", G_TYPE_UINT, REMOVED_REASON,
+ "error", G_TYPE_STRING, REMOVED_UNKNOWN_ERROR,
+ NULL);
- tp_group_mixin_change_members_detailed ((GObject *) service_chan, NULL,
+ tp_group_mixin_change_members ((GObject *) service_chan, NULL,
self_handle_singleton, NULL, NULL, details);
tp_tests_proxy_run_until_dbus_queue_processed (conn);
tp_cli_channel_call_close (chan, -1, NULL, NULL, NULL, NULL);
- g_hash_table_unref (details);
+ tp_clear_pointer (&details, g_hash_table_unref);
tp_tests_proxy_run_until_dbus_queue_processed (conn);
@@ -440,8 +318,6 @@ check_removed_known_error_in_invalidated (void)
TP_TESTS_TYPE_TEXT_CHANNEL_GROUP,
"connection", service_conn,
"object-path", chan_path,
- "detailed", TRUE,
- "properties", TRUE,
NULL));
chan = tp_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
&error);
@@ -455,30 +331,34 @@ check_removed_known_error_in_invalidated (void)
g_signal_connect (chan, "invalidated",
(GCallback) check_invalidated_known_error_cb, &invalidated);
- tp_intset_add (self_handle_singleton, self_handle);
- tp_group_mixin_change_members ((GObject *) service_chan, "hello",
- self_handle_singleton, NULL, NULL, NULL, 0,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "hello",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
+ tp_intset_add (self_handle_singleton, self_handle);
+ tp_group_mixin_change_members ((GObject *) service_chan,
+ self_handle_singleton, NULL, NULL, NULL, details);
- g_hash_table_insert (details, "change-reason",
- tp_g_value_slice_new_uint (REMOVED_REASON));
+ tp_clear_pointer (&details, g_hash_table_unref);
- g_hash_table_insert (details, "message",
- tp_g_value_slice_new_static_string (REMOVED_MESSAGE));
+ tp_tests_proxy_run_until_dbus_queue_processed (conn);
- g_hash_table_insert (details, "error",
- tp_g_value_slice_new_static_string (REMOVED_KNOWN_ERROR_STR));
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, REMOVED_MESSAGE,
+ "change-reason", G_TYPE_UINT, REMOVED_REASON,
+ "error", G_TYPE_STRING, REMOVED_KNOWN_ERROR_STR,
+ NULL);
- tp_group_mixin_change_members_detailed ((GObject *) service_chan, NULL,
+ tp_group_mixin_change_members ((GObject *) service_chan, NULL,
self_handle_singleton, NULL, NULL, details);
tp_tests_proxy_run_until_dbus_queue_processed (conn);
tp_cli_channel_call_close (chan, -1, NULL, NULL, NULL, NULL);
- g_hash_table_unref (details);
+ tp_clear_pointer (&details, g_hash_table_unref);
tp_tests_proxy_run_until_dbus_queue_processed (conn);
@@ -538,7 +418,7 @@ main (int argc,
MYASSERT (tp_cli_connection_run_connect (conn, -1, &error, NULL), "");
g_assert_no_error (error);
- run_membership_tests ();
+ run_membership_test ();
check_removed_unknown_error_in_invalidated ();
check_removed_known_error_in_invalidated ();
diff --git a/tests/dbus/group-mixin.c b/tests/dbus/group-mixin.c
index a0d745e55..00dc979ce 100644
--- a/tests/dbus/group-mixin.c
+++ b/tests/dbus/group-mixin.c
@@ -34,7 +34,6 @@ typedef void (*diff_checker) (const GArray *added, const GArray *removed,
const GHashTable *details);
static gboolean expecting_members_changed = FALSE;
-static gboolean expecting_members_changed_detailed = FALSE;
static const gchar *expected_message;
static TpHandle expected_actor;
static TpChannelGroupChangeReason expected_reason;
@@ -47,7 +46,6 @@ expect_signals (const gchar *message,
diff_checker check_diffs)
{
expecting_members_changed = TRUE;
- expecting_members_changed_detailed = TRUE;
expected_message = message;
expected_actor = actor;
@@ -58,7 +56,7 @@ expect_signals (const gchar *message,
static gboolean
outstanding_signals (void)
{
- return (expecting_members_changed || expecting_members_changed_detailed);
+ return expecting_members_changed;
}
static void
@@ -70,48 +68,22 @@ wait_for_outstanding_signals (void)
static void
on_members_changed (TpChannel *proxy,
- const gchar *arg_Message,
const GArray *arg_Added,
const GArray *arg_Removed,
const GArray *arg_Local_Pending,
const GArray *arg_Remote_Pending,
- guint arg_Actor,
- guint arg_Reason,
+ GHashTable *arg_Details,
gpointer user_data,
GObject *weak_object)
{
- MYASSERT (expecting_members_changed, ": got unexpected MembersChanged");
- expecting_members_changed = FALSE;
-
- g_assert_cmpstr (arg_Message, ==, expected_message);
- g_assert_cmpuint (arg_Actor, ==, expected_actor);
- g_assert_cmpuint (arg_Reason, ==, expected_reason);
-
- expected_diffs (arg_Added, arg_Removed, arg_Local_Pending,
- arg_Remote_Pending, NULL);
-
- if (!outstanding_signals ())
- g_main_loop_quit (mainloop);
-}
-
-static void
-on_members_changed_detailed (TpChannel *proxy,
- const GArray *arg_Added,
- const GArray *arg_Removed,
- const GArray *arg_Local_Pending,
- const GArray *arg_Remote_Pending,
- GHashTable *arg_Details,
- gpointer user_data,
- GObject *weak_object)
-{
const gchar *message;
TpHandle actor;
TpChannelGroupChangeReason reason;
gboolean valid;
- MYASSERT (expecting_members_changed_detailed,
- ": got unexpected MembersChangedDetailed");
- expecting_members_changed_detailed = FALSE;
+ MYASSERT (expecting_members_changed,
+ ": got unexpected MembersChanged");
+ expecting_members_changed = FALSE;
message = tp_asv_get_string (arg_Details, "message");
@@ -184,10 +156,7 @@ check_initial_properties (void)
flags = tp_asv_get_uint32 (props, "GroupFlags", &valid);
MYASSERT (flags, ": GroupFlags property should be defined");
- g_assert_cmpuint (flags, ==,
- TP_CHANNEL_GROUP_FLAG_PROPERTIES |
- TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED |
- TP_CHANNEL_GROUP_FLAG_CAN_ADD);
+ g_assert_cmpuint (flags, ==, TP_CHANNEL_GROUP_FLAG_CAN_ADD);
g_hash_table_unref (props);
}
@@ -272,17 +241,22 @@ check_incoming_invitation (void)
/* We get an invitation to the channel */
{
TpIntset *add_local_pending = tp_intset_new ();
+ GHashTable *details = tp_asv_new (
+ "message", G_TYPE_STRING, "HELLO THAR",
+ "actor", G_TYPE_UINT, 0,
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_INVITED,
+ NULL);
tp_intset_add (add_local_pending, self_handle);
expect_signals ("HELLO THAR", 0, TP_CHANNEL_GROUP_CHANGE_REASON_INVITED,
self_added_to_lp);
- tp_group_mixin_change_members ((GObject *) service_chan, "HELLO THAR", NULL,
- NULL, add_local_pending, NULL, 0,
- TP_CHANNEL_GROUP_CHANGE_REASON_INVITED);
+ tp_group_mixin_change_members ((GObject *) service_chan, NULL,
+ NULL, add_local_pending, NULL, details);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
+ g_hash_table_unref (details);
tp_intset_destroy (add_local_pending);
}
@@ -300,7 +274,7 @@ check_incoming_invitation (void)
g_assert_no_error (error);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
g_array_unref (contacts);
}
@@ -387,15 +361,20 @@ in_the_desert (void)
/* A camel is approaching */
{
TpIntset *add = tp_intset_new ();
+ GHashTable *details = tp_asv_new (
+ "message", G_TYPE_STRING, "",
+ "actor", G_TYPE_UINT, camel,
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ NULL);
tp_intset_add (add, camel);
expect_signals ("", camel, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
camel_added);
- tp_group_mixin_change_members ((GObject *) service_chan, NULL, add, NULL,
- NULL, NULL, camel, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ tp_group_mixin_change_members ((GObject *) service_chan, add, NULL,
+ NULL, NULL, details);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
tp_intset_destroy (add);
}
@@ -412,11 +391,11 @@ in_the_desert (void)
expect_signals ("", camel, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
camel2_added);
- tp_group_mixin_change_members_detailed ((GObject *) service_chan, add,
+ tp_group_mixin_change_members ((GObject *) service_chan, add,
NULL, NULL, NULL, details);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
tp_intset_destroy (add);
g_hash_table_unref (details);
@@ -448,11 +427,11 @@ in_the_desert (void)
/* Check that all the right information was extracted from the dict. */
expect_signals ("*ptooey*", camel2,
TP_CHANNEL_GROUP_CHANGE_REASON_KICKED, camel_removed);
- tp_group_mixin_change_members_detailed ((GObject *) service_chan, NULL,
+ tp_group_mixin_change_members ((GObject *) service_chan, NULL,
del, NULL, NULL, details);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
tp_intset_destroy (del);
g_hash_table_unref (details);
@@ -500,8 +479,6 @@ test_group_mixin (void)
tp_cli_channel_interface_group_connect_to_members_changed (chan,
on_members_changed, NULL, NULL, NULL, NULL);
- tp_cli_channel_interface_group_connect_to_members_changed_detailed (chan,
- on_members_changed_detailed, NULL, NULL, NULL, NULL);
check_initial_properties ();
@@ -561,7 +538,6 @@ main (int argc,
TP_TESTS_TYPE_TEXT_CHANNEL_GROUP,
"connection", service_conn,
"object-path", chan_path,
- "detailed", TRUE,
NULL));
mainloop = g_main_loop_new (NULL, FALSE);
diff --git a/tests/lib/textchan-group.c b/tests/lib/textchan-group.c
index 5ab417f4c..249016e97 100644
--- a/tests/lib/textchan-group.c
+++ b/tests/lib/textchan-group.c
@@ -40,18 +40,8 @@ static const char *text_channel_group_interfaces[] = {
/* type definition stuff */
-enum
-{
- PROP_DETAILED = 1,
- PROP_PROPERTIES,
- N_PROPS
-};
-
struct _TpTestsTextChannelGroupPrivate
{
- gboolean detailed;
- gboolean properties;
-
gboolean closed;
gboolean disposed;
@@ -67,12 +57,18 @@ add_member (GObject *obj,
{
TpTestsTextChannelGroup *self = TP_TESTS_TEXT_CHANNEL_GROUP (obj);
TpIntset *add = tp_intset_new ();
+ GHashTable *details = tp_asv_new (
+ "actor", G_TYPE_UINT, self->conn->self_handle,
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "message", G_TYPE_STRING, message,
+ NULL);
tp_intset_add (add, handle);
- tp_group_mixin_change_members (obj, message, add, NULL, NULL, NULL,
- self->conn->self_handle, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ tp_group_mixin_change_members (obj, add, NULL, NULL, NULL, details);
tp_intset_destroy (add);
+ g_hash_table_unref (details);
+
return TRUE;
}
@@ -165,65 +161,12 @@ constructor (GType type,
tp_group_mixin_init (object, G_STRUCT_OFFSET (TpTestsTextChannelGroup, group),
contact_repo, self->conn->self_handle);
- if (!self->priv->detailed)
- {
- /* TpGroupMixin always set the Members_Changed_Detailed flag so we have
- * to cheat and manually remove it to pretend we don't implement it. */
- TpGroupMixin *group = TP_GROUP_MIXIN (self);
-
- group->group_flags &= ~TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED;
- }
-
tp_group_mixin_change_flags (object, flags, 0);
return object;
}
static void
-get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- TpTestsTextChannelGroup *self = TP_TESTS_TEXT_CHANNEL_GROUP (object);
-
- switch (property_id)
- {
- case PROP_DETAILED:
- g_value_set_boolean (value, self->priv->detailed);
- break;
- case PROP_PROPERTIES:
- g_value_set_boolean (value, self->priv->properties);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- TpTestsTextChannelGroup *self = TP_TESTS_TEXT_CHANNEL_GROUP (object);
-
- switch (property_id)
- {
- case PROP_DETAILED:
- self->priv->detailed = g_value_get_boolean (value);
- break;
- case PROP_PROPERTIES:
- self->priv->properties = g_value_get_boolean (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
dispose (GObject *object)
{
TpTestsTextChannelGroup *self = TP_TESTS_TEXT_CHANNEL_GROUP (object);
@@ -270,14 +213,11 @@ static void
tp_tests_text_channel_group_class_init (TpTestsTextChannelGroupClass *klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
- GParamSpec *param_spec;
TpBaseChannelClass *base_class = (TpBaseChannelClass *) klass;
g_type_class_add_private (klass, sizeof (TpTestsTextChannelGroupPrivate));
object_class->constructor = constructor;
- object_class->set_property = set_property;
- object_class->get_property = get_property;
object_class->dispose = dispose;
object_class->finalize = finalize;
@@ -286,20 +226,6 @@ tp_tests_text_channel_group_class_init (TpTestsTextChannelGroupClass *klass)
base_class->interfaces = text_channel_group_interfaces;
base_class->close = channel_close;
- param_spec = g_param_spec_boolean ("detailed",
- "Has the Members_Changed_Detailed flag?",
- "True if the Members_Changed_Detailed group flag should be set",
- TRUE,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_DETAILED, param_spec);
-
- param_spec = g_param_spec_boolean ("properties",
- "Has the Properties flag?",
- "True if the Properties group flag should be set",
- TRUE,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_PROPERTIES, param_spec);
-
tp_group_mixin_class_init (object_class,
G_STRUCT_OFFSET (TpTestsTextChannelGroupClass, group_class), add_member,
NULL);
@@ -321,16 +247,22 @@ void
tp_tests_text_channel_group_join (TpTestsTextChannelGroup *self)
{
TpIntset *add, *empty;
+ GHashTable *details = tp_asv_new (
+ "actor", G_TYPE_UINT, 0,
+ "change-reason", G_TYPE_UINT, 0,
+ "message", G_TYPE_STRING, "",
+ NULL);
/* Add ourself as a member */
add = tp_intset_new_containing (self->conn->self_handle);
empty = tp_intset_new ();
- tp_group_mixin_change_members ((GObject *) self, NULL, add, empty,
- empty, empty, 0, 0);
+ tp_group_mixin_change_members ((GObject *) self, add, empty,
+ empty, empty, details);
tp_intset_destroy (add);
tp_intset_destroy (empty);
+ g_hash_table_unref (details);
}
void
diff --git a/tests/lib/textchan-null.c b/tests/lib/textchan-null.c
index c0455d5fc..dc25b7d6f 100644
--- a/tests/lib/textchan-null.c
+++ b/tests/lib/textchan-null.c
@@ -403,7 +403,6 @@ group_constructed (GObject *self)
G_STRUCT_OFFSET (TpTestsPropsGroupTextChannel, group),
tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_CONTACT),
tp_base_connection_get_self_handle (conn));
- tp_group_mixin_change_flags (self, TP_CHANNEL_GROUP_FLAG_PROPERTIES, 0);
}
static void
@@ -449,6 +448,7 @@ tp_tests_props_group_text_channel_class_init (TpTestsPropsGroupTextChannelClass
{ "Members", NULL, NULL },
{ "RemotePendingMembers", NULL, NULL },
{ "SelfHandle", NULL, NULL },
+ { "MemberIdentifiers", NULL, NULL },
{ NULL }
};