summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-04-12 16:08:56 -0400
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-04-12 16:08:56 -0400
commitafbb5c8f4704039bda80890f5f2220ce5890377f (patch)
treed1b85247bcdbe5bd7ac5b62315f9572902490386
parent26e77299b550a49a589e5d309d816b72df4c416d (diff)
proxy subclasses: use the new feature mixinfeature-mixin
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--telepathy-glib/account-manager.c14
-rw-r--r--telepathy-glib/account-manager.h1
-rw-r--r--telepathy-glib/account.c38
-rw-r--r--telepathy-glib/account.h1
-rw-r--r--telepathy-glib/call-channel.c15
-rw-r--r--telepathy-glib/call-channel.h1
-rw-r--r--telepathy-glib/call-content.c16
-rw-r--r--telepathy-glib/call-content.h1
-rw-r--r--telepathy-glib/call-stream.c16
-rw-r--r--telepathy-glib/call-stream.h1
-rw-r--r--telepathy-glib/channel-contacts.c4
-rw-r--r--telepathy-glib/channel-dispatch-operation.c16
-rw-r--r--telepathy-glib/channel-dispatch-operation.h1
-rw-r--r--telepathy-glib/channel-group.c3
-rw-r--r--telepathy-glib/channel-internal.h4
-rw-r--r--telepathy-glib/channel.c24
-rw-r--r--telepathy-glib/channel.h1
-rw-r--r--telepathy-glib/connection-aliasing.c4
-rw-r--r--telepathy-glib/connection-avatars.c4
-rw-r--r--telepathy-glib/connection-contact-info.c4
-rw-r--r--telepathy-glib/connection-contact-list.c16
-rw-r--r--telepathy-glib/connection-internal.h28
-rw-r--r--telepathy-glib/connection-manager.c16
-rw-r--r--telepathy-glib/connection-manager.h1
-rw-r--r--telepathy-glib/connection.c32
-rw-r--r--telepathy-glib/connection.h1
-rw-r--r--telepathy-glib/dbus-tube-channel.c15
-rw-r--r--telepathy-glib/dbus-tube-channel.h1
-rw-r--r--telepathy-glib/file-transfer-channel.c16
-rw-r--r--telepathy-glib/file-transfer-channel.h1
-rw-r--r--telepathy-glib/protocol.c17
-rw-r--r--telepathy-glib/proxy-internal.h16
-rw-r--r--telepathy-glib/text-channel.c19
-rw-r--r--telepathy-glib/text-channel.h1
-rw-r--r--tests/lib/my-conn-proxy.c48
-rw-r--r--tests/lib/my-conn-proxy.h1
36 files changed, 220 insertions, 178 deletions
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index ec4d52d21..b6544bcd6 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -37,6 +37,7 @@
#define DEBUG_FLAG TP_DEBUG_ACCOUNTS
#include "telepathy-glib/dbus-internal.h"
#include "telepathy-glib/debug-internal.h"
+#include "telepathy-glib/feature-mixin-internal.h"
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/simple-client-factory-internal.h"
@@ -169,10 +170,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-_tp_account_manager_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+_tp_account_manager_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_UNLIKELY (features[0].name == 0))
{
@@ -410,7 +411,7 @@ _tp_account_manager_check_core_ready (TpAccountManager *manager)
_tp_account_manager_update_most_available_presence (manager);
- _tp_proxy_set_feature_prepared ((TpProxy *) manager,
+ _tp_feature_mixin_set_feature_prepared (manager,
TP_ACCOUNT_MANAGER_FEATURE_CORE, TRUE);
}
@@ -579,9 +580,12 @@ tp_account_manager_class_init (TpAccountManagerClass *klass)
object_class->dispose = _tp_account_manager_dispose;
proxy_class->interface = TP_IFACE_QUARK_ACCOUNT_MANAGER;
- proxy_class->list_features = _tp_account_manager_list_features;
tp_account_manager_init_known_interfaces ();
+ klass->feature_class.list_features = _tp_account_manager_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpAccountManagerClass, feature_class));
+
/**
* TpAccountManager::account-usability-changed:
* @manager: a #TpAccountManager
diff --git a/telepathy-glib/account-manager.h b/telepathy-glib/account-manager.h
index 692633505..0ed84254b 100644
--- a/telepathy-glib/account-manager.h
+++ b/telepathy-glib/account-manager.h
@@ -43,6 +43,7 @@ struct _TpAccountManager {
struct _TpAccountManagerClass {
/*<private>*/
TpProxyClass parent_class;
+ TpFeatureMixinClass feature_class;
GCallback _padding[7];
TpAccountManagerClassPrivate *priv;
};
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index fbd12331c..c3b9448f4 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -39,6 +39,7 @@
#include "telepathy-glib/connection-internal.h"
#include "telepathy-glib/dbus-internal.h"
#include "telepathy-glib/debug-internal.h"
+#include "telepathy-glib/feature-mixin-internal.h"
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/simple-client-factory-internal.h"
#include <telepathy-glib/util-internal.h>
@@ -182,18 +183,18 @@ enum {
N_PROPS
};
-static void tp_account_prepare_connection_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+static void tp_account_prepare_connection_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
-static void tp_account_prepare_addressing_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+static void tp_account_prepare_addressing_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
-static void tp_account_prepare_storage_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+static void tp_account_prepare_storage_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -335,10 +336,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-_tp_account_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+_tp_account_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_UNLIKELY (features[0].name == 0))
{
@@ -574,8 +575,8 @@ _tp_account_got_all_storage_cb (TpProxy *proxy,
}
static void
-tp_account_prepare_storage_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_account_prepare_storage_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -958,7 +959,7 @@ _tp_account_update (TpAccount *account,
g_object_notify (G_OBJECT (account), "has-been-online");
}
- _tp_proxy_set_feature_prepared (proxy, TP_ACCOUNT_FEATURE_CORE, TRUE);
+ _tp_feature_mixin_set_feature_prepared (proxy, TP_ACCOUNT_FEATURE_CORE, TRUE);
}
static void
@@ -2011,8 +2012,11 @@ tp_account_class_init (TpAccountClass *klass)
0, NULL, NULL, NULL,
G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_STRING);
+ klass->feature_class.list_features = _tp_account_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpAccountClass, feature_class));
+
proxy_class->interface = TP_IFACE_QUARK_ACCOUNT;
- proxy_class->list_features = _tp_account_list_features;
tp_account_init_known_interfaces ();
}
@@ -4012,8 +4016,8 @@ connection_prepare_cb (GObject *object,
}
static void
-tp_account_prepare_connection_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_account_prepare_connection_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -4041,8 +4045,8 @@ tp_account_prepare_connection_async (TpProxy *proxy,
}
static void
-tp_account_prepare_addressing_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_account_prepare_addressing_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h
index 56cb88d40..52b353ceb 100644
--- a/telepathy-glib/account.h
+++ b/telepathy-glib/account.h
@@ -45,6 +45,7 @@ struct _TpAccount {
struct _TpAccountClass {
/*<private>*/
TpProxyClass parent_class;
+ TpFeatureMixinClass feature_class;
GCallback _padding[7];
TpAccountClassPrivate *priv;
};
diff --git a/telepathy-glib/call-channel.c b/telepathy-glib/call-channel.c
index 1bfa2c430..5f18d598a 100644
--- a/telepathy-glib/call-channel.c
+++ b/telepathy-glib/call-channel.c
@@ -661,8 +661,8 @@ got_hold_state_cb (TpChannel *proxy, guint arg_HoldState, guint arg_Reason,
}
static void
-_tp_call_channel_prepare_core_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+_tp_call_channel_prepare_core_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -816,10 +816,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_call_channel_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_call_channel_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_LIKELY (features[0].name != 0))
return features;
@@ -839,14 +839,15 @@ static void
tp_call_channel_class_init (TpCallChannelClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- TpProxyClass *proxy_class = (TpProxyClass *) klass;
GParamSpec *param_spec;
gobject_class->constructed = tp_call_channel_constructed;
gobject_class->get_property = tp_call_channel_get_property;
gobject_class->dispose = tp_call_channel_dispose;
- proxy_class->list_features = tp_call_channel_list_features;
+ klass->feature_class.list_features = tp_call_channel_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpCallChannelClass, feature_class));
g_type_class_add_private (gobject_class, sizeof (TpCallChannelPrivate));
diff --git a/telepathy-glib/call-channel.h b/telepathy-glib/call-channel.h
index 623963330..ff0fd99bc 100644
--- a/telepathy-glib/call-channel.h
+++ b/telepathy-glib/call-channel.h
@@ -50,6 +50,7 @@ struct _TpCallChannelClass
{
/*<private>*/
TpChannelClass parent_class;
+ TpFeatureMixinClass feature_class;
GCallback _padding[7];
};
diff --git a/telepathy-glib/call-content.c b/telepathy-glib/call-content.c
index 4a8aea037..c48592592 100644
--- a/telepathy-glib/call-content.c
+++ b/telepathy-glib/call-content.c
@@ -64,6 +64,7 @@
#define DEBUG_FLAG TP_DEBUG_CALL
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/call-internal.h"
+#include "telepathy-glib/feature-mixin-internal.h"
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/util-internal.h"
@@ -225,7 +226,7 @@ got_all_properties_cb (TpProxy *proxy,
if (error != NULL)
{
DEBUG ("Could not get the call content properties: %s", error->message);
- _tp_proxy_set_feature_prepared (proxy,
+ _tp_feature_mixin_set_feature_prepared (proxy,
TP_CALL_CONTENT_FEATURE_CORE, FALSE);
return;
}
@@ -262,7 +263,7 @@ got_all_properties_cb (TpProxy *proxy,
tones_stopped_cb, NULL, NULL, NULL, NULL);
}
- _tp_proxy_set_feature_prepared (proxy, TP_CALL_CONTENT_FEATURE_CORE, TRUE);
+ _tp_feature_mixin_set_feature_prepared (proxy, TP_CALL_CONTENT_FEATURE_CORE, TRUE);
}
struct _SendTonesData
@@ -523,10 +524,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_call_content_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_call_content_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_LIKELY (features[0].name != 0))
return features;
@@ -554,9 +555,12 @@ tp_call_content_class_init (TpCallContentClass *klass)
gobject_class->dispose = tp_call_content_dispose;
gobject_class->finalize = tp_call_content_finalize;
- proxy_class->list_features = tp_call_content_list_features;
proxy_class->interface = TP_IFACE_QUARK_CALL_CONTENT;
+ klass->feature_class.list_features = tp_call_content_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpCallContentClass, feature_class));
+
g_type_class_add_private (gobject_class, sizeof (TpCallContentPrivate));
tp_call_content_init_known_interfaces ();
diff --git a/telepathy-glib/call-content.h b/telepathy-glib/call-content.h
index 0888051d7..e85f42262 100644
--- a/telepathy-glib/call-content.h
+++ b/telepathy-glib/call-content.h
@@ -48,6 +48,7 @@ struct _TpCallContentClass
{
/*<private>*/
TpProxyClass parent_class;
+ TpFeatureMixinClass feature_class;
GCallback _padding[7];
};
diff --git a/telepathy-glib/call-stream.c b/telepathy-glib/call-stream.c
index 7ead22462..c11c2ca3a 100644
--- a/telepathy-glib/call-stream.c
+++ b/telepathy-glib/call-stream.c
@@ -62,6 +62,7 @@
#define DEBUG_FLAG TP_DEBUG_CALL
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/call-internal.h"
+#include "telepathy-glib/feature-mixin-internal.h"
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/util-internal.h"
@@ -195,7 +196,7 @@ got_all_properties_cb (TpProxy *proxy,
if (error != NULL)
{
DEBUG ("Could not get the call stream properties: %s", error->message);
- _tp_proxy_set_feature_prepared (proxy,
+ _tp_feature_mixin_set_feature_prepared (proxy,
TP_CALL_STREAM_FEATURE_CORE, FALSE);
return;
}
@@ -220,7 +221,7 @@ got_all_properties_cb (TpProxy *proxy,
update_remote_members (self, contacts, NULL);
g_hash_table_unref (contacts);
- _tp_proxy_set_feature_prepared (proxy, TP_CALL_STREAM_FEATURE_CORE, TRUE);
+ _tp_feature_mixin_set_feature_prepared (proxy, TP_CALL_STREAM_FEATURE_CORE, TRUE);
}
static void
@@ -311,10 +312,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_call_stream_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_call_stream_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_LIKELY (features[0].name != 0))
return features;
@@ -341,9 +342,12 @@ tp_call_stream_class_init (TpCallStreamClass *klass)
gobject_class->set_property = tp_call_stream_set_property;
gobject_class->dispose = tp_call_stream_dispose;
- proxy_class->list_features = tp_call_stream_list_features;
proxy_class->interface = TP_IFACE_QUARK_CALL_STREAM;
+ klass->feature_class.list_features = tp_call_stream_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpCallStreamClass, feature_class));
+
g_type_class_add_private (gobject_class, sizeof (TpCallStreamPrivate));
tp_call_stream_init_known_interfaces ();
diff --git a/telepathy-glib/call-stream.h b/telepathy-glib/call-stream.h
index 7039080d3..ca3d7c2f4 100644
--- a/telepathy-glib/call-stream.h
+++ b/telepathy-glib/call-stream.h
@@ -48,6 +48,7 @@ struct _TpCallStreamClass
{
/*<private>*/
TpProxyClass parent_class;
+ TpFeatureMixinClass feature_class;
GCallback _padding[7];
};
diff --git a/telepathy-glib/channel-contacts.c b/telepathy-glib/channel-contacts.c
index 984588a2f..b5f54149b 100644
--- a/telepathy-glib/channel-contacts.c
+++ b/telepathy-glib/channel-contacts.c
@@ -1091,8 +1091,8 @@ append_contacts (GPtrArray *contacts,
}
void
-_tp_channel_contacts_prepare_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+_tp_channel_contacts_prepare_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c
index fc367f7f4..6bdddcb10 100644
--- a/telepathy-glib/channel-dispatch-operation.c
+++ b/telepathy-glib/channel-dispatch-operation.c
@@ -659,8 +659,8 @@ out:
}
static void
-prepare_core_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+prepare_core_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -681,10 +681,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_channel_dispatch_operation_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_channel_dispatch_operation_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_LIKELY (features[0].name != 0))
return features;
@@ -835,7 +835,11 @@ tp_channel_dispatch_operation_class_init (TpChannelDispatchOperationClass *klass
proxy_class->interface = TP_IFACE_QUARK_CHANNEL_DISPATCH_OPERATION;
proxy_class->must_have_unique_name = TRUE;
- proxy_class->list_features = tp_channel_dispatch_operation_list_features;
+
+ klass->feature_class.list_features =
+ tp_channel_dispatch_operation_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpChannelDispatchOperationClass, feature_class));
tp_channel_dispatch_operation_init_known_interfaces ();
}
diff --git a/telepathy-glib/channel-dispatch-operation.h b/telepathy-glib/channel-dispatch-operation.h
index c38d46672..9c9231a61 100644
--- a/telepathy-glib/channel-dispatch-operation.h
+++ b/telepathy-glib/channel-dispatch-operation.h
@@ -49,6 +49,7 @@ struct _TpChannelDispatchOperation {
struct _TpChannelDispatchOperationClass {
/*<private>*/
TpProxyClass parent_class;
+ TpFeatureMixinClass feature_class;
GCallback _padding[7];
TpChannelDispatchOperationClassPrivate *priv;
};
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index e1d5d6533..2b63b15b1 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -33,6 +33,7 @@
#define DEBUG_FLAG TP_DEBUG_GROUPS
#include "telepathy-glib/debug-internal.h"
+#include "telepathy-glib/feature-mixin-internal.h"
#include "telepathy-glib/proxy-internal.h"
@@ -963,7 +964,7 @@ _tp_channel_get_group_properties (TpChannel *self)
if (!tp_proxy_has_interface_by_id (self,
TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP))
{
- _tp_proxy_set_feature_prepared ((TpProxy *) self,
+ _tp_feature_mixin_set_feature_prepared (self,
TP_CHANNEL_FEATURE_GROUP, FALSE);
DEBUG ("%p: not a Group, continuing", self);
diff --git a/telepathy-glib/channel-internal.h b/telepathy-glib/channel-internal.h
index d770144dc..42eeaa9a6 100644
--- a/telepathy-glib/channel-internal.h
+++ b/telepathy-glib/channel-internal.h
@@ -118,8 +118,8 @@ void _tp_channel_contacts_handle_owners_changed (TpChannel *self,
GHashTable *added, const GArray *removed, GHashTable *identifiers);
void _tp_channel_contacts_self_contact_changed (TpChannel *self,
guint self_handle, const gchar *identifier);
-void _tp_channel_contacts_prepare_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_channel_contacts_prepare_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index a404624d8..ffd12694a 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -35,6 +35,7 @@
#define DEBUG_FLAG TP_DEBUG_CHANNEL
#include "telepathy-glib/debug-internal.h"
+#include "telepathy-glib/feature-mixin-internal.h"
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/simple-client-factory-internal.h"
@@ -703,8 +704,8 @@ tp_channel_get_initial_chat_states_cb (TpProxy *proxy,
}
static void
-tp_channel_prepare_chat_states_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_channel_prepare_chat_states_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -751,9 +752,9 @@ _tp_channel_continue_introspection (TpChannel *self)
/* for now, we only have one introspection queue, so CORE and
* (if supported) GROUP turn up simultaneously */
- _tp_proxy_set_feature_prepared ((TpProxy *) self,
+ _tp_feature_mixin_set_feature_prepared (self,
TP_CHANNEL_FEATURE_CORE, TRUE);
- _tp_proxy_set_feature_prepared ((TpProxy *) self,
+ _tp_feature_mixin_set_feature_prepared (self,
TP_CHANNEL_FEATURE_GROUP,
tp_proxy_has_interface_by_id (self,
TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP));
@@ -1117,8 +1118,8 @@ password_flags_changed_cb (TpChannel *self,
}
static void
-tp_channel_prepare_password_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_channel_prepare_password_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -1145,10 +1146,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_channel_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_channel_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
static GQuark need_chat_states[2] = {0, 0};
static GQuark need_password[2] = {0, 0};
@@ -1202,7 +1203,10 @@ tp_channel_class_init (TpChannelClass *klass)
proxy_class->interface = TP_IFACE_QUARK_CHANNEL;
proxy_class->must_have_unique_name = TRUE;
- proxy_class->list_features = tp_channel_list_features;
+
+ klass->feature_class.list_features = tp_channel_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpChannelClass, feature_class));
g_object_class_override_property (object_class, PROP_CHANNEL_TYPE,
"channel-type");
diff --git a/telepathy-glib/channel.h b/telepathy-glib/channel.h
index 92295308c..84019558d 100644
--- a/telepathy-glib/channel.h
+++ b/telepathy-glib/channel.h
@@ -37,6 +37,7 @@ typedef struct _TpChannelClass TpChannelClass;
struct _TpChannelClass {
TpProxyClass parent_class;
+ TpFeatureMixinClass feature_class;
/*<private>*/
GCallback _1;
GCallback _2;
diff --git a/telepathy-glib/connection-aliasing.c b/telepathy-glib/connection-aliasing.c
index f5e5f3b8e..80a2c48ab 100644
--- a/telepathy-glib/connection-aliasing.c
+++ b/telepathy-glib/connection-aliasing.c
@@ -95,8 +95,8 @@ finally:
}
void
-_tp_connection_prepare_aliasing_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+_tp_connection_prepare_aliasing_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
diff --git a/telepathy-glib/connection-avatars.c b/telepathy-glib/connection-avatars.c
index a0df51351..887d8eafa 100644
--- a/telepathy-glib/connection-avatars.c
+++ b/telepathy-glib/connection-avatars.c
@@ -90,8 +90,8 @@ finally:
}
void
-_tp_connection_prepare_avatar_requirements_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+_tp_connection_prepare_avatar_requirements_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
diff --git a/telepathy-glib/connection-contact-info.c b/telepathy-glib/connection-contact-info.c
index eb5fb797a..41bd01d9c 100644
--- a/telepathy-glib/connection-contact-info.c
+++ b/telepathy-glib/connection-contact-info.c
@@ -481,8 +481,8 @@ finally:
}
void
-_tp_connection_prepare_contact_info_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+_tp_connection_prepare_contact_info_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
diff --git a/telepathy-glib/connection-contact-list.c b/telepathy-glib/connection-contact-list.c
index c39fb0471..729ea7d41 100644
--- a/telepathy-glib/connection-contact-list.c
+++ b/telepathy-glib/connection-contact-list.c
@@ -409,8 +409,8 @@ OUT:
g_simple_async_result_complete (result);
}
-void _tp_connection_prepare_contact_list_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_connection_prepare_contact_list_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -435,8 +435,8 @@ void _tp_connection_prepare_contact_list_async (TpProxy *proxy,
g_object_unref (result);
}
-void _tp_connection_prepare_contact_list_props_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_connection_prepare_contact_list_props_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -620,8 +620,8 @@ OUT:
}
void
-_tp_connection_prepare_contact_groups_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+_tp_connection_prepare_contact_groups_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -1879,8 +1879,8 @@ blocked_contacts_changed_cb (TpConnection *self,
}
void
-_tp_connection_prepare_contact_blocking_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+_tp_connection_prepare_contact_blocking_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
diff --git a/telepathy-glib/connection-internal.h b/telepathy-glib/connection-internal.h
index 08af62cb3..98225a6a1 100644
--- a/telepathy-glib/connection-internal.h
+++ b/telepathy-glib/connection-internal.h
@@ -148,8 +148,8 @@ void _tp_contact_connection_invalidated (TpContact *contact);
void _tp_connection_set_account (TpConnection *self, TpAccount *account);
/* connection-contact-info.c */
-void _tp_connection_prepare_contact_info_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_connection_prepare_contact_info_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -157,29 +157,29 @@ TpContactInfoFieldSpec *_tp_contact_info_field_spec_new (const gchar *name,
GStrv parameters, TpContactInfoFieldFlags flags, guint max);
/* connection-avatars.c */
-void _tp_connection_prepare_avatar_requirements_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_connection_prepare_avatar_requirements_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
/* connection-contact-list.c */
-void _tp_connection_prepare_contact_list_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_connection_prepare_contact_list_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
-void _tp_connection_prepare_contact_list_props_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_connection_prepare_contact_list_props_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
-void _tp_connection_prepare_contact_groups_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_connection_prepare_contact_groups_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
void _tp_connection_contacts_changed_queue_free (GQueue *queue);
void _tp_connection_blocked_changed_queue_free (GQueue *queue);
-void _tp_connection_prepare_contact_blocking_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_connection_prepare_contact_blocking_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -187,8 +187,8 @@ void _tp_connection_set_contact_blocked (TpConnection *self,
TpContact *contact);
/* connection-aliasing.c */
-void _tp_connection_prepare_aliasing_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+void _tp_connection_prepare_aliasing_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c
index 776545b5f..4a8afc5cf 100644
--- a/telepathy-glib/connection-manager.c
+++ b/telepathy-glib/connection-manager.c
@@ -37,6 +37,7 @@
#define DEBUG_FLAG TP_DEBUG_MANAGER
#include "telepathy-glib/debug-internal.h"
+#include "telepathy-glib/feature-mixin-internal.h"
#include "telepathy-glib/protocol-internal.h"
#include "telepathy-glib/util-internal.h"
@@ -459,12 +460,12 @@ tp_connection_manager_ready_or_failed (TpConnectionManager *self,
if (error == NULL)
{
- _tp_proxy_set_feature_prepared ((TpProxy *) self,
+ _tp_feature_mixin_set_feature_prepared ((TpProxy *) self,
TP_CONNECTION_MANAGER_FEATURE_CORE, TRUE);
}
else
{
- _tp_proxy_set_features_failed ((TpProxy *) self, error);
+ _tp_feature_mixin_set_features_failed ((TpProxy *) self, error);
}
}
@@ -1141,10 +1142,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_connection_manager_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_connection_manager_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_LIKELY (features[0].name != 0))
return features;
@@ -1176,7 +1177,10 @@ tp_connection_manager_class_init (TpConnectionManagerClass *klass)
object_class->finalize = tp_connection_manager_finalize;
proxy_class->interface = TP_IFACE_QUARK_CONNECTION_MANAGER;
- proxy_class->list_features = tp_connection_manager_list_features;
+
+ klass->feature_class.list_features = tp_connection_manager_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpConnectionManagerClass, feature_class));
/**
* TpConnectionManager:info-source:
diff --git a/telepathy-glib/connection-manager.h b/telepathy-glib/connection-manager.h
index 2d7e97afb..74d0d6ea9 100644
--- a/telepathy-glib/connection-manager.h
+++ b/telepathy-glib/connection-manager.h
@@ -99,6 +99,7 @@ struct _TpConnectionManager {
struct _TpConnectionManagerClass {
/*<private>*/
TpProxyClass parent_class;
+ TpFeatureMixinClass feature_class;
gpointer *priv;
};
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index 5e890d2d4..3ec1157c9 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -46,6 +46,7 @@
#include "telepathy-glib/connection-contact-list.h"
#include "telepathy-glib/dbus-internal.h"
#include "telepathy-glib/debug-internal.h"
+#include "telepathy-glib/feature-mixin-internal.h"
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/simple-client-factory-internal.h"
#include "telepathy-glib/util-internal.h"
@@ -456,7 +457,7 @@ tp_connection_get_balance_cb (TpProxy *proxy,
tp_connection_unpack_balance (self, balance);
- _tp_proxy_set_feature_prepared (proxy, TP_CONNECTION_FEATURE_BALANCE,
+ _tp_feature_mixin_set_feature_prepared (proxy, TP_CONNECTION_FEATURE_BALANCE,
TRUE);
g_object_notify ((GObject *) self, "balance-uri");
@@ -477,8 +478,8 @@ tp_connection_balance_changed_cb (TpConnection *self,
}
static void
-tp_connection_prepare_balance_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_connection_prepare_balance_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -597,8 +598,8 @@ _tp_connection_get_capabilities_finish (TpConnection *self,
}
static void
-tp_connection_prepare_capabilities_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_connection_prepare_capabilities_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -623,9 +624,9 @@ signal_connected (TpConnection *self)
self->priv->status = TP_CONNECTION_STATUS_CONNECTED;
self->priv->status_reason = TP_CONNECTION_STATUS_REASON_REQUESTED;
- _tp_proxy_set_feature_prepared ((TpProxy *) self,
+ _tp_feature_mixin_set_feature_prepared (self,
TP_CONNECTION_FEATURE_CONNECTED, TRUE);
- _tp_proxy_set_feature_prepared ((TpProxy *) self,
+ _tp_feature_mixin_set_feature_prepared (self,
TP_CONNECTION_FEATURE_CORE, TRUE);
g_object_notify ((GObject *) self, "status");
@@ -640,7 +641,7 @@ will_announced_connected_cb (GObject *source,
TpConnection *self = (TpConnection *) source;
GError *error = NULL;
- if (!_tp_proxy_will_announce_connected_finish ((TpProxy *) self, result,
+ if (!_tp_feature_mixin_will_announce_connected_finish (self, result,
&error))
{
DEBUG ("_tp_connection_prepare_contact_info_async failed: %s",
@@ -673,14 +674,14 @@ tp_connection_continue_introspection (TpConnection *self)
{
/* Introspection will restart when we become CONNECTED */
DEBUG ("CORE ready, but not CONNECTED");
- _tp_proxy_set_feature_prepared ((TpProxy *) self,
+ _tp_feature_mixin_set_feature_prepared (self,
TP_CONNECTION_FEATURE_CORE, TRUE);
return;
}
/* We'll announce CONNECTED state soon, but first give a chance to
* prepared feature to be updated, if needed */
- _tp_proxy_will_announce_connected_async ((TpProxy *) self,
+ _tp_feature_mixin_will_announce_connected_async (self,
will_announced_connected_cb, NULL);
}
else
@@ -1472,10 +1473,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_connection_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_connection_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
static GQuark need_requests[2] = {0, 0};
static GQuark need_avatars[2] = {0, 0};
static GQuark need_contact_info[2] = {0, 0};
@@ -1570,7 +1571,10 @@ tp_connection_class_init (TpConnectionClass *klass)
/* If you change this, you must also change TpChannel to stop asserting
* that its connection has a unique name */
proxy_class->must_have_unique_name = TRUE;
- proxy_class->list_features = tp_connection_list_features;
+
+ klass->feature_class.list_features = tp_connection_list_features;
+ tp_feature_mixin_class_init (object_class,
+ G_STRUCT_OFFSET (TpConnectionClass, feature_class));
/**
* TpConnection:status:
diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h
index d6a6a527b..430515260 100644
--- a/telepathy-glib/connection.h
+++ b/telepathy-glib/connection.h
@@ -87,6 +87,7 @@ typedef struct _TpConnectionClass TpConnectionClass;
struct _TpConnectionClass {
TpProxyClass parent_class;
+ TpFeatureMixinClass feature_class;
/*<private>*/
GCallback _1;
GCallback _2;
diff --git a/telepathy-glib/dbus-tube-channel.c b/telepathy-glib/dbus-tube-channel.c
index d5491f429..ff105e879 100644
--- a/telepathy-glib/dbus-tube-channel.c
+++ b/telepathy-glib/dbus-tube-channel.c
@@ -345,8 +345,8 @@ get_state_cb (TpProxy *proxy,
}
static void
-tp_dbus_tube_channel_prepare_core_feature_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_dbus_tube_channel_prepare_core_feature_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -375,10 +375,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_dbus_tube_channel_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_dbus_tube_channel_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_LIKELY (features[0].name != 0))
return features;
@@ -400,13 +400,14 @@ tp_dbus_tube_channel_class_init (TpDBusTubeChannelClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *param_spec;
- TpProxyClass *proxy_class = (TpProxyClass *) klass;
gobject_class->constructed = tp_dbus_tube_channel_constructed;
gobject_class->get_property = tp_dbus_tube_channel_get_property;
gobject_class->dispose = tp_dbus_tube_channel_dispose;
- proxy_class->list_features = tp_dbus_tube_channel_list_features;
+ klass->feature_class.list_features = tp_dbus_tube_channel_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpDBusTubeChannelClass, feature_class));
/**
* TpDBusTubeChannel:service-name:
diff --git a/telepathy-glib/dbus-tube-channel.h b/telepathy-glib/dbus-tube-channel.h
index 28b81c1fc..f9a9e0828 100644
--- a/telepathy-glib/dbus-tube-channel.h
+++ b/telepathy-glib/dbus-tube-channel.h
@@ -47,6 +47,7 @@ struct _TpDBusTubeChannelClass
{
/*<private>*/
TpChannelClass parent_class;
+ TpFeatureMixinClass feature_class;
GCallback _padding[7];
};
diff --git a/telepathy-glib/file-transfer-channel.c b/telepathy-glib/file-transfer-channel.c
index b8e0f98f9..1738427a6 100644
--- a/telepathy-glib/file-transfer-channel.c
+++ b/telepathy-glib/file-transfer-channel.c
@@ -461,8 +461,8 @@ invalidated_cb (TpFileTransferChannel *self,
/* Private methods */
static void
-tp_file_transfer_channel_prepare_core_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_file_transfer_channel_prepare_core_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -692,10 +692,10 @@ enum /* features */
N_FEAT
};
-static const TpProxyFeature *
-tp_file_transfer_channel_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_file_transfer_channel_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_LIKELY (features[0].name != 0))
return features;
@@ -752,14 +752,16 @@ static void
tp_file_transfer_channel_class_init (TpFileTransferChannelClass *klass)
{
GParamSpec *param_spec;
- TpProxyClass *proxy_class = (TpProxyClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
object_class->constructed = tp_file_transfer_channel_constructed;
object_class->get_property = tp_file_transfer_channel_get_property;
object_class->dispose = tp_file_transfer_channel_dispose;
- proxy_class->list_features = tp_file_transfer_channel_list_features;
+ klass->feature_class.list_features =
+ tp_file_transfer_channel_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpFileTransferChannelClass, feature_class));
/* Properties */
diff --git a/telepathy-glib/file-transfer-channel.h b/telepathy-glib/file-transfer-channel.h
index e497b29cf..10b6d722f 100644
--- a/telepathy-glib/file-transfer-channel.h
+++ b/telepathy-glib/file-transfer-channel.h
@@ -49,6 +49,7 @@ struct _TpFileTransferChannelClass
{
/*<private>*/
TpChannelClass parent_class;
+ TpFeatureMixinClass feature_class;
GCallback _padding[8];
};
diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c
index ee9f8f851..1b16ef14c 100644
--- a/telepathy-glib/protocol.c
+++ b/telepathy-glib/protocol.c
@@ -44,6 +44,7 @@
#include "telepathy-glib/capabilities-internal.h"
#include "telepathy-glib/cli-misc.h"
#include "telepathy-glib/debug-internal.h"
+#include "telepathy-glib/feature-mixin-internal.h"
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/_gen/tp-cli-protocol-body.h"
@@ -54,6 +55,7 @@ struct _TpProtocolClass
{
/*<private>*/
TpProxyClass parent_class;
+ TpFeatureMixinClass feature_class;
};
/**
@@ -541,9 +543,9 @@ tp_protocol_constructed (GObject *object)
}
/* become ready immediately */
- _tp_proxy_set_feature_prepared (proxy, TP_PROTOCOL_FEATURE_PARAMETERS,
+ _tp_feature_mixin_set_feature_prepared (proxy, TP_PROTOCOL_FEATURE_PARAMETERS,
had_immutables);
- _tp_proxy_set_feature_prepared (proxy, TP_PROTOCOL_FEATURE_CORE,
+ _tp_feature_mixin_set_feature_prepared (proxy, TP_PROTOCOL_FEATURE_CORE,
had_immutables && tp_protocol_check_for_core (self));
}
@@ -553,10 +555,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_protocol_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_protocol_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
if (G_LIKELY (features[0].name != 0))
return features;
@@ -738,10 +740,13 @@ tp_protocol_class_init (TpProtocolClass *klass)
"Avatars requirements",
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
- proxy_class->list_features = tp_protocol_list_features;
proxy_class->must_have_unique_name = FALSE;
proxy_class->interface = TP_IFACE_QUARK_PROTOCOL;
tp_protocol_init_known_interfaces ();
+
+ klass->feature_class.list_features = tp_protocol_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpProtocolClass, feature_class));
}
static void
diff --git a/telepathy-glib/proxy-internal.h b/telepathy-glib/proxy-internal.h
index 04400367c..765e1fed5 100644
--- a/telepathy-glib/proxy-internal.h
+++ b/telepathy-glib/proxy-internal.h
@@ -27,22 +27,6 @@ GError *_tp_proxy_take_and_remap_error (TpProxy *self, GError *error)
typedef void (*TpProxyProc) (TpProxy *);
-gboolean _tp_proxy_is_preparing (gpointer self,
- GQuark feature);
-void _tp_proxy_set_feature_prepared (TpProxy *self,
- GQuark feature,
- gboolean succeeded);
-void _tp_proxy_set_features_failed (TpProxy *self,
- const GError *error);
-
-void _tp_proxy_will_announce_connected_async (TpProxy *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
-
-gboolean _tp_proxy_will_announce_connected_finish (TpProxy *self,
- GAsyncResult *result,
- GError **error);
-
void _tp_proxy_ensure_factory (gpointer self,
TpSimpleClientFactory *factory);
diff --git a/telepathy-glib/text-channel.c b/telepathy-glib/text-channel.c
index 808c56436..bffc8d1ce 100644
--- a/telepathy-glib/text-channel.c
+++ b/telepathy-glib/text-channel.c
@@ -662,8 +662,8 @@ get_pending_messages_cb (TpProxy *proxy,
}
static void
-tp_text_channel_prepare_pending_messages_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_text_channel_prepare_pending_messages_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -757,8 +757,8 @@ sms_channel_changed_cb (TpChannel *proxy,
}
static void
-tp_text_channel_prepare_sms_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+tp_text_channel_prepare_sms_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -789,10 +789,10 @@ enum {
N_FEAT
};
-static const TpProxyFeature *
-tp_text_channel_list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+tp_text_channel_list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
static GQuark need_sms[2] = {0, 0};
if (G_LIKELY (features[0].name != 0))
@@ -820,14 +820,15 @@ static void
tp_text_channel_class_init (TpTextChannelClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- TpProxyClass *proxy_class = (TpProxyClass *) klass;
GParamSpec *param_spec;
gobject_class->constructed = tp_text_channel_constructed;
gobject_class->get_property = tp_text_channel_get_property;
gobject_class->dispose = tp_text_channel_dispose;
- proxy_class->list_features = tp_text_channel_list_features;
+ klass->feature_class.list_features = tp_text_channel_list_features;
+ tp_feature_mixin_class_init ((GObjectClass *) klass,
+ G_STRUCT_OFFSET (TpTextChannelClass, feature_class));
/**
* TpTextChannel:supported-content-types:
diff --git a/telepathy-glib/text-channel.h b/telepathy-glib/text-channel.h
index 4d9fec5d8..7cf6ed67a 100644
--- a/telepathy-glib/text-channel.h
+++ b/telepathy-glib/text-channel.h
@@ -50,6 +50,7 @@ struct _TpTextChannelClass
{
/*<private>*/
TpChannelClass parent_class;
+ TpFeatureMixinClass feature_class;
GCallback _padding[7];
};
diff --git a/tests/lib/my-conn-proxy.c b/tests/lib/my-conn-proxy.c
index 208f00449..9a10bff45 100644
--- a/tests/lib/my-conn-proxy.c
+++ b/tests/lib/my-conn-proxy.c
@@ -37,8 +37,8 @@ enum {
};
static void
-prepare_core_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+prepare_core_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -55,8 +55,8 @@ prepare_core_async (TpProxy *proxy,
}
static void
-prepare_a_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+prepare_a_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -72,8 +72,8 @@ prepare_a_async (TpProxy *proxy,
}
static void
-prepare_b_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+prepare_b_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -90,8 +90,8 @@ prepare_b_async (TpProxy *proxy,
}
static void
-cannot_be_prepared_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+cannot_be_prepared_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -99,8 +99,8 @@ cannot_be_prepared_async (TpProxy *proxy,
}
static void
-prepare_fail_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+prepare_fail_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -117,8 +117,8 @@ prepare_fail_async (TpProxy *proxy,
}
static void
-prepare_retry_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+prepare_retry_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -140,8 +140,8 @@ prepare_retry_async (TpProxy *proxy,
}
static void
-prepare_retry_dep_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+prepare_retry_dep_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -157,8 +157,8 @@ prepare_retry_dep_async (TpProxy *proxy,
}
static void
-prepare_before_connected_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+prepare_before_connected_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -181,8 +181,8 @@ prepare_before_connected_async (TpProxy *proxy,
}
static void
-prepare_before_connected_before_async (TpProxy *proxy,
- const TpProxyFeature *feature,
+prepare_before_connected_before_async (gpointer proxy,
+ const TpFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -203,10 +203,10 @@ prepare_before_connected_before_async (TpProxy *proxy,
g_object_unref (result);
}
-static const TpProxyFeature *
-list_features (TpProxyClass *cls G_GNUC_UNUSED)
+static const TpFeature *
+list_features (TpFeatureMixinClass *cls G_GNUC_UNUSED)
{
- static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
+ static TpFeature features[N_FEAT + 1] = { { 0 } };
static GQuark need_a[2] = {0, 0};
static GQuark need_channel_core[2] = {0, 0};
static GQuark need_wrong_iface[2] = {0, 0};
@@ -268,9 +268,11 @@ list_features (TpProxyClass *cls G_GNUC_UNUSED)
static void
tp_tests_my_conn_proxy_class_init (TpTestsMyConnProxyClass *klass)
{
- TpProxyClass *proxy_class = (TpProxyClass *) klass;
+ GObjectClass *object_class = (GObjectClass *) klass;
- proxy_class->list_features = list_features;
+ klass->feature_class.list_features = list_features;
+ tp_feature_mixin_class_init (object_class,
+ G_STRUCT_OFFSET (TpTestsMyConnProxyClass, feature_class));
}
GQuark
diff --git a/tests/lib/my-conn-proxy.h b/tests/lib/my-conn-proxy.h
index cfc821604..82129afba 100644
--- a/tests/lib/my-conn-proxy.h
+++ b/tests/lib/my-conn-proxy.h
@@ -23,6 +23,7 @@ typedef struct _TpTestsMyConnProxyPrivate TpTestsMyConnProxyPrivate;
struct _TpTestsMyConnProxyClass {
TpConnectionClass parent_class;
+ TpFeatureMixinClass feature_class;
};
typedef enum