summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS-0.x162
-rw-r--r--docs/reference/telepathy-farstream/telepathy-farstream-1-docs.sgml2
-rw-r--r--docs/reference/telepathy-glib/telepathy-glib-docs.sgml4
-rw-r--r--docs/reference/telepathy-glib/telepathy-glib-sections.txt62
-rw-r--r--examples/cm/contactlist/contact-list.c36
-rw-r--r--telepathy-glib/base-contact-list.c464
-rw-r--r--telepathy-glib/base-contact-list.h132
-rw-r--r--telepathy-glib/introspection.am1
-rw-r--r--telepathy-glib/versions/main-1.0.abi48
-rw-r--r--telepathy-logger/log-store-pidgin.c7
-rw-r--r--tests/lib/contact-list-manager.c10
11 files changed, 602 insertions, 326 deletions
diff --git a/NEWS-0.x b/NEWS-0.x
index 1b3941ec7..b4ae41bb1 100644
--- a/NEWS-0.x
+++ b/NEWS-0.x
@@ -1,11 +1,169 @@
-telepathy-glib 0.23.0 (UNRELEASED)
+telepathy-glib 0.24.1 (2014-08-25)
==================================
Fixes:
+• base-client: fix potential uninitialized variable bug (Guillaume)
+• Fix a potential crash in contact-list example (fd.o #79006, Guillaume)
+
+
+telepathy-glib 0.24.0 (2014-03-26)
+==================================
+
+The “space Tolkien” release.
+
+Fixes since 0.23.3:
+
+• don't leak every D-Bus method call result, a regression in 0.23.1 (Simon)
+
+telepathy-glib 0.23.3 (2014-03-18)
+==================================
+
+This is the release candidate for the future 0.24.0 stable release.
+
+Enhancements:
+
+• TpProtocol gained API to access to its immutable properties as a
+ GVariant. (fd.o #55108, Guillaume)
+
+• TpCallStream and TpCallContent now inherit the factory from their
+ TpCallChannel. (fd.o #76168, Guillaume)
+
+Fixes:
+
+• fix a memory leak when cleaning up TpProxy "prepare" requests
+ (fd.o #76000, Simon)
+
+• fix a memory leak for paths to contacts' avatar data (fd.o #76000, Simon)
+
+• fix crashes in TpFileTransferChannel with GLib 2.39 (fd.o #72319, Xavier)
+
+• fix some paths memory leaks (fd.o #76119, Guillaume)
+
+• tp_list_connection_managers_async() now terminates properly if there is no
+ CM installed. (fd.o #68892, Guillaume)
+
+telepathy-glib 0.23.2 (2014-02-26)
+==================================
+
+Enhancements:
+
+• TpBaseConnection now has an "account-path-suffix" property
+ (fd.o #74030, Xavier)
+
+• New high level TpAccountChannelRequest API, including tubes, Conference and
+ SMSChannel. (fd.o #75450, Guillaume)
+
+• 'TargetHandleType: None' is now automatically added when requesting a
+ channel with TpAccountChannelRequest if no handle type has been defined.
+ (fd.o #75450, Guillaume)
+
+telepathy-glib 0.23.1 (2014-02-04)
+==================================
+
+The “undead space elves” release.
+
+Dependencies:
+
+• GLib 2.36 or later is required
+
+Deprecations:
+
+• TpPresenceMixin: optional arguments are deprecated, apart from a
+ string named "message". This matches our current D-Bus API.
+
+Enhancements:
+
+• tp_protocol_normalize_contact_async(),
+ tp_protocol_identify_account_async(), and high-level API for
+ the Protocol Addressing and Presence interfaces (fd.o #71048, Simon)
+
+• More accessors for TpPresenceStatusSpec, which is now a boxed type
+ (fd.o #71048, Simon)
+
+• tp_connection_manager_param_dup_variant_type() (fd.o #71093, Simon)
+
+• Better debug output (fd.o #68390, #71048; Simon)
+
+Fixes:
+
+• In the examples, specifically ask for "TelepathyGlib-0.12" (this API
+ version), not Telepathy 1.0 (fd.o #49737, Simon)
+
+• Improve tests' isolation from the real session bus (Xavier)
+
+• Fix a critical warning for each new connection under GLib 2.39
+ (fd.o #72303, Xavier)
+
+• Fix some possible crashes in file transfer channels, particularly
+ under GLib 2.39 (fd.o #72319, Xavier)
+
+• Correct tp_account_request_set_avatar documentation (Xavier)
+
+• Fix a TpConnection reference-leak in TpBaseClient (Guillaume)
+
+telepathy-glib 0.23.0 (2013-10-28)
+==================================
+
+We no longer guarantee compatible upgrades within a development (odd) branch,
+see README for details.
+
+Dependencies:
+
+• GLib 2.34 or later is required.
+
+Enhancements:
+
+• Spec 0.27.3
+ · added Conn.I.Sidecars1
+ · added Conn.I.Renaming
+ · added CD.I.Messages1
+
+• TpAccount::avatar-changed signal (fd.o #52938, Guillaume)
+
+• tp_value_array_free: equivalent of g_value_array_free but does not provoke
+ deprecation warnings from GLib (fd.o #69849, Simon)
+
+• tp_account_is_prepared and tp_account_manager_is_prepared are now deprecated
+ (Guillaume)
+
+Fixes:
+
+• tp_contact_set_attributes: don't warn on genuinely absent interfaces
+ (fd.o #68149, Simon)
+
+• channel-group: don't crash if no message has been provided (Guillaume)
+
+telepathy-glib 0.22.0 (2013-10-02)
+==================================
+
+The “don't starve” release.
+
+This is a new stable branch, recommended for use with GNOME 3.10.
+
+Fixes since 0.21.2:
+
+• When an avatar is downloaded, announce the change to the avatar token
+ immediately; if the avatar changes from A to B while we're still doing the
+ asynchronous file saving, don't set A as the new avatar when it has been
+ saved. Regression in 0.21.2. (fd.o #70010, Simon)
+
• Don't crash if the AccountManager returns an incorrect type for the
Avatar (fd.o #69849, Simon)
+Significant changes since the previous stable branch, 0.20.x:
+
+• tp_connection_get_self_contact() now returns NULL if the contact's
+ connection has been invalidated, in order to break a reference cycle
+
+• Avatars are saved to the cache asynchronously
+
+• TpBaseConnection implements SelfID, SelfContactChanged according to
+ telepathy-spec 0.27.2
+
+• TpAccount:uri-schemes property, with change notification requiring
+ Mission Control 5.15+
+
telepathy-glib 0.21.2 (2013-09-24)
==================================
@@ -300,7 +458,7 @@ Fixes:
• Fix generation of reentrant-methods.list in highly parallel builds
(fd.o #52480, Ross Burton)
-• TpBaseChannel: assert that the subclass sets TargetEntityType. (Will)
+• TpBaseChannel: assert that the subclass sets TargetHandleType. (Will)
telepathy-glib 0.19.5 (2012-07-24)
==================================
diff --git a/docs/reference/telepathy-farstream/telepathy-farstream-1-docs.sgml b/docs/reference/telepathy-farstream/telepathy-farstream-1-docs.sgml
index 11bd7951e..ec50c8611 100644
--- a/docs/reference/telepathy-farstream/telepathy-farstream-1-docs.sgml
+++ b/docs/reference/telepathy-farstream/telepathy-farstream-1-docs.sgml
@@ -6,7 +6,7 @@
<title>telepathy-farstream Reference Manual</title>
<releaseinfo>
The latest version of this documentation can be found on-line at
- <ulink role="online-location" url="http://telepathy.freedesktop.org/doc/telepathy-farstream/">http://telepathy.freedesktop.org/telepathy-farstream/</ulink>.
+ <ulink role="online-location" url="http://telepathy.freedesktop.org/doc/telepathy-farstream-1/">http://telepathy.freedesktop.org/telepathy-farstream/</ulink>.
</releaseinfo>
</bookinfo>
diff --git a/docs/reference/telepathy-glib/telepathy-glib-docs.sgml b/docs/reference/telepathy-glib/telepathy-glib-docs.sgml
index 402515065..e738b8e09 100644
--- a/docs/reference/telepathy-glib/telepathy-glib-docs.sgml
+++ b/docs/reference/telepathy-glib/telepathy-glib-docs.sgml
@@ -9,9 +9,7 @@
<releaseinfo>
This manual documents telepathy-glib version &tpglibversion;.
The latest development version of this documentation can be found here:
- <ulink role="online-location" url="http://telepathy.freedesktop.org/doc/telepathy-glib/">online copy of the telepathy-glib API Reference Manual</ulink>.
- The latest version in this stable branch can be found here:
- <ulink role="online-location" url="http://telepathy.freedesktop.org/doc/telepathy-glib-0.24.x/">online copy of the telepathy-glib 0.24.x API Reference Manual</ulink>.
+ <ulink role="online-location" url="http://telepathy.freedesktop.org/doc/telepathy-glib-1/">online copy of the telepathy-glib API Reference Manual</ulink>.
</releaseinfo>
</bookinfo>
diff --git a/docs/reference/telepathy-glib/telepathy-glib-sections.txt b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
index 7afe4b7d9..08f17e7d1 100644
--- a/docs/reference/telepathy-glib/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
@@ -4902,7 +4902,7 @@ TpBaseContactListDupContactsFunc
tp_base_contact_list_dup_contacts
TpBaseContactListDupStatesFunc
tp_base_contact_list_dup_states
-TpBaseContactListUIntFunc
+TpMutableContactGroupListUIntFunc
TpBaseContactListAsyncFunc
TpBaseContactListAsyncFinishFunc
tp_base_contact_list_download_async
@@ -4912,28 +4912,33 @@ tp_base_contact_list_fill_contact_attributes
<SUBSECTION changes>
TP_TYPE_MUTABLE_CONTACT_LIST
TpMutableContactListInterface
+TpMutableContactList
+TpMutableContactGroupListAsyncFinishFunc
+TpMutableContactListAsyncFinishFunc
+TpMutableContactListBooleanFunc
+tp_mutable_contact_list_true_func
+tp_mutable_contact_list_false_func
tp_base_contact_list_can_change_contact_list
tp_base_contact_list_get_request_uses_message
-TpBaseContactListRequestSubscriptionFunc
-tp_base_contact_list_request_subscription_async
-tp_base_contact_list_request_subscription_finish
-TpBaseContactListActOnContactsFunc
-tp_base_contact_list_authorize_publication_async
-tp_base_contact_list_authorize_publication_finish
-tp_base_contact_list_store_contacts_async
-tp_base_contact_list_store_contacts_finish
-tp_base_contact_list_remove_contacts_async
-tp_base_contact_list_remove_contacts_finish
-tp_base_contact_list_unsubscribe_async
-tp_base_contact_list_unsubscribe_finish
-tp_base_contact_list_unpublish_async
-tp_base_contact_list_unpublish_finish
+TpMutableContactListRequestSubscriptionFunc
+tp_mutable_contact_list_request_subscription_async
+tp_mutable_contact_list_request_subscription_finish
+TpMutableContactListActOnContactsFunc
+tp_mutable_contact_list_authorize_publication_async
+tp_mutable_contact_list_authorize_publication_finish
+tp_mutable_contact_list_store_contacts_async
+tp_mutable_contact_list_store_contacts_finish
+tp_mutable_contact_list_remove_contacts_async
+tp_mutable_contact_list_remove_contacts_finish
+tp_mutable_contact_list_unsubscribe_async
+tp_mutable_contact_list_unsubscribe_finish
+tp_mutable_contact_list_unpublish_async
+tp_mutable_contact_list_unpublish_finish
<SUBSECTION groups>
TP_TYPE_CONTACT_GROUP_LIST
TpContactGroupList
TpContactGroupListInterface
TpContactGroupListBooleanFunc
-TpMutableContactGroupListAsyncFinishFunc
tp_contact_group_list_false_func
TpContactGroupListNormalizeFunc
tp_contact_group_list_normalize_group
@@ -4954,21 +4959,21 @@ TP_TYPE_MUTABLE_CONTACT_GROUP_LIST
TpMutableContactGroupList
TpMutableContactGroupListInterface
TpMutableContactGroupListSetContactGroupsFunc
-tp_base_contact_list_set_contact_groups_async
-tp_base_contact_list_set_contact_groups_finish
+tp_mutable_contact_group_list_set_contact_groups_async
+tp_mutable_contact_group_list_set_contact_groups_finish
TpMutableContactGroupListGroupContactsFunc
-tp_base_contact_list_add_to_group_async
-tp_base_contact_list_add_to_group_finish
-tp_base_contact_list_remove_from_group_async
-tp_base_contact_list_remove_from_group_finish
-tp_base_contact_list_set_group_members_async
-tp_base_contact_list_set_group_members_finish
+tp_mutable_contact_group_list_add_to_group_async
+tp_mutable_contact_group_list_add_to_group_finish
+tp_mutable_contact_group_list_remove_from_group_async
+tp_mutable_contact_group_list_remove_from_group_finish
+tp_mutable_contact_group_list_set_group_members_async
+tp_mutable_contact_group_list_set_group_members_finish
TpMutableContactGroupListRemoveGroupFunc
-tp_base_contact_list_remove_group_async
-tp_base_contact_list_remove_group_finish
+tp_mutable_contact_group_list_remove_group_async
+tp_mutable_contact_group_list_remove_group_finish
TpMutableContactGroupListRenameGroupFunc
-tp_base_contact_list_rename_group_async
-tp_base_contact_list_rename_group_finish
+tp_mutable_contact_group_list_rename_group_async
+tp_mutable_contact_group_list_rename_group_finish
tp_base_contact_list_get_group_storage
<SUBSECTION blocking>
TP_TYPE_BLOCKABLE_CONTACT_LIST
@@ -5002,6 +5007,7 @@ TP_BASE_CONTACT_LIST_GET_CLASS
TP_IS_BASE_CONTACT_LIST
TP_IS_BASE_CONTACT_LIST_CLASS
TP_IS_MUTABLE_CONTACT_LIST
+TP_MUTABLE_CONTACT_LIST
TP_MUTABLE_CONTACT_LIST_GET_INTERFACE
tp_mutable_contact_list_get_type
TP_IS_BLOCKABLE_CONTACT_LIST
diff --git a/examples/cm/contactlist/contact-list.c b/examples/cm/contactlist/contact-list.c
index c59d7233f..2107d3699 100644
--- a/examples/cm/contactlist/contact-list.c
+++ b/examples/cm/contactlist/contact-list.c
@@ -1116,7 +1116,7 @@ example_contact_list_dup_states (TpBaseContactList *contact_list,
static void
example_contact_list_request_subscription_async (
- TpBaseContactList *contact_list,
+ TpMutableContactList *contact_list,
TpHandleSet *contacts,
const gchar *message,
GAsyncReadyCallback callback,
@@ -1174,7 +1174,8 @@ example_contact_list_request_subscription_async (
g_free (message_lc);
}
- tp_base_contact_list_contacts_changed (contact_list, changed, NULL);
+ tp_base_contact_list_contacts_changed (TP_BASE_CONTACT_LIST (contact_list),
+ changed, NULL);
tp_simple_async_report_success_in_idle ((GObject *) self, callback,
user_data, example_contact_list_request_subscription_async);
@@ -1182,7 +1183,7 @@ example_contact_list_request_subscription_async (
static void
example_contact_list_authorize_publication_async (
- TpBaseContactList *contact_list,
+ TpMutableContactList *contact_list,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1221,7 +1222,8 @@ example_contact_list_authorize_publication_async (
}
}
- tp_base_contact_list_contacts_changed (contact_list, changed, NULL);
+ tp_base_contact_list_contacts_changed (TP_BASE_CONTACT_LIST (contact_list),
+ changed, NULL);
tp_simple_async_report_success_in_idle ((GObject *) self, callback,
user_data, example_contact_list_authorize_publication_async);
@@ -1229,7 +1231,7 @@ example_contact_list_authorize_publication_async (
static void
example_contact_list_store_contacts_async (
- TpBaseContactList *contact_list,
+ TpMutableContactList *contact_list,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1260,14 +1262,15 @@ example_contact_list_store_contacts_async (
}
}
- tp_base_contact_list_contacts_changed (contact_list, changed, NULL);
+ tp_base_contact_list_contacts_changed (TP_BASE_CONTACT_LIST (contact_list),
+ changed, NULL);
tp_simple_async_report_success_in_idle ((GObject *) self, callback,
user_data, example_contact_list_store_contacts_async);
}
static void
-example_contact_list_remove_contacts_async (TpBaseContactList *contact_list,
+example_contact_list_remove_contacts_async (TpMutableContactList *contact_list,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1307,14 +1310,15 @@ example_contact_list_remove_contacts_async (TpBaseContactList *contact_list,
}
}
- tp_base_contact_list_contacts_changed (contact_list, NULL, removed);
+ tp_base_contact_list_contacts_changed (TP_BASE_CONTACT_LIST (contact_list),
+ NULL, removed);
tp_simple_async_report_success_in_idle ((GObject *) self, callback,
user_data, example_contact_list_remove_contacts_async);
}
static void
-example_contact_list_unsubscribe_async (TpBaseContactList *contact_list,
+example_contact_list_unsubscribe_async (TpMutableContactList *contact_list,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1371,14 +1375,15 @@ example_contact_list_unsubscribe_async (TpBaseContactList *contact_list,
}
}
- tp_base_contact_list_contacts_changed (contact_list, changed, NULL);
+ tp_base_contact_list_contacts_changed (TP_BASE_CONTACT_LIST (contact_list),
+ changed, NULL);
tp_simple_async_report_success_in_idle ((GObject *) self, callback,
user_data, example_contact_list_unsubscribe_async);
}
static void
-example_contact_list_unpublish_async (TpBaseContactList *contact_list,
+example_contact_list_unpublish_async (TpMutableContactList *contact_list,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1449,7 +1454,8 @@ example_contact_list_unpublish_async (TpBaseContactList *contact_list,
}
}
- tp_base_contact_list_contacts_changed (contact_list, changed, removed);
+ tp_base_contact_list_contacts_changed (TP_BASE_CONTACT_LIST (contact_list),
+ changed, removed);
tp_simple_async_report_success_in_idle ((GObject *) self, callback,
user_data, example_contact_list_unpublish_async);
@@ -1536,7 +1542,7 @@ example_contact_list_unblock_contacts_async (
static guint
example_contact_list_get_group_storage (
- TpBaseContactList *contact_list G_GNUC_UNUSED)
+ TpMutableContactGroupList *contact_list G_GNUC_UNUSED)
{
return TP_CONTACT_METADATA_STORAGE_TYPE_ANYONE;
}
@@ -1706,8 +1712,8 @@ example_contact_list_class_init (ExampleContactListClass *klass)
static void
mutable_contact_list_iface_init (TpMutableContactListInterface *iface)
{
- iface->can_change_contact_list = tp_base_contact_list_true_func;
- iface->get_request_uses_message = tp_base_contact_list_true_func;
+ iface->can_change_contact_list = tp_mutable_contact_list_true_func;
+ iface->get_request_uses_message = tp_mutable_contact_list_true_func;
iface->request_subscription_async =
example_contact_list_request_subscription_async;
iface->authorize_publication_async =
diff --git a/telepathy-glib/base-contact-list.c b/telepathy-glib/base-contact-list.c
index d859a50c7..e843f8af1 100644
--- a/telepathy-glib/base-contact-list.c
+++ b/telepathy-glib/base-contact-list.c
@@ -195,7 +195,7 @@
*/
/**
- * TpBaseContactListActOnContactsFunc:
+ * TpMutableContactListActOnContactsFunc:
* @self: the contact list manager implementing
* #TP_TYPE_BLOCKABLE_CONTACT_LIST
* @contacts: the contacts on which to act
@@ -229,7 +229,7 @@
*/
/**
- * TpBaseContactListRequestSubscriptionFunc:
+ * TpMutableContactListRequestSubscriptionFunc:
* @self: the contact list manager
* @contacts: the contacts whose subscription is to be requested
* @message: an optional human-readable message from the user
@@ -259,6 +259,20 @@
*/
/**
+ * TpMutableContactListAsyncFinishFunc:
+ * @self: the contact list manager implementing
+ * #TP_TYPE_MUTABLE_CONTACT_LIST
+ * @result: the result of the asynchronous operation
+ * @error: used to raise an error if %FALSE is returned
+ *
+ * Signature of a virtual method to finish an async operation.
+ *
+ * Returns: %TRUE on success, or %FALSE if @error is set
+ *
+ * Since: UNRELEASED
+ */
+
+/**
* TpBlockableContactListAsyncFinishFunc:
* @self: the contact list manager implementing
* #TP_TYPE_BLOCKABLE_CONTACT_LIST
@@ -354,35 +368,35 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (TpBaseContactList,
* TpMutableContactListInterface:
* @parent: the parent interface
* @request_subscription_async: the implementation of
- * tp_base_contact_list_request_subscription_async(); must always be provided
+ * tp_mutable_contact_list_request_subscription_async(); must always be provided
* @request_subscription_finish: the implementation of
- * tp_base_contact_list_request_subscription_finish(); the default
+ * tp_mutable_contact_list_request_subscription_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @authorize_publication_async: the implementation of
- * tp_base_contact_list_authorize_publication_async(); must always be provided
+ * tp_mutable_contact_list_authorize_publication_async(); must always be provided
* @authorize_publication_finish: the implementation of
- * tp_base_contact_list_authorize_publication_finish(); the default
+ * tp_mutable_contact_list_authorize_publication_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @remove_contacts_async: the implementation of
- * tp_base_contact_list_remove_contacts_async(); must always be provided
+ * tp_mutable_contact_list_remove_contacts_async(); must always be provided
* @remove_contacts_finish: the implementation of
- * tp_base_contact_list_remove_contacts_finish(); the default
+ * tp_mutable_contact_list_remove_contacts_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @unsubscribe_async: the implementation of
- * tp_base_contact_list_unsubscribe_async(); must always be provided
+ * tp_mutable_contact_list_unsubscribe_async(); must always be provided
* @unsubscribe_finish: the implementation of
- * tp_base_contact_list_unsubscribe_finish(); the default
+ * tp_mutable_contact_list_unsubscribe_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @unpublish_async: the implementation of
- * tp_base_contact_list_unpublish_async(); must always be provided
+ * tp_mutable_contact_list_unpublish_async(); must always be provided
* @unpublish_finish: the implementation of
- * tp_base_contact_list_unpublish_finish(); the default
+ * tp_mutable_contact_list_unpublish_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @store_contacts_async: the implementation of
- * tp_base_contact_list_store_contacts_async(); if not reimplemented,
+ * tp_mutable_contact_list_store_contacts_async(); if not reimplemented,
* the default implementation is %NULL, which is interpreted as "do nothing"
* @store_contacts_finish: the implementation of
- * tp_base_contact_list_store_contacts_finish(); the default
+ * tp_mutable_contact_list_store_contacts_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @can_change_contact_list: the implementation of
* tp_base_contact_list_can_change_contact_list(); if not reimplemented,
@@ -396,6 +410,15 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (TpBaseContactList,
* Since: 0.13.0
*/
+/**
+ * TpMutableContactList:
+ *
+ * Opaque structure representing an object implementing
+ * TpMutableContactListInterface.
+ *
+ * Since: UNRELEASED
+ */
+
G_DEFINE_INTERFACE (TpMutableContactList, tp_mutable_contact_list,
TP_TYPE_BASE_CONTACT_LIST)
@@ -516,36 +539,36 @@ G_DEFINE_INTERFACE (TpContactGroupList, tp_contact_group_list,
* %NULL, which results in %TP_CONTACT_METADATA_STORAGE_TYPE_ANYONE being
* advertised
* @set_contact_groups_async: the implementation of
- * tp_base_contact_list_set_contact_groups_async(); must always be implemented
+ * tp_mutable_contact_group_list_set_contact_groups_async(); must always be implemented
* @set_contact_groups_finish: the implementation of
- * tp_base_contact_list_set_contact_groups_finish(); the default
+ * tp_mutable_contact_group_list_set_contact_groups_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @set_group_members_async: the implementation of
- * tp_base_contact_list_set_group_members_async(); must always be implemented
+ * tp_mutable_contact_group_list_set_group_members_async(); must always be implemented
* @set_group_members_finish: the implementation of
- * tp_base_contact_list_set_group_members_finish(); the default
+ * tp_mutable_contact_group_list_set_group_members_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @add_to_group_async: the implementation of
- * tp_base_contact_list_add_to_group_async(); must always be implemented
+ * tp_mutable_contact_group_list_add_to_group_async(); must always be implemented
* @add_to_group_finish: the implementation of
- * tp_base_contact_list_add_to_group_finish(); the default
+ * tp_mutable_contact_group_list_add_to_group_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @remove_from_group_async: the implementation of
- * tp_base_contact_list_remove_from_group_async(); must always be implemented
+ * tp_mutable_contact_group_list_remove_from_group_async(); must always be implemented
* @remove_from_group_finish: the implementation of
- * tp_base_contact_list_remove_from_group_finish(); the default
+ * tp_mutable_contact_group_list_remove_from_group_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @remove_group_async: the implementation of
- * tp_base_contact_list_remove_group_async(); must always be implemented
+ * tp_mutable_contact_group_list_remove_group_async(); must always be implemented
* @remove_group_finish: the implementation of
- * tp_base_contact_list_remove_group_finish(); the default
+ * tp_mutable_contact_group_list_remove_group_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
* @rename_group_async: the implementation of
- * tp_base_contact_list_rename_group_async(); the default implementation
+ * tp_mutable_contact_group_list_rename_group_async(); the default implementation
* results in group renaming being emulated via a call to
* @add_to_group_async and a call to @remove_group_async
* @rename_group_finish: the implementation of
- * tp_base_contact_list_rename_group_finish(); the default
+ * tp_mutable_contact_group_list_rename_group_finish(); the default
* implementation may be used if @result is a #GSimpleAsyncResult
*
* The interface vtable for a %TP_TYPE_MUTABLE_CONTACT_GROUP_LIST.
@@ -879,18 +902,31 @@ tp_base_contact_list_download_async_default (TpBaseContactList *self,
"This CM does not implement Download");
}
+static gboolean
+tp_mutable_contact_list_simple_finish (TpMutableContactList *self,
+ GAsyncResult *result,
+ GError **error)
+{
+ GSimpleAsyncResult *simple = (GSimpleAsyncResult *) result;
+
+ g_return_val_if_fail (g_simple_async_result_is_valid (
+ result, G_OBJECT (self), NULL), FALSE);
+
+ return !g_simple_async_result_propagate_error (simple, error);
+}
+
static void
tp_mutable_contact_list_default_init (TpMutableContactListInterface *iface)
{
- iface->request_subscription_finish = tp_base_contact_list_simple_finish;
- iface->authorize_publication_finish = tp_base_contact_list_simple_finish;
- iface->unsubscribe_finish = tp_base_contact_list_simple_finish;
- iface->unpublish_finish = tp_base_contact_list_simple_finish;
- iface->store_contacts_finish = tp_base_contact_list_simple_finish;
- iface->remove_contacts_finish = tp_base_contact_list_simple_finish;
+ iface->request_subscription_finish = tp_mutable_contact_list_simple_finish;
+ iface->authorize_publication_finish = tp_mutable_contact_list_simple_finish;
+ iface->unsubscribe_finish = tp_mutable_contact_list_simple_finish;
+ iface->unpublish_finish = tp_mutable_contact_list_simple_finish;
+ iface->store_contacts_finish = tp_mutable_contact_list_simple_finish;
+ iface->remove_contacts_finish = tp_mutable_contact_list_simple_finish;
- iface->can_change_contact_list = tp_base_contact_list_true_func;
- iface->get_request_uses_message = tp_base_contact_list_true_func;
+ iface->can_change_contact_list = tp_mutable_contact_list_true_func;
+ iface->get_request_uses_message = tp_mutable_contact_list_true_func;
/* there's no default for the other virtual methods */
}
@@ -1491,7 +1527,7 @@ tp_base_contact_list_dup_contacts (TpBaseContactList *self)
}
/**
- * tp_base_contact_list_request_subscription_async:
+ * tp_mutable_contact_list_request_subscription_async:
* @self: a contact list manager
* @contacts: the contacts whose subscription is to be requested
* @message: an optional human-readable message from the user
@@ -1517,7 +1553,7 @@ tp_base_contact_list_dup_contacts (TpBaseContactList *self)
* Since: 0.13.0
*/
void
-tp_base_contact_list_request_subscription_async (TpBaseContactList *self,
+tp_mutable_contact_list_request_subscription_async (TpMutableContactList *self,
TpHandleSet *contacts,
const gchar *message,
GAsyncReadyCallback callback,
@@ -1529,19 +1565,18 @@ tp_base_contact_list_request_subscription_async (TpBaseContactList *self,
g_return_if_fail (mutable_iface != NULL);
g_return_if_fail (mutable_iface->request_subscription_async != NULL);
- mutable_iface->request_subscription_async (self, contacts, message, callback,
- user_data);
+ mutable_iface->request_subscription_async (self, contacts, message, callback, user_data);
}
/**
- * tp_base_contact_list_request_subscription_finish:
+ * tp_mutable_contact_list_request_subscription_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_request_subscription_async()
+ * tp_mutable_contact_list_request_subscription_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_request_subscription_async().
+ * tp_mutable_contact_list_request_subscription_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_LIST, it is an error to call this method.
@@ -1556,7 +1591,7 @@ tp_base_contact_list_request_subscription_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_request_subscription_finish (TpBaseContactList *self,
+tp_mutable_contact_list_request_subscription_finish (TpMutableContactList *self,
GAsyncResult *result,
GError **error)
{
@@ -1614,7 +1649,7 @@ tp_base_contact_list_dup_states (TpBaseContactList *self,
}
/**
- * tp_base_contact_list_authorize_publication_async:
+ * tp_mutable_contact_list_authorize_publication_async:
* @self: a contact list manager
* @contacts: the contacts to whom presence will be published
* @callback: a callback to call when the authorization succeeds or fails
@@ -1634,7 +1669,7 @@ tp_base_contact_list_dup_states (TpBaseContactList *self,
* Since: 0.13.0
*/
void
-tp_base_contact_list_authorize_publication_async (TpBaseContactList *self,
+tp_mutable_contact_list_authorize_publication_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1650,14 +1685,14 @@ tp_base_contact_list_authorize_publication_async (TpBaseContactList *self,
}
/**
- * tp_base_contact_list_authorize_publication_finish:
+ * tp_mutable_contact_list_authorize_publication_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_authorize_publication_async()
+ * tp_mutable_contact_list_authorize_publication_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_authorize_publication_async().
+ * tp_mutable_contact_list_authorize_publication_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_LIST, it is an error to call this method.
@@ -1672,7 +1707,7 @@ tp_base_contact_list_authorize_publication_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_authorize_publication_finish (TpBaseContactList *self,
+tp_mutable_contact_list_authorize_publication_finish (TpMutableContactList *self,
GAsyncResult *result,
GError **error)
{
@@ -1687,7 +1722,7 @@ tp_base_contact_list_authorize_publication_finish (TpBaseContactList *self,
}
/**
- * tp_base_contact_list_store_contacts_async:
+ * tp_mutable_contact_list_store_contacts_async:
* @self: a contact list manager
* @contacts: the contacts to be stored
* @callback: a callback to call when the operation succeeds or fails
@@ -1713,7 +1748,7 @@ tp_base_contact_list_authorize_publication_finish (TpBaseContactList *self,
* Since: 0.13.0
*/
void
-tp_base_contact_list_store_contacts_async (TpBaseContactList *self,
+tp_mutable_contact_list_store_contacts_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1727,19 +1762,18 @@ tp_base_contact_list_store_contacts_async (TpBaseContactList *self,
tp_simple_async_report_success_in_idle ((GObject *) self,
callback, user_data, NULL);
else
- mutable_iface->store_contacts_async (self, contacts, callback,
- user_data);
+ mutable_iface->store_contacts_async (self, contacts, callback, user_data);
}
/**
- * tp_base_contact_list_store_contacts_finish:
+ * tp_mutable_contact_list_store_contacts_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_store_contacts_async()
+ * tp_mutable_contact_list_store_contacts_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_store_contacts_async().
+ * tp_mutable_contact_list_store_contacts_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_LIST, it is an error to call this method.
@@ -1754,7 +1788,7 @@ tp_base_contact_list_store_contacts_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_store_contacts_finish (TpBaseContactList *self,
+tp_mutable_contact_list_store_contacts_finish (TpMutableContactList *self,
GAsyncResult *result,
GError **error)
{
@@ -1768,16 +1802,16 @@ tp_base_contact_list_store_contacts_finish (TpBaseContactList *self,
}
/**
- * tp_base_contact_list_remove_contacts_async:
+ * tp_mutable_contact_list_remove_contacts_async:
* @self: a contact list manager
* @contacts: the contacts to be removed
* @callback: a callback to call when the operation succeeds or fails
* @user_data: optional data to pass to @callback
*
* Remove @contacts from the contact list entirely; this includes the
- * effect of both tp_base_contact_list_unsubscribe_async() and
- * tp_base_contact_list_unpublish_async(), and also reverses the effect of
- * tp_base_contact_list_store_contacts_async().
+ * effect of both tp_mutable_contact_list_unsubscribe_async() and
+ * tp_mutable_contact_list_unpublish_async(), and also reverses the effect of
+ * tp_mutable_contact_list_store_contacts_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_LIST, this method does nothing.
@@ -1791,7 +1825,7 @@ tp_base_contact_list_store_contacts_finish (TpBaseContactList *self,
* Since: 0.13.0
*/
void
-tp_base_contact_list_remove_contacts_async (TpBaseContactList *self,
+tp_mutable_contact_list_remove_contacts_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1806,14 +1840,14 @@ tp_base_contact_list_remove_contacts_async (TpBaseContactList *self,
}
/**
- * tp_base_contact_list_remove_contacts_finish:
+ * tp_mutable_contact_list_remove_contacts_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_remove_contacts_async()
+ * tp_mutable_contact_list_remove_contacts_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_remove_contacts_async().
+ * tp_mutable_contact_list_remove_contacts_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_LIST, it is an error to call this method.
@@ -1828,7 +1862,7 @@ tp_base_contact_list_remove_contacts_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_remove_contacts_finish (TpBaseContactList *self,
+tp_mutable_contact_list_remove_contacts_finish (TpMutableContactList *self,
GAsyncResult *result,
GError **error)
{
@@ -1842,7 +1876,7 @@ tp_base_contact_list_remove_contacts_finish (TpBaseContactList *self,
}
/**
- * tp_base_contact_list_unsubscribe_async:
+ * tp_mutable_contact_list_unsubscribe_async:
* @self: a contact list manager
* @contacts: the contacts whose presence will no longer be received
* @callback: a callback to call when the operation succeeds or fails
@@ -1863,7 +1897,7 @@ tp_base_contact_list_remove_contacts_finish (TpBaseContactList *self,
* Since: 0.13.0
*/
void
-tp_base_contact_list_unsubscribe_async (TpBaseContactList *self,
+tp_mutable_contact_list_unsubscribe_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1878,14 +1912,14 @@ tp_base_contact_list_unsubscribe_async (TpBaseContactList *self,
}
/**
- * tp_base_contact_list_unsubscribe_finish:
+ * tp_mutable_contact_list_unsubscribe_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_unsubscribe_async()
+ * tp_mutable_contact_list_unsubscribe_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_unsubscribe_async().
+ * tp_mutable_contact_list_unsubscribe_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_LIST, it is an error to call this method.
@@ -1900,7 +1934,7 @@ tp_base_contact_list_unsubscribe_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_unsubscribe_finish (TpBaseContactList *self,
+tp_mutable_contact_list_unsubscribe_finish (TpMutableContactList *self,
GAsyncResult *result,
GError **error)
{
@@ -1914,7 +1948,7 @@ tp_base_contact_list_unsubscribe_finish (TpBaseContactList *self,
}
/**
- * tp_base_contact_list_unpublish_async:
+ * tp_mutable_contact_list_unpublish_async:
* @self: a contact list manager
* @contacts: the contacts to whom presence will no longer be published
* @callback: a callback to call when the operation succeeds or fails
@@ -1935,7 +1969,7 @@ tp_base_contact_list_unsubscribe_finish (TpBaseContactList *self,
* Since: 0.13.0
*/
void
-tp_base_contact_list_unpublish_async (TpBaseContactList *self,
+tp_mutable_contact_list_unpublish_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -1950,14 +1984,14 @@ tp_base_contact_list_unpublish_async (TpBaseContactList *self,
}
/**
- * tp_base_contact_list_unpublish_finish:
+ * tp_mutable_contact_list_unpublish_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_unpublish_async()
+ * tp_mutable_contact_list_unpublish_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_unpublish_async().
+ * tp_mutable_contact_list_unpublish_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_LIST, it is an error to call this method.
@@ -1972,7 +2006,7 @@ tp_base_contact_list_unpublish_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_unpublish_finish (TpBaseContactList *self,
+tp_mutable_contact_list_unpublish_finish (TpMutableContactList *self,
GAsyncResult *result,
GError **error)
{
@@ -2017,6 +2051,22 @@ tp_base_contact_list_unpublish_finish (TpBaseContactList *self,
* Since: UNRELEASED
*/
+/**
+ * TpMutableContactListBooleanFunc:
+ * @self: a contact list manager implementing
+ * #TP_TYPE_MUTABLE_CONTACT_LIST
+ *
+ * Signature of a virtual method that returns a boolean result. These are used
+ * for feature-discovery.
+ *
+ * For the simple cases of a constant result, use
+ * tp_mutable_contact_list_true_func() or
+ * tp_mutable_contact_list_false_func().
+ *
+ * Returns: a boolean result
+ *
+ * Since: UNRELEASED
+ */
/**
* tp_base_contact_list_true_func:
@@ -2087,6 +2137,39 @@ tp_blockable_contact_list_false_func (
return FALSE;
}
+/**
+ * tp_mutable_contact_list_true_func:
+ * @self: ignored
+ *
+ * An implementation of #TpMutableContactListBooleanFunc that returns %TRUE,
+ * for use in simple cases.
+ *
+ * Returns: %TRUE
+ *
+ * Since: UNRELEASED
+ */
+gboolean
+tp_mutable_contact_list_true_func (TpMutableContactList *self G_GNUC_UNUSED)
+{
+ return TRUE;
+}
+
+/**
+ * tp_mutable_contact_list_false_func:
+ * @self: ignored
+ *
+ * An implementation of #TpMutableContactListBooleanFunc that returns %FALSE,
+ * for use in simple cases.
+ *
+ * Returns: %TRUE
+ *
+ * Since: UNRELEASED
+ */
+gboolean
+tp_mutable_contact_list_false_func (TpMutableContactList *self G_GNUC_UNUSED)
+{
+ return TRUE;
+}
/**
* tp_base_contact_list_can_change_contact_list:
@@ -2131,7 +2214,7 @@ tp_base_contact_list_can_change_contact_list (TpBaseContactList *self)
g_return_val_if_fail (iface != NULL, FALSE);
g_return_val_if_fail (iface->can_change_contact_list != NULL, FALSE);
- return iface->can_change_contact_list (self);
+ return iface->can_change_contact_list (TP_MUTABLE_CONTACT_LIST (self));
}
/**
@@ -2249,7 +2332,7 @@ tp_base_contact_list_download_finish (TpBaseContactList *self,
* tp_base_contact_list_get_request_uses_message:
* @self: a contact list manager
*
- * Return whether the tp_base_contact_list_request_subscription_async()
+ * Return whether the tp_mutable_contact_list_request_subscription_async()
* method's @message argument is actually used.
*
* If the #TpBaseContactList subclass does not implement
@@ -2263,7 +2346,7 @@ tp_base_contact_list_download_finish (TpBaseContactList *self,
* protocols; subclasses may reimplement this method with
* tp_base_contact_list_false_func() or a custom implementation if desired.
*
- * Returns: %TRUE if tp_base_contact_list_request_subscription_async() will not
+ * Returns: %TRUE if tp_mutable_contact_list_request_subscription_async() will not
* ignore its @message argument
*
* Since: 0.13.0
@@ -2282,7 +2365,7 @@ tp_base_contact_list_get_request_uses_message (TpBaseContactList *self)
g_return_val_if_fail (iface != NULL, FALSE);
g_return_val_if_fail (iface->get_request_uses_message != NULL, FALSE);
- return iface->get_request_uses_message (self);
+ return iface->get_request_uses_message (TP_MUTABLE_CONTACT_LIST (self));
}
/**
@@ -3501,7 +3584,7 @@ tp_contact_group_list_dup_group_members (TpContactGroupList *self,
*/
/**
- * tp_base_contact_list_add_to_group_async:
+ * tp_mutable_contact_group_list_add_to_group_async:
* @self: a contact list manager
* @group: the normalized name of a group
* @contacts: some contacts (may be an empty set)
@@ -3525,7 +3608,7 @@ tp_contact_group_list_dup_group_members (TpContactGroupList *self,
* Since: 0.13.0
*/
void
-tp_base_contact_list_add_to_group_async (TpBaseContactList *self,
+tp_mutable_contact_group_list_add_to_group_async (TpMutableContactGroupList *self,
const gchar *group,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
@@ -3537,19 +3620,18 @@ tp_base_contact_list_add_to_group_async (TpBaseContactList *self,
g_return_if_fail (iface != NULL);
g_return_if_fail (iface->add_to_group_async != NULL);
- iface->add_to_group_async (TP_MUTABLE_CONTACT_GROUP_LIST (self), group,
- contacts, callback, user_data);
+ iface->add_to_group_async (self, group, contacts, callback, user_data);
}
/**
- * tp_base_contact_list_add_to_group_finish:
+ * tp_mutable_contact_group_list_add_to_group_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_add_to_group_async()
+ * tp_mutable_contact_group_list_add_to_group_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_add_to_group_async().
+ * tp_mutable_contact_group_list_add_to_group_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_GROUP_LIST, it is an error to call this method.
@@ -3564,7 +3646,7 @@ tp_base_contact_list_add_to_group_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_add_to_group_finish (TpBaseContactList *self,
+tp_mutable_contact_group_list_add_to_group_finish (TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error)
{
@@ -3575,8 +3657,7 @@ tp_base_contact_list_add_to_group_finish (TpBaseContactList *self,
g_return_val_if_fail (mutable_groups_iface->add_to_group_finish != NULL,
FALSE);
- return mutable_groups_iface->add_to_group_finish (
- TP_MUTABLE_CONTACT_GROUP_LIST (self), result, error);
+ return mutable_groups_iface->add_to_group_finish (self, result, error);
}
/**
@@ -3593,7 +3674,7 @@ tp_base_contact_list_add_to_group_finish (TpBaseContactList *self,
*/
/**
- * tp_base_contact_list_rename_group_async:
+ * tp_mutable_contact_group_list_rename_group_async:
* @self: a contact list manager
* @old_name: the normalized name of a group, which must exist
* @new_name: a new normalized name for the group name
@@ -3621,7 +3702,7 @@ tp_base_contact_list_add_to_group_finish (TpBaseContactList *self,
* Since: 0.13.0
*/
void
-tp_base_contact_list_rename_group_async (TpBaseContactList *self,
+tp_mutable_contact_group_list_rename_group_async (TpMutableContactGroupList *self,
const gchar *old_name,
const gchar *new_name,
GAsyncReadyCallback callback,
@@ -3634,8 +3715,7 @@ tp_base_contact_list_rename_group_async (TpBaseContactList *self,
g_return_if_fail (iface != NULL);
g_return_if_fail (iface->rename_group_async != NULL);
- iface->rename_group_async (TP_MUTABLE_CONTACT_GROUP_LIST (self), old_name,
- new_name, callback, user_data);
+ iface->rename_group_async (self, old_name, new_name, callback, user_data);
}
static void
@@ -3643,11 +3723,11 @@ emulate_rename_group_remove_cb (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactGroupList *self = TP_MUTABLE_CONTACT_GROUP_LIST (source);
GSimpleAsyncResult *rename_result = user_data;
GError *error = NULL;
- if (!tp_base_contact_list_remove_group_finish (self, result, &error))
+ if (!tp_mutable_contact_group_list_remove_group_finish (self, result, &error))
{
g_simple_async_result_set_from_error (rename_result, error);
g_clear_error (&error);
@@ -3662,11 +3742,11 @@ emulate_rename_group_add_cb (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactGroupList *self = TP_MUTABLE_CONTACT_GROUP_LIST (source);
GSimpleAsyncResult *rename_result = user_data;
GError *error = NULL;
- if (!tp_base_contact_list_add_to_group_finish (self, result, &error))
+ if (!tp_mutable_contact_group_list_add_to_group_finish (self, result, &error))
{
g_simple_async_result_set_from_error (rename_result, error);
g_clear_error (&error);
@@ -3674,7 +3754,7 @@ emulate_rename_group_add_cb (GObject *source,
goto out;
}
- tp_base_contact_list_remove_group_async (self,
+ tp_mutable_contact_group_list_remove_group_async (self,
g_simple_async_result_get_op_res_gpointer (rename_result),
emulate_rename_group_remove_cb, g_object_ref (rename_result));
@@ -3701,7 +3781,7 @@ tp_base_contact_list_emulate_rename_group (TpMutableContactGroupList *self,
old_members = tp_contact_group_list_dup_group_members (
TP_CONTACT_GROUP_LIST (self), old_name);
- tp_base_contact_list_add_to_group_async (TP_BASE_CONTACT_LIST (self),
+ tp_mutable_contact_group_list_add_to_group_async (self,
new_name, old_members, emulate_rename_group_add_cb,
g_object_ref (result));
g_object_unref (result);
@@ -3709,14 +3789,14 @@ tp_base_contact_list_emulate_rename_group (TpMutableContactGroupList *self,
}
/**
- * tp_base_contact_list_rename_group_finish:
+ * tp_mutable_contact_group_list_rename_group_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_rename_group_async()
+ * tp_mutable_contact_group_list_rename_group_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_rename_group_async().
+ * tp_mutable_contact_group_list_rename_group_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_GROUP_LIST, it is an error to call this method.
@@ -3731,7 +3811,7 @@ tp_base_contact_list_emulate_rename_group (TpMutableContactGroupList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_rename_group_finish (TpBaseContactList *self,
+tp_mutable_contact_group_list_rename_group_finish (TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error)
{
@@ -3742,12 +3822,11 @@ tp_base_contact_list_rename_group_finish (TpBaseContactList *self,
g_return_val_if_fail (mutable_groups_iface->rename_group_finish != NULL,
FALSE);
- return mutable_groups_iface->rename_group_finish (
- TP_MUTABLE_CONTACT_GROUP_LIST (self), result, error);
+ return mutable_groups_iface->rename_group_finish (self, result, error);
}
/**
- * tp_base_contact_list_remove_from_group_async:
+ * tp_mutable_contact_group_list_remove_from_group_async:
* @self: a contact list manager
* @group: the normalized name of a group
* @contacts: some contacts
@@ -3767,7 +3846,8 @@ tp_base_contact_list_rename_group_finish (TpBaseContactList *self,
*
* Since: 0.13.0
*/
-void tp_base_contact_list_remove_from_group_async (TpBaseContactList *self,
+void tp_mutable_contact_group_list_remove_from_group_async (
+ TpMutableContactGroupList *self,
const gchar *group,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
@@ -3779,19 +3859,18 @@ void tp_base_contact_list_remove_from_group_async (TpBaseContactList *self,
g_return_if_fail (iface != NULL);
g_return_if_fail (iface->remove_from_group_async != NULL);
- iface->remove_from_group_async (TP_MUTABLE_CONTACT_GROUP_LIST (self), group,
- contacts, callback, user_data);
+ iface->remove_from_group_async (self, group, contacts, callback, user_data);
}
/**
- * tp_base_contact_list_remove_from_group_finish:
+ * tp_mutable_contact_group_list_remove_from_group_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_remove_from_group_async()
+ * tp_mutable_contact_group_list_remove_from_group_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_remove_from_group_async().
+ * tp_mutable_contact_group_list_remove_from_group_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_GROUP_LIST, it is an error to call this method.
@@ -3806,7 +3885,7 @@ void tp_base_contact_list_remove_from_group_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_remove_from_group_finish (TpBaseContactList *self,
+tp_mutable_contact_group_list_remove_from_group_finish (TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error)
{
@@ -3817,8 +3896,7 @@ tp_base_contact_list_remove_from_group_finish (TpBaseContactList *self,
g_return_val_if_fail (mutable_groups_iface->remove_from_group_finish != NULL,
FALSE);
- return mutable_groups_iface->remove_from_group_finish (
- TP_MUTABLE_CONTACT_GROUP_LIST (self), result, error);
+ return mutable_groups_iface->remove_from_group_finish (self, result, error);
}
/**
@@ -3834,7 +3912,7 @@ tp_base_contact_list_remove_from_group_finish (TpBaseContactList *self,
*/
/**
- * tp_base_contact_list_remove_group_async:
+ * tp_mutable_contact_group_list_remove_group_async:
* @self: a contact list manager
* @group: the normalized name of a group
* @callback: a callback to call on success, failure or disconnection
@@ -3854,7 +3932,7 @@ tp_base_contact_list_remove_from_group_finish (TpBaseContactList *self,
* Since: 0.13.0
*/
void
-tp_base_contact_list_remove_group_async (TpBaseContactList *self,
+tp_mutable_contact_group_list_remove_group_async (TpMutableContactGroupList *self,
const gchar *group,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -3865,19 +3943,18 @@ tp_base_contact_list_remove_group_async (TpBaseContactList *self,
g_return_if_fail (mutable_group_iface != NULL);
g_return_if_fail (mutable_group_iface->remove_group_async != NULL);
- mutable_group_iface->remove_group_async (TP_MUTABLE_CONTACT_GROUP_LIST (self),
- group, callback, user_data);
+ mutable_group_iface->remove_group_async (self, group, callback, user_data);
}
/**
- * tp_base_contact_list_remove_group_finish:
+ * tp_mutable_contact_group_list_remove_group_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_remove_group_async()
+ * tp_mutable_contact_group_list_remove_group_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_remove_group_async().
+ * tp_mutable_contact_group_list_remove_group_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_GROUP_LIST, it is an error to call this method.
@@ -3892,7 +3969,7 @@ tp_base_contact_list_remove_group_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_remove_group_finish (TpBaseContactList *self,
+tp_mutable_contact_group_list_remove_group_finish (TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error)
{
@@ -3903,8 +3980,7 @@ tp_base_contact_list_remove_group_finish (TpBaseContactList *self,
g_return_val_if_fail (mutable_groups_iface->remove_group_finish != NULL,
FALSE);
- return mutable_groups_iface->remove_group_finish (
- TP_MUTABLE_CONTACT_GROUP_LIST (self), result, error);
+ return mutable_groups_iface->remove_group_finish (self, result, error);
}
static gboolean
@@ -3957,13 +4033,13 @@ tp_base_contact_list_mixin_get_contact_list_attributes (
* @user_data: user data for the callback
*
* Signature of an implementation of
- * tp_base_contact_list_set_contact_groups_async().
+ * tp_mutable_contact_group_list_set_contact_groups_async().
*
* Since: 0.13.0
*/
/**
- * tp_base_contact_list_set_contact_groups_async:
+ * tp_mutable_contact_group_list_set_contact_groups_async:
* @self: a contact list manager
* @contact: a contact handle
* @normalized_names: (array length=n_names): the normalized names of some
@@ -3986,7 +4062,8 @@ tp_base_contact_list_mixin_get_contact_list_attributes (
*
* Since: 0.13.0
*/
-void tp_base_contact_list_set_contact_groups_async (TpBaseContactList *self,
+void tp_mutable_contact_group_list_set_contact_groups_async (
+ TpMutableContactGroupList *self,
TpHandle contact,
const gchar * const *normalized_names,
gsize n_names,
@@ -3999,20 +4076,19 @@ void tp_base_contact_list_set_contact_groups_async (TpBaseContactList *self,
g_return_if_fail (mutable_groups_iface != NULL);
g_return_if_fail (mutable_groups_iface->set_contact_groups_async != NULL);
- mutable_groups_iface->set_contact_groups_async (
- TP_MUTABLE_CONTACT_GROUP_LIST (self), contact, normalized_names, n_names,
- callback, user_data);
+ mutable_groups_iface->set_contact_groups_async (self, contact,
+ normalized_names, n_names, callback, user_data);
}
/**
- * tp_base_contact_list_set_contact_groups_finish:
+ * tp_mutable_contact_group_list_set_contact_groups_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_set_contact_groups_async()
+ * tp_mutable_contact_group_list_set_contact_groups_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_set_contact_groups_async().
+ * tp_mutable_contact_group_list_set_contact_groups_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_GROUP_LIST, it is an error to call this method.
@@ -4028,7 +4104,7 @@ void tp_base_contact_list_set_contact_groups_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_set_contact_groups_finish (TpBaseContactList *self,
+tp_mutable_contact_group_list_set_contact_groups_finish (TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error)
{
@@ -4039,22 +4115,21 @@ tp_base_contact_list_set_contact_groups_finish (TpBaseContactList *self,
g_return_val_if_fail (mutable_groups_iface->set_contact_groups_finish !=
NULL, FALSE);
- return mutable_groups_iface->set_contact_groups_finish (
- TP_MUTABLE_CONTACT_GROUP_LIST (self), result, error);
+ return mutable_groups_iface->set_contact_groups_finish (self, result, error);
}
/**
- * tp_base_contact_list_set_group_members_async:
+ * tp_mutable_contact_group_list_set_group_members_async:
* @self: a contact list manager
- * @normalized_group: the normalized name of a group
+ * @group: the normalized name of a group
* @contacts: the contacts who should be in the group
* @callback: a callback to call on success, failure or disconnection
* @user_data: user data for the callback
*
- * Set the members of @normalized_group to be exactly @contacts (i.e.
+ * Set the members of @group to be exactly @contacts (i.e.
* add @contacts, and simultaneously remove all members not in @contacts).
*
- * If @normalized_group does not exist, the implementation should create it,
+ * If @group does not exist, the implementation should create it,
* even if @contacts is empty.
*
* If the #TpBaseContactList subclass does not implement
@@ -4069,8 +4144,8 @@ tp_base_contact_list_set_contact_groups_finish (TpBaseContactList *self,
* Since: 0.13.0
*/
void
-tp_base_contact_list_set_group_members_async (TpBaseContactList *self,
- const gchar *normalized_group,
+tp_mutable_contact_group_list_set_group_members_async (TpMutableContactGroupList *self,
+ const gchar *group,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -4081,20 +4156,19 @@ tp_base_contact_list_set_group_members_async (TpBaseContactList *self,
g_return_if_fail (mutable_groups_iface != NULL);
g_return_if_fail (mutable_groups_iface->set_group_members_async != NULL);
- mutable_groups_iface->set_group_members_async (
- TP_MUTABLE_CONTACT_GROUP_LIST (self), normalized_group, contacts,
- callback, user_data);
+ mutable_groups_iface->set_group_members_async (self, group,
+ contacts, callback, user_data);
}
/**
- * tp_base_contact_list_set_group_members_finish:
+ * tp_mutable_contact_group_list_set_group_members_finish:
* @self: a contact list manager
* @result: the result passed to @callback by an implementation of
- * tp_base_contact_list_set_group_members_async()
+ * tp_mutable_contact_group_list_set_group_members_async()
* @error: used to raise an error if %FALSE is returned
*
* Interpret the result of an asynchronous call to
- * tp_base_contact_list_set_group_members_async().
+ * tp_mutable_contact_group_list_set_group_members_async().
*
* If the #TpBaseContactList subclass does not implement
* %TP_TYPE_MUTABLE_CONTACT_GROUP_LIST, it is an error to call this method.
@@ -4109,7 +4183,7 @@ tp_base_contact_list_set_group_members_async (TpBaseContactList *self,
* Since: 0.13.0
*/
gboolean
-tp_base_contact_list_set_group_members_finish (TpBaseContactList *self,
+tp_mutable_contact_group_list_set_group_members_finish (TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error)
{
@@ -4120,8 +4194,7 @@ tp_base_contact_list_set_group_members_finish (TpBaseContactList *self,
g_return_val_if_fail (mutable_groups_iface->set_group_members_finish !=
NULL, FALSE);
- return mutable_groups_iface->set_group_members_finish (
- TP_MUTABLE_CONTACT_GROUP_LIST (self), result, error);
+ return mutable_groups_iface->set_group_members_finish (self, result, error);
}
static gboolean
@@ -4197,10 +4270,10 @@ tp_base_contact_list_mixin_request_subscription_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactList *self = TP_MUTABLE_CONTACT_LIST (source);
GError *error = NULL;
- tp_base_contact_list_request_subscription_finish (self, result, &error);
+ tp_mutable_contact_list_request_subscription_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4225,7 +4298,8 @@ tp_base_contact_list_mixin_request_subscription (
contacts_set = tp_handle_set_new_from_variant (self->priv->contact_repo,
contacts_variant);
- tp_base_contact_list_request_subscription_async (self, contacts_set, message,
+ tp_mutable_contact_list_request_subscription_async (
+ TP_MUTABLE_CONTACT_LIST (self), contacts_set, message,
tp_base_contact_list_mixin_request_subscription_cb, context);
tp_handle_set_destroy (contacts_set);
@@ -4238,10 +4312,10 @@ tp_base_contact_list_mixin_authorize_publication_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactList *self = TP_MUTABLE_CONTACT_LIST (source);
GError *error = NULL;
- tp_base_contact_list_authorize_publication_finish (self, result, &error);
+ tp_mutable_contact_list_authorize_publication_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4265,7 +4339,8 @@ tp_base_contact_list_mixin_authorize_publication (
contacts_set = tp_handle_set_new_from_variant (self->priv->contact_repo,
contacts_variant);
- tp_base_contact_list_authorize_publication_async (self, contacts_set,
+ tp_mutable_contact_list_authorize_publication_async (
+ TP_MUTABLE_CONTACT_LIST (self), contacts_set,
tp_base_contact_list_mixin_authorize_publication_cb, context);
tp_handle_set_destroy (contacts_set);
@@ -4278,10 +4353,10 @@ tp_base_contact_list_mixin_remove_contacts_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactList *self = TP_MUTABLE_CONTACT_LIST (source);
GError *error = NULL;
- tp_base_contact_list_remove_contacts_finish (self, result, &error);
+ tp_mutable_contact_list_remove_contacts_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4305,7 +4380,8 @@ tp_base_contact_list_mixin_remove_contacts (
contacts_set = tp_handle_set_new_from_variant (self->priv->contact_repo,
contacts_variant);
- tp_base_contact_list_remove_contacts_async (self, contacts_set,
+ tp_mutable_contact_list_remove_contacts_async (
+ TP_MUTABLE_CONTACT_LIST (self), contacts_set,
tp_base_contact_list_mixin_remove_contacts_cb, context);
tp_handle_set_destroy (contacts_set);
@@ -4318,10 +4394,10 @@ tp_base_contact_list_mixin_unsubscribe_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactList *self = TP_MUTABLE_CONTACT_LIST (source);
GError *error = NULL;
- tp_base_contact_list_unsubscribe_finish (self, result, &error);
+ tp_mutable_contact_list_unsubscribe_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4345,8 +4421,8 @@ tp_base_contact_list_mixin_unsubscribe (
contacts_set = tp_handle_set_new_from_variant (self->priv->contact_repo,
contacts_variant);
- tp_base_contact_list_unsubscribe_async (self, contacts_set,
- tp_base_contact_list_mixin_unsubscribe_cb, context);
+ tp_mutable_contact_list_unsubscribe_async (TP_MUTABLE_CONTACT_LIST (self),
+ contacts_set, tp_base_contact_list_mixin_unsubscribe_cb, context);
tp_handle_set_destroy (contacts_set);
out:
@@ -4358,10 +4434,10 @@ tp_base_contact_list_mixin_unpublish_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactList *self = TP_MUTABLE_CONTACT_LIST (source);
GError *error = NULL;
- tp_base_contact_list_unpublish_finish (self, result, &error);
+ tp_mutable_contact_list_unpublish_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4385,8 +4461,8 @@ tp_base_contact_list_mixin_unpublish (
contacts_set = tp_handle_set_new_from_variant (self->priv->contact_repo,
contacts_variant);
- tp_base_contact_list_unpublish_async (self, contacts_set,
- tp_base_contact_list_mixin_unpublish_cb, context);
+ tp_mutable_contact_list_unpublish_async (TP_MUTABLE_CONTACT_LIST (self),
+ contacts_set, tp_base_contact_list_mixin_unpublish_cb, context);
tp_handle_set_destroy (contacts_set);
out:
@@ -4559,7 +4635,7 @@ _tp_base_contact_list_implement_contact_list (TpBaseContactList *self)
}
/**
- * TpBaseContactListUIntFunc:
+ * TpMutableContactGroupListUIntFunc:
* @self: a contact list manager
*
* Signature of a virtual method that returns an unsigned integer result.
@@ -4611,7 +4687,7 @@ tp_base_contact_list_get_group_storage (TpBaseContactList *self)
if (iface->get_group_storage == NULL)
return TP_CONTACT_METADATA_STORAGE_TYPE_ANYONE;
- return iface->get_group_storage (self);
+ return iface->get_group_storage (TP_MUTABLE_CONTACT_GROUP_LIST (self));
}
static void
@@ -4619,10 +4695,10 @@ tp_base_contact_list_mixin_set_contact_groups_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactGroupList *self = TP_MUTABLE_CONTACT_GROUP_LIST (source);
GError *error = NULL;
- tp_base_contact_list_set_contact_groups_finish (self, result, &error);
+ tp_mutable_contact_group_list_set_contact_groups_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4663,7 +4739,8 @@ tp_base_contact_list_mixin_set_contact_groups (
}
}
- tp_base_contact_list_set_contact_groups_async (self, contact,
+ tp_mutable_contact_group_list_set_contact_groups_async (
+ TP_MUTABLE_CONTACT_GROUP_LIST (self), contact,
(const gchar * const *) normalized_groups->pdata,
normalized_groups->len,
tp_base_contact_list_mixin_set_contact_groups_cb, context);
@@ -4685,10 +4762,10 @@ tp_base_contact_list_mixin_set_group_members_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactGroupList *self = TP_MUTABLE_CONTACT_GROUP_LIST (source);
GError *error = NULL;
- tp_base_contact_list_set_group_members_finish (self, result, &error);
+ tp_mutable_contact_group_list_set_group_members_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4713,7 +4790,8 @@ tp_base_contact_list_mixin_set_group_members (
contacts_set = tp_handle_set_new_from_variant (self->priv->contact_repo,
contacts_variant);
- tp_base_contact_list_set_group_members_async (self,
+ tp_mutable_contact_group_list_set_group_members_async (
+ TP_MUTABLE_CONTACT_GROUP_LIST (self),
group, contacts_set, tp_base_contact_list_mixin_set_group_members_cb,
context);
tp_handle_set_destroy (contacts_set);
@@ -4727,10 +4805,10 @@ tp_base_contact_list_mixin_add_to_group_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactGroupList *self = TP_MUTABLE_CONTACT_GROUP_LIST (source);
GError *error = NULL;
- tp_base_contact_list_add_to_group_finish (self, result, &error);
+ tp_mutable_contact_group_list_add_to_group_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4764,7 +4842,8 @@ tp_base_contact_list_mixin_add_to_group (
contacts_set = tp_handle_set_new_from_variant (self->priv->contact_repo,
contacts_variant);
- tp_base_contact_list_add_to_group_async (self, normalized_group,
+ tp_mutable_contact_group_list_add_to_group_async (TP_MUTABLE_CONTACT_GROUP_LIST (self),
+ normalized_group,
contacts_set, tp_base_contact_list_mixin_add_to_group_cb, context);
tp_handle_set_destroy (contacts_set);
g_free (normalized_group);
@@ -4778,10 +4857,10 @@ tp_base_contact_list_mixin_remove_from_group_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactGroupList *self = TP_MUTABLE_CONTACT_GROUP_LIST (source);
GError *error = NULL;
- tp_base_contact_list_remove_from_group_finish (self, result, &error);
+ tp_mutable_contact_group_list_remove_from_group_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4816,7 +4895,8 @@ tp_base_contact_list_mixin_remove_from_group (
contacts_set = tp_handle_set_new_from_variant (self->priv->contact_repo,
contacts_variant);
- tp_base_contact_list_remove_from_group_async (self, normalized_group,
+ tp_mutable_contact_group_list_remove_from_group_async (
+ TP_MUTABLE_CONTACT_GROUP_LIST (self), normalized_group,
contacts_set, tp_base_contact_list_mixin_remove_from_group_cb, context);
tp_handle_set_destroy (contacts_set);
@@ -4830,10 +4910,10 @@ tp_base_contact_list_mixin_remove_group_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactGroupList *self = TP_MUTABLE_CONTACT_GROUP_LIST (source);
GError *error = NULL;
- tp_base_contact_list_remove_group_finish (self, result, &error);
+ tp_mutable_contact_group_list_remove_group_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4864,8 +4944,8 @@ tp_base_contact_list_mixin_remove_group (
goto out;
}
- tp_base_contact_list_remove_group_async (self, group,
- tp_base_contact_list_mixin_remove_group_cb, context);
+ tp_mutable_contact_group_list_remove_group_async (TP_MUTABLE_CONTACT_GROUP_LIST (self),
+ group, tp_base_contact_list_mixin_remove_group_cb, context);
out:
g_free (normalized_group);
@@ -4877,10 +4957,10 @@ tp_base_contact_list_mixin_rename_group_cb (GObject *source,
GAsyncResult *result,
gpointer context)
{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
+ TpMutableContactGroupList *self = TP_MUTABLE_CONTACT_GROUP_LIST (source);
GError *error = NULL;
- tp_base_contact_list_rename_group_finish (self, result, &error);
+ tp_mutable_contact_group_list_rename_group_finish (self, result, &error);
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
}
@@ -4926,7 +5006,7 @@ tp_base_contact_list_mixin_rename_group (
goto out;
}
- tp_base_contact_list_rename_group_async (self,
+ tp_mutable_contact_group_list_rename_group_async (TP_MUTABLE_CONTACT_GROUP_LIST (self),
old_normalized, new_normalized,
tp_base_contact_list_mixin_rename_group_cb, context);
diff --git a/telepathy-glib/base-contact-list.h b/telepathy-glib/base-contact-list.h
index 4c8748135..5621682cd 100644
--- a/telepathy-glib/base-contact-list.h
+++ b/telepathy-glib/base-contact-list.h
@@ -166,49 +166,65 @@ struct _TpBaseContactListClass {
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), \
TP_TYPE_MUTABLE_CONTACT_LIST, TpMutableContactListInterface))
+#define TP_MUTABLE_CONTACT_LIST(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TYPE_MUTABLE_CONTACT_LIST, \
+ TpMutableContactList))
+
typedef struct _TpMutableContactListInterface TpMutableContactListInterface;
+typedef struct _TpMutableContactList TpMutableContactList;
-typedef void (*TpBaseContactListRequestSubscriptionFunc) (
- TpBaseContactList *self,
+typedef void (*TpMutableContactListRequestSubscriptionFunc) (
+ TpMutableContactList *self,
TpHandleSet *contacts,
const gchar *message,
GAsyncReadyCallback callback,
gpointer user_data);
-typedef void (*TpBaseContactListActOnContactsFunc) (
- TpBaseContactList *self,
+typedef void (*TpMutableContactListActOnContactsFunc) (
+ TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
+typedef gboolean (*TpMutableContactListAsyncFinishFunc) (
+ TpMutableContactList *self,
+ GAsyncResult *result,
+ GError **error);
+
+typedef gboolean (*TpMutableContactListBooleanFunc) (
+ TpMutableContactList *self);
+
+gboolean tp_mutable_contact_list_true_func (TpMutableContactList *self);
+gboolean tp_mutable_contact_list_false_func (TpMutableContactList *self);
+
struct _TpMutableContactListInterface {
GTypeInterface parent;
/* _async mandatory-to-implement, _finish has a default implementation
* suitable for a GSimpleAsyncResult */
- TpBaseContactListRequestSubscriptionFunc request_subscription_async;
- TpBaseContactListAsyncFinishFunc request_subscription_finish;
+ TpMutableContactListRequestSubscriptionFunc request_subscription_async;
+ TpMutableContactListAsyncFinishFunc request_subscription_finish;
- TpBaseContactListActOnContactsFunc authorize_publication_async;
- TpBaseContactListAsyncFinishFunc authorize_publication_finish;
+ TpMutableContactListActOnContactsFunc authorize_publication_async;
+ TpMutableContactListAsyncFinishFunc authorize_publication_finish;
- TpBaseContactListActOnContactsFunc remove_contacts_async;
- TpBaseContactListAsyncFinishFunc remove_contacts_finish;
+ TpMutableContactListActOnContactsFunc remove_contacts_async;
+ TpMutableContactListAsyncFinishFunc remove_contacts_finish;
- TpBaseContactListActOnContactsFunc unsubscribe_async;
- TpBaseContactListAsyncFinishFunc unsubscribe_finish;
+ TpMutableContactListActOnContactsFunc unsubscribe_async;
+ TpMutableContactListAsyncFinishFunc unsubscribe_finish;
- TpBaseContactListActOnContactsFunc unpublish_async;
- TpBaseContactListAsyncFinishFunc unpublish_finish;
+ TpMutableContactListActOnContactsFunc unpublish_async;
+ TpMutableContactListAsyncFinishFunc unpublish_finish;
/* optional-to-implement */
- TpBaseContactListActOnContactsFunc store_contacts_async;
- TpBaseContactListAsyncFinishFunc store_contacts_finish;
+ TpMutableContactListActOnContactsFunc store_contacts_async;
+ TpMutableContactListAsyncFinishFunc store_contacts_finish;
- TpBaseContactListBooleanFunc can_change_contact_list;
- TpBaseContactListBooleanFunc get_request_uses_message;
+ TpMutableContactListBooleanFunc can_change_contact_list;
+ TpMutableContactListBooleanFunc get_request_uses_message;
};
GType tp_mutable_contact_list_get_type (void) G_GNUC_CONST;
@@ -219,60 +235,64 @@ gboolean tp_base_contact_list_can_change_contact_list (
gboolean tp_base_contact_list_get_request_uses_message (
TpBaseContactList *self);
-void tp_base_contact_list_request_subscription_async (TpBaseContactList *self,
+void tp_mutable_contact_list_request_subscription_async (
+ TpMutableContactList *self,
TpHandleSet *contacts,
const gchar *message,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_request_subscription_finish (
- TpBaseContactList *self,
+gboolean tp_mutable_contact_list_request_subscription_finish (
+ TpMutableContactList *self,
GAsyncResult *result,
GError **error);
-void tp_base_contact_list_authorize_publication_async (TpBaseContactList *self,
+void tp_mutable_contact_list_authorize_publication_async (
+ TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_authorize_publication_finish (
- TpBaseContactList *self,
+gboolean tp_mutable_contact_list_authorize_publication_finish (
+ TpMutableContactList *self,
GAsyncResult *result,
GError **error);
-void tp_base_contact_list_store_contacts_async (TpBaseContactList *self,
+void tp_mutable_contact_list_store_contacts_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_store_contacts_finish (TpBaseContactList *self,
+gboolean tp_mutable_contact_list_store_contacts_finish (
+ TpMutableContactList *self,
GAsyncResult *result,
GError **error);
-void tp_base_contact_list_remove_contacts_async (TpBaseContactList *self,
+void tp_mutable_contact_list_remove_contacts_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_remove_contacts_finish (TpBaseContactList *self,
+gboolean tp_mutable_contact_list_remove_contacts_finish (
+ TpMutableContactList *self,
GAsyncResult *result,
GError **error);
-void tp_base_contact_list_unsubscribe_async (TpBaseContactList *self,
+void tp_mutable_contact_list_unsubscribe_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_unsubscribe_finish (TpBaseContactList *self,
+gboolean tp_mutable_contact_list_unsubscribe_finish (TpMutableContactList *self,
GAsyncResult *result,
GError **error);
-void tp_base_contact_list_unpublish_async (TpBaseContactList *self,
+void tp_mutable_contact_list_unpublish_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_unpublish_finish (TpBaseContactList *self,
+gboolean tp_mutable_contact_list_unpublish_finish (TpMutableContactList *self,
GAsyncResult *result,
GError **error);
@@ -498,8 +518,8 @@ typedef gboolean (*TpMutableContactGroupListAsyncFinishFunc) (
GAsyncResult *result,
GError **error);
-typedef guint (*TpBaseContactListUIntFunc) (
- TpBaseContactList *self);
+typedef guint (*TpMutableContactGroupListUIntFunc) (
+ TpMutableContactGroupList *self);
TpContactMetadataStorageType tp_base_contact_list_get_group_storage (
TpBaseContactList *self);
@@ -512,15 +532,16 @@ typedef void (*TpMutableContactGroupListSetContactGroupsFunc) (
GAsyncReadyCallback callback,
gpointer user_data);
-void tp_base_contact_list_set_contact_groups_async (TpBaseContactList *self,
+void tp_mutable_contact_group_list_set_contact_groups_async (
+ TpMutableContactGroupList *self,
TpHandle contact,
const gchar * const *normalized_names,
gsize n_names,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_set_contact_groups_finish (
- TpBaseContactList *self,
+gboolean tp_mutable_contact_group_list_set_contact_groups_finish (
+ TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error);
@@ -531,36 +552,39 @@ typedef void (*TpMutableContactGroupListGroupContactsFunc) (
GAsyncReadyCallback callback,
gpointer user_data);
-void tp_base_contact_list_add_to_group_async (TpBaseContactList *self,
+void tp_mutable_contact_group_list_add_to_group_async (
+ TpMutableContactGroupList *self,
const gchar *group,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_add_to_group_finish (
- TpBaseContactList *self,
+gboolean tp_mutable_contact_group_list_add_to_group_finish (
+ TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error);
-void tp_base_contact_list_remove_from_group_async (TpBaseContactList *self,
+void tp_mutable_contact_group_list_remove_from_group_async (
+ TpMutableContactGroupList *self,
const gchar *group,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_remove_from_group_finish (
- TpBaseContactList *self,
+gboolean tp_mutable_contact_group_list_remove_from_group_finish (
+ TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error);
-void tp_base_contact_list_set_group_members_async (TpBaseContactList *self,
- const gchar *normalized_group,
+void tp_mutable_contact_group_list_set_group_members_async (
+ TpMutableContactGroupList *self,
+ const gchar *group,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_set_group_members_finish (
- TpBaseContactList *self,
+gboolean tp_mutable_contact_group_list_set_group_members_finish (
+ TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error);
@@ -570,12 +594,14 @@ typedef void (*TpMutableContactGroupListRemoveGroupFunc) (
GAsyncReadyCallback callback,
gpointer user_data);
-void tp_base_contact_list_remove_group_async (TpBaseContactList *self,
+void tp_mutable_contact_group_list_remove_group_async (
+ TpMutableContactGroupList *self,
const gchar *group,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_remove_group_finish (TpBaseContactList *self,
+gboolean tp_mutable_contact_group_list_remove_group_finish (
+ TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error);
@@ -586,13 +612,15 @@ typedef void (*TpMutableContactGroupListRenameGroupFunc) (
GAsyncReadyCallback callback,
gpointer user_data);
-void tp_base_contact_list_rename_group_async (TpBaseContactList *self,
+void tp_mutable_contact_group_list_rename_group_async (
+ TpMutableContactGroupList *self,
const gchar *old_name,
const gchar *new_name,
GAsyncReadyCallback callback,
gpointer user_data);
-gboolean tp_base_contact_list_rename_group_finish (TpBaseContactList *self,
+gboolean tp_mutable_contact_group_list_rename_group_finish (
+ TpMutableContactGroupList *self,
GAsyncResult *result,
GError **error);
@@ -640,7 +668,7 @@ struct _TpMutableContactGroupListInterface {
TpMutableContactGroupListRenameGroupFunc rename_group_async;
TpMutableContactGroupListAsyncFinishFunc rename_group_finish;
- TpBaseContactListUIntFunc get_group_storage;
+ TpMutableContactGroupListUIntFunc get_group_storage;
};
_TP_AVAILABLE_IN_1_0
diff --git a/telepathy-glib/introspection.am b/telepathy-glib/introspection.am
index d9b8bf12a..ab0a5bfe3 100644
--- a/telepathy-glib/introspection.am
+++ b/telepathy-glib/introspection.am
@@ -23,6 +23,7 @@ TelepathyGLib_1_gir_FILES = \
$(srcdir)/account-channel-request.c $(srcdir)/account-channel-request.h \
$(srcdir)/account-manager.c $(srcdir)/account-manager.h \
$(srcdir)/automatic-client-factory.c $(srcdir)/automatic-client-factory.h \
+ $(srcdir)/base-contact-list.c $(srcdir)/base-contact-list.h \
$(srcdir)/channel-filter.c $(srcdir)/channel-filter.h \
$(srcdir)/connection.c $(srcdir)/connection.h \
$(srcdir)/connection-contact-list.c $(srcdir)/connection-contact-list.h \
diff --git a/telepathy-glib/versions/main-1.0.abi b/telepathy-glib/versions/main-1.0.abi
index 1d1f7e1b1..899d682d9 100644
--- a/telepathy-glib/versions/main-1.0.abi
+++ b/telepathy-glib/versions/main-1.0.abi
@@ -243,10 +243,10 @@ tp_base_connection_manager_get_type
tp_base_connection_manager_register
tp_base_connection_register
tp_base_connection_set_self_handle
-tp_base_contact_list_add_to_group_async
-tp_base_contact_list_add_to_group_finish
-tp_base_contact_list_authorize_publication_async
-tp_base_contact_list_authorize_publication_finish
+tp_mutable_contact_group_list_add_to_group_async
+tp_mutable_contact_group_list_add_to_group_finish
+tp_mutable_contact_list_authorize_publication_async
+tp_mutable_contact_list_authorize_publication_finish
tp_blockable_contact_list_block_contacts_async
tp_blockable_contact_list_block_contacts_finish
tp_blockable_contact_list_block_contacts_with_abuse_async
@@ -282,32 +282,32 @@ tp_contact_group_list_normalize_group
tp_base_contact_list_one_contact_changed
tp_contact_group_list_one_contact_groups_changed
tp_base_contact_list_one_contact_removed
-tp_base_contact_list_remove_contacts_async
-tp_base_contact_list_remove_contacts_finish
-tp_base_contact_list_remove_from_group_async
-tp_base_contact_list_remove_from_group_finish
-tp_base_contact_list_remove_group_async
-tp_base_contact_list_remove_group_finish
-tp_base_contact_list_rename_group_async
-tp_base_contact_list_rename_group_finish
-tp_base_contact_list_request_subscription_async
-tp_base_contact_list_request_subscription_finish
-tp_base_contact_list_set_contact_groups_async
-tp_base_contact_list_set_contact_groups_finish
-tp_base_contact_list_set_group_members_async
-tp_base_contact_list_set_group_members_finish
+tp_mutable_contact_list_remove_contacts_async
+tp_mutable_contact_list_remove_contacts_finish
+tp_mutable_contact_group_list_remove_from_group_async
+tp_mutable_contact_group_list_remove_from_group_finish
+tp_mutable_contact_group_list_remove_group_async
+tp_mutable_contact_group_list_remove_group_finish
+tp_mutable_contact_group_list_rename_group_async
+tp_mutable_contact_group_list_rename_group_finish
+tp_mutable_contact_list_request_subscription_async
+tp_mutable_contact_list_request_subscription_finish
+tp_mutable_contact_group_list_set_contact_groups_async
+tp_mutable_contact_group_list_set_contact_groups_finish
+tp_mutable_contact_group_list_set_group_members_async
+tp_mutable_contact_group_list_set_group_members_finish
tp_base_contact_list_set_list_failed
tp_base_contact_list_set_list_pending
tp_base_contact_list_set_list_received
-tp_base_contact_list_store_contacts_async
-tp_base_contact_list_store_contacts_finish
+tp_mutable_contact_list_store_contacts_async
+tp_mutable_contact_list_store_contacts_finish
tp_base_contact_list_true_func
tp_blockable_contact_list_unblock_contacts_async
tp_blockable_contact_list_unblock_contacts_finish
-tp_base_contact_list_unpublish_async
-tp_base_contact_list_unpublish_finish
-tp_base_contact_list_unsubscribe_async
-tp_base_contact_list_unsubscribe_finish
+tp_mutable_contact_list_unpublish_async
+tp_mutable_contact_list_unpublish_finish
+tp_mutable_contact_list_unsubscribe_async
+tp_mutable_contact_list_unsubscribe_finish
tp_base_media_call_channel_get_local_hold_state
tp_base_media_call_channel_get_type
tp_base_media_call_content_get_local_media_description
diff --git a/telepathy-logger/log-store-pidgin.c b/telepathy-logger/log-store-pidgin.c
index 2aff34fe4..22e82a201 100644
--- a/telepathy-logger/log-store-pidgin.c
+++ b/telepathy-logger/log-store-pidgin.c
@@ -500,16 +500,15 @@ log_store_pidgin_dup_account (TplLogStorePidgin *self,
{
TpAccount *acc = (TpAccount *) l->data;
GVariant *params;
- const gchar *account_param, *server_param;
+ const gchar *account_param = NULL, *server_param = NULL;
if (tp_strdiff (tp_account_get_protocol_name (acc), protocol))
continue;
params = tp_account_dup_parameters (acc);
- g_variant_lookup (params,
- "account", "&s", &account_param,
- "server", "&s", &server_param);
+ g_variant_lookup (params, "account", "&s", &account_param);
+ g_variant_lookup (params, "server", "&s", &server_param);
if (!tp_strdiff (username, account_param))
{
diff --git a/tests/lib/contact-list-manager.c b/tests/lib/contact-list-manager.c
index 88f1709bd..941221364 100644
--- a/tests/lib/contact-list-manager.c
+++ b/tests/lib/contact-list-manager.c
@@ -422,7 +422,7 @@ contact_list_remove_group_async (TpMutableContactGroupList *base,
}
static void
-contact_list_request_subscription_async (TpBaseContactList *self,
+contact_list_request_subscription_async (TpMutableContactList *self,
TpHandleSet *contacts,
const gchar *message,
GAsyncReadyCallback callback,
@@ -446,7 +446,7 @@ contact_list_request_subscription_async (TpBaseContactList *self,
}
static void
-contact_list_authorize_publication_async (TpBaseContactList *self,
+contact_list_authorize_publication_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -467,7 +467,7 @@ contact_list_authorize_publication_async (TpBaseContactList *self,
}
static void
-contact_list_remove_contacts_async (TpBaseContactList *self,
+contact_list_remove_contacts_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -488,7 +488,7 @@ contact_list_remove_contacts_async (TpBaseContactList *self,
}
static void
-contact_list_unsubscribe_async (TpBaseContactList *self,
+contact_list_unsubscribe_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)
@@ -508,7 +508,7 @@ contact_list_unsubscribe_async (TpBaseContactList *self,
}
static void
-contact_list_unpublish_async (TpBaseContactList *self,
+contact_list_unpublish_async (TpMutableContactList *self,
TpHandleSet *contacts,
GAsyncReadyCallback callback,
gpointer user_data)