[telepathy-mission-control/master] mcd: use telepathy-glib for all standard interfaces, and only generate code for non-standard ones

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Jun 9 09:11:07 PDT 2009


---
 src/Makefile.am                |   36 +++++-------
 src/mcd-account-manager-priv.h |    1 -
 src/mcd-account-manager.c      |   34 ++++++-----
 src/mcd-account-requests.c     |   10 ++-
 src/mcd-account.c              |   45 ++++++++-------
 src/mcd-account.h              |    3 -
 src/mcd-channel.c              |   23 ++++----
 src/mcd-client-priv.h          |   11 +--
 src/mcd-client.c               |    8 +-
 src/mcd-dispatch-operation.c   |   33 ++++++-----
 src/mcd-dispatch-operation.h   |    2 -
 src/mcd-dispatcher.c           |  123 +++++++++++++++++++---------------------
 src/mcd.xml                    |   20 +++++++
 13 files changed, 176 insertions(+), 173 deletions(-)
 create mode 100644 src/mcd.xml

diff --git a/src/Makefile.am b/src/Makefile.am
index dca8c7d..87c3690 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,26 +32,18 @@ mc_headers = \
 	mcd-provisioning-factory.h
 
 mc_gen_headers = \
-	_gen/cli-client.h \
 	_gen/cli-Connection_Interface_Contact_Capabilities.h \
 	_gen/enums.h \
 	_gen/interfaces.h \
 	_gen/gtypes.h \
-	_gen/svc-Account.h \
-	_gen/svc-Account_Interface_Avatar.h \
 	_gen/svc-Account_Interface_ChannelRequests.h \
 	_gen/svc-Account_Interface_Compat.h \
 	_gen/svc-Account_Interface_Conditions.h \
 	_gen/svc-Account_Interface_Stats.h \
-	_gen/svc-Account_Manager.h \
 	_gen/svc-Account_Manager_Interface_Creation.h \
-	_gen/svc-Account_Manager_Interface_Query.h \
-	_gen/svc-dispatcher.h \
-	_gen/svc-dispatch-operation.h \
-	_gen/svc-request.h
+	_gen/svc-Account_Manager_Interface_Query.h
 
 nodist_libmissioncontrol_server_la_SOURCES = \
-	_gen/cli-client-body.h \
 	_gen/cli-Connection_Interface_Contact_Capabilities-body.h \
 	_gen/gtypes-body.h \
 	_gen/interfaces-body.h \
@@ -59,22 +51,16 @@ nodist_libmissioncontrol_server_la_SOURCES = \
 	_gen/signals-marshal.c \
 	_gen/signals-marshal.h \
 	_gen/signals-marshal.list \
-	_gen/svc-Account.c \
-	_gen/svc-Account_Interface_Avatar.c \
 	_gen/svc-Account_Interface_ChannelRequests.c \
 	_gen/svc-Account_Interface_Compat.c \
 	_gen/svc-Account_Interface_Conditions.c \
 	_gen/svc-Account_Interface_Stats.c \
-	_gen/svc-Account_Manager.c \
 	_gen/svc-Account_Manager_Interface_Creation.c \
 	_gen/svc-Account_Manager_Interface_Query.c \
-	_gen/svc-dispatcher.c \
-	_gen/svc-dispatch-operation.c \
-	_gen/svc-request.c \
 	$(mc_gen_headers)
 
 BUILT_SOURCES = \
-	_gen/all.xml \
+	_gen/mcd.xml \
 	mcd-signals-marshal.h \
 	mcd-signals-marshal.c \
 	mcd-enum-types.c \
@@ -210,6 +196,7 @@ mcd-enum-types.c: Makefile $(mc_headers)
 	&& rm -f xgen-getc
 
 EXTRA_DIST = \
+	mcd.xml \
 	client.xml \
 	dispatcher.xml \
 	dispatch-operation.xml \
@@ -221,6 +208,11 @@ EXTRA_DIST = \
 
 tools_dir = $(top_srcdir)/tools
 
+_gen/mcd.xml: mcd.xml $(wildcard $(top_srcdir)/xml/*.xml)
+	$(mkdir_p) _gen
+	$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
+		$< > $@
+
 _gen/%.xml: $(top_srcdir)/xml/%.xml $(wildcard $(top_srcdir)/xml/*.xml)
 	$(mkdir_p) _gen
 	$(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \
@@ -228,12 +220,12 @@ _gen/%.xml: $(top_srcdir)/xml/%.xml $(wildcard $(top_srcdir)/xml/*.xml)
 
 # Generated files which can be done for all "classes" at once
 
-_gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \
+_gen/gtypes.h _gen/gtypes-body.h: _gen/mcd.xml \
 	$(top_srcdir)/tools/glib-gtypes-generator.py
 	$(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \
 		$< _gen/gtypes mc
 
-_gen/signals-marshal.list: _gen/all.xml \
+_gen/signals-marshal.list: _gen/mcd.xml \
 	$(tools_dir)/glib-signals-marshal-gen.py
 	$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@
 
@@ -245,18 +237,18 @@ _gen/signals-marshal.c: _gen/signals-marshal.list
 	$(GLIB_GENMARSHAL) --body --prefix=_mc_ext_marshal $<; } \
 	> $@
 
-_gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \
+_gen/register-dbus-glib-marshallers-body.h: _gen/mcd.xml \
 	$(tools_dir)/glib-client-marshaller-gen.py
 	$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \
 		_mc_ext > $@
 
-_gen/enums.h: _gen/all.xml $(tools_dir)/c-constants-generator.xsl
+_gen/enums.h: _gen/mcd.xml $(tools_dir)/c-constants-generator.xsl
 	$(XSLTPROC) $(XSLTPROCFLAGS) \
 		--stringparam mixed-case-prefix mc \
 		$(tools_dir)/c-constants-generator.xsl \
 		$< > $@
 
-_gen/interfaces.h: _gen/all.xml \
+_gen/interfaces.h: _gen/mcd.xml \
 	$(tools_dir)/glib-interfaces-generator.xsl \
 	$(tools_dir)/c-interfaces-generator.xsl
 	$(XSLTPROC) $(XSLTPROCFLAGS) \
@@ -264,7 +256,7 @@ _gen/interfaces.h: _gen/all.xml \
 		$(tools_dir)/glib-interfaces-generator.xsl \
 		$< > $@
 
-_gen/interfaces-body.h: _gen/all.xml \
+_gen/interfaces-body.h: _gen/mcd.xml \
 	$(tools_dir)/glib-interfaces-body-generator.xsl \
 	$(tools_dir)/c-interfaces-generator.xsl
 	$(XSLTPROC) $(XSLTPROCFLAGS) \
diff --git a/src/mcd-account-manager-priv.h b/src/mcd-account-manager-priv.h
index c678737..e5fc546 100644
--- a/src/mcd-account-manager-priv.h
+++ b/src/mcd-account-manager-priv.h
@@ -29,7 +29,6 @@
 #include "mcd-dbusprop.h"
 
 /* auto-generated stubs */
-#include "_gen/svc-Account_Manager.h"
 #include "_gen/svc-Account_Manager_Interface_Query.h"
 
 G_BEGIN_DECLS
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index 41a59dd..62d9cc4 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -39,6 +39,8 @@
 #include <telepathy-glib/svc-generic.h>
 #include <telepathy-glib/util.h>
 #include <telepathy-glib/errors.h>
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-account-manager.h>
 #include "mcd-account-manager-priv.h"
 #include "mcd-account.h"
 #include "mcd-account-config.h"
@@ -56,7 +58,7 @@
 #define MCD_ACCOUNT_MANAGER_PRIV(account_manager) \
     (MCD_ACCOUNT_MANAGER (account_manager)->priv)
 
-static void account_manager_iface_init (McSvcAccountManagerClass *iface,
+static void account_manager_iface_init (TpSvcAccountManagerClass *iface,
 					gpointer iface_data);
 static void account_manager_creation_iface_init (
     McSvcAccountManagerInterfaceCreationClass *iface, gpointer iface_data);
@@ -67,9 +69,9 @@ static const McdDBusProp account_manager_properties[];
 static const McdDBusProp account_manager_creation_properties[];
 
 static const McdInterfaceData account_manager_interfaces[] = {
-    MCD_IMPLEMENT_IFACE (mc_svc_account_manager_get_type,
+    MCD_IMPLEMENT_IFACE (tp_svc_account_manager_get_type,
 			 account_manager,
-			 MC_IFACE_ACCOUNT_MANAGER),
+			 TP_IFACE_ACCOUNT_MANAGER),
     MCD_IMPLEMENT_IFACE (mc_svc_account_manager_interface_query_get_type,
 			 account_manager_query,
 			 MC_IFACE_ACCOUNT_MANAGER_INTERFACE_QUERY),
@@ -275,7 +277,7 @@ on_account_validity_changed (McdAccount *account, gboolean valid,
     const gchar *object_path;
 
     object_path = mcd_account_get_object_path (account);
-    mc_svc_account_manager_emit_account_validity_changed (account_manager,
+    tp_svc_account_manager_emit_account_validity_changed (account_manager,
 							  object_path,
 							  valid);
 }
@@ -287,7 +289,7 @@ on_account_removed (McdAccount *account, McdAccountManager *account_manager)
     const gchar *name, *object_path;
 
     object_path = mcd_account_get_object_path (account);
-    mc_svc_account_manager_emit_account_removed (account_manager, object_path);
+    tp_svc_account_manager_emit_account_removed (account_manager, object_path);
 
     name = mcd_account_get_unique_name (account);
     g_hash_table_remove (priv->accounts, name);
@@ -583,11 +585,11 @@ create_account_cb (McdAccountManager *account_manager, McdAccount *account,
 
     g_return_if_fail (MCD_IS_ACCOUNT (account));
     object_path = mcd_account_get_object_path (account);
-    mc_svc_account_manager_return_from_create_account (context, object_path);
+    tp_svc_account_manager_return_from_create_account (context, object_path);
 }
 
 static void
-account_manager_create_account (McSvcAccountManager *self,
+account_manager_create_account (TpSvcAccountManager *self,
                                 const gchar *manager,
                                 const gchar *protocol,
                                 const gchar *display_name,
@@ -602,10 +604,10 @@ account_manager_create_account (McSvcAccountManager *self,
 }
 
 static void
-account_manager_iface_init (McSvcAccountManagerClass *iface,
+account_manager_iface_init (TpSvcAccountManagerClass *iface,
 			    gpointer iface_data)
 {
-#define IMPLEMENT(x) mc_svc_account_manager_implement_##x (\
+#define IMPLEMENT(x) tp_svc_account_manager_implement_##x (\
     iface, account_manager_##x)
     IMPLEMENT(create_account);
 #undef IMPLEMENT
@@ -696,17 +698,17 @@ get_supported_account_properties (TpSvcDBusProperties *svc,
                                   GValue *value)
 {
     static const gchar * const supported[] = {
-        MC_IFACE_ACCOUNT ".AutomaticPresence",
-        MC_IFACE_ACCOUNT ".Enabled",
-        MC_IFACE_ACCOUNT ".Icon",
-        MC_IFACE_ACCOUNT ".Nickname",
-        MC_IFACE_ACCOUNT ".ConnectAutomatically",
-        MC_IFACE_ACCOUNT_INTERFACE_AVATAR ".Avatar",
+        TP_IFACE_ACCOUNT ".AutomaticPresence",
+        TP_IFACE_ACCOUNT ".Enabled",
+        TP_IFACE_ACCOUNT ".Icon",
+        TP_IFACE_ACCOUNT ".Nickname",
+        TP_IFACE_ACCOUNT ".ConnectAutomatically",
+        TP_IFACE_ACCOUNT_INTERFACE_AVATAR ".Avatar",
         MC_IFACE_ACCOUNT_INTERFACE_COMPAT ".Profile",
         MC_IFACE_ACCOUNT_INTERFACE_COMPAT ".SecondaryVCardFields",
         MC_IFACE_ACCOUNT_INTERFACE_CONDITIONS ".Condition",
         /* FIXME: setting RequestedPresence at create time doesn't work yet */
-        /* MC_IFACE_ACCOUNT ".RequestedPresence", */
+        /* TP_IFACE_ACCOUNT ".RequestedPresence", */
         NULL
     };
 
diff --git a/src/mcd-account-requests.c b/src/mcd-account-requests.c
index e5dd564..14d18d2 100644
--- a/src/mcd-account-requests.c
+++ b/src/mcd-account-requests.c
@@ -32,9 +32,12 @@
 
 #include <dbus/dbus-glib-lowlevel.h>
 #include <libmcclient/mc-errors.h>
-#include <telepathy-glib/svc-generic.h>
+
 #include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/svc-channel-request.h>
+#include <telepathy-glib/svc-generic.h>
 #include <telepathy-glib/util.h>
+
 #include "mcd-account.h"
 #include "mcd-account-priv.h"
 #include "mcd-account-manager.h"
@@ -42,7 +45,6 @@
 #include "mcd-channel-priv.h"
 #include "mcd-misc.h"
 #include "_gen/interfaces.h"
-#include "_gen/svc-request.h"
 
 static void
 online_request_cb (McdAccount *account, gpointer userdata, const GError *error)
@@ -135,7 +137,7 @@ on_channel_status_changed (McdChannel *channel, McdChannelStatus status,
         err_string = _mcd_build_error_string (error);
         /* FIXME: ideally the McdChannel should emit this signal itself, and
          * the Account.Interface.ChannelRequests should catch and re-emit it */
-        mc_svc_channel_request_emit_failed (channel, err_string,
+        tp_svc_channel_request_emit_failed (channel, err_string,
                                             error->message);
         mc_svc_account_interface_channelrequests_emit_failed (account,
             _mcd_channel_get_request_path (channel),
@@ -148,7 +150,7 @@ on_channel_status_changed (McdChannel *channel, McdChannelStatus status,
     {
         /* FIXME: ideally the McdChannel should emit this signal itself, and
          * the Account.Interface.ChannelRequests should catch and re-emit it */
-        mc_svc_channel_request_emit_succeeded (channel);
+        tp_svc_channel_request_emit_succeeded (channel);
         mc_svc_account_interface_channelrequests_emit_succeeded (account,
             _mcd_channel_get_request_path (channel));
 
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 497e431..997df21 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -35,6 +35,7 @@
 #include <glib/gstdio.h>
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-account.h>
 #include <telepathy-glib/svc-generic.h>
 #include <telepathy-glib/util.h>
 
@@ -60,21 +61,21 @@
 
 #define MCD_ACCOUNT_PRIV(account) (MCD_ACCOUNT (account)->priv)
 
-static void account_iface_init (McSvcAccountClass *iface,
+static void account_iface_init (TpSvcAccountClass *iface,
 			       	gpointer iface_data);
 static void properties_iface_init (TpSvcDBusPropertiesClass *iface,
 				   gpointer iface_data);
-static void account_avatar_iface_init (McSvcAccountInterfaceAvatarClass *iface,
+static void account_avatar_iface_init (TpSvcAccountInterfaceAvatarClass *iface,
 				       gpointer iface_data);
 
 static const McdDBusProp account_properties[];
 static const McdDBusProp account_avatar_properties[];
 
 static const McdInterfaceData account_interfaces[] = {
-    MCD_IMPLEMENT_IFACE (mc_svc_account_get_type, account, MC_IFACE_ACCOUNT),
-    MCD_IMPLEMENT_IFACE (mc_svc_account_interface_avatar_get_type,
+    MCD_IMPLEMENT_IFACE (tp_svc_account_get_type, account, TP_IFACE_ACCOUNT),
+    MCD_IMPLEMENT_IFACE (tp_svc_account_interface_avatar_get_type,
 			 account_avatar,
-			 MC_IFACE_ACCOUNT_INTERFACE_AVATAR),
+			 TP_IFACE_ACCOUNT_INTERFACE_AVATAR),
     MCD_IMPLEMENT_IFACE (mc_svc_account_interface_channelrequests_get_type,
 			 account_channelrequests,
 			 MC_IFACE_ACCOUNT_INTERFACE_CHANNELREQUESTS),
@@ -548,7 +549,7 @@ emit_property_changed (gpointer userdata)
     McdAccountPrivate *priv = account->priv;
 
     DEBUG ("called");
-    mc_svc_account_emit_account_property_changed (account,
+    tp_svc_account_emit_account_property_changed (account,
 						  priv->changed_properties);
 
     g_hash_table_remove_all (priv->changed_properties);
@@ -615,7 +616,7 @@ mcd_account_changed_property (McdAccount *account, const gchar *key,
     DEBUG ("called: %s", key);
     properties = g_hash_table_new (g_str_hash, g_str_equal);
     g_hash_table_insert (properties, (gpointer)key, (gpointer)value);
-    mc_svc_account_emit_account_property_changed (account,
+    tp_svc_account_emit_account_property_changed (account,
 						  properties);
 
     g_hash_table_destroy (properties);
@@ -841,7 +842,7 @@ set_avatar (TpSvcDBusProperties *self, const gchar *name, const GValue *value,
 
     DEBUG ("called for %s", priv->unique_name);
 
-    if (!G_VALUE_HOLDS (value, MC_STRUCT_TYPE_AVATAR))
+    if (!G_VALUE_HOLDS (value, TP_STRUCT_TYPE_AVATAR))
     {
         g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
                      "Unexpected type for Avatar: wanted (ay,s), got %s",
@@ -858,7 +859,7 @@ set_avatar (TpSvcDBusProperties *self, const gchar *name, const GValue *value,
         return FALSE;
     }
 
-    mc_svc_account_interface_avatar_emit_avatar_changed (account);
+    tp_svc_account_interface_avatar_emit_avatar_changed (account);
     return TRUE;
 }
 
@@ -1193,7 +1194,7 @@ static const McdDBusProp account_avatar_properties[] = {
 };
 
 static void
-account_avatar_iface_init (McSvcAccountInterfaceAvatarClass *iface,
+account_avatar_iface_init (TpSvcAccountInterfaceAvatarClass *iface,
 			   gpointer iface_data)
 {
 }
@@ -1245,7 +1246,7 @@ mcd_account_delete (McdAccount *account, GError **error)
 }
 
 static void
-account_remove (McSvcAccount *svc, DBusGMethodInvocation *context)
+account_remove (TpSvcAccount *svc, DBusGMethodInvocation *context)
 {
     McdAccount *self = MCD_ACCOUNT (svc);
     GError *error = NULL;
@@ -1264,10 +1265,10 @@ account_remove (McSvcAccount *svc, DBusGMethodInvocation *context)
     if (!self->priv->removed)
     {
         self->priv->removed = TRUE;
-        mc_svc_account_emit_removed (self);
+        tp_svc_account_emit_removed (self);
     }
 
-    mc_svc_account_return_from_remove (context);
+    tp_svc_account_return_from_remove (context);
 }
 
 /*
@@ -1492,7 +1493,7 @@ _mcd_account_set_parameters (McdAccount *account, GHashTable *params,
 }
 
 static void
-account_update_parameters (McSvcAccount *self, GHashTable *set,
+account_update_parameters (TpSvcAccount *self, GHashTable *set,
 			   const gchar **unset, DBusGMethodInvocation *context)
 {
     McdAccount *account = MCD_ACCOUNT (self);
@@ -1529,13 +1530,13 @@ account_update_parameters (McSvcAccount *self, GHashTable *set,
 
     g_ptr_array_add (not_yet, NULL);
 
-    mc_svc_account_return_from_update_parameters (context,
+    tp_svc_account_return_from_update_parameters (context,
         (const gchar **) not_yet->pdata);
     g_ptr_array_free (not_yet, TRUE);
 }
 
 static void
-account_reconnect (McSvcAccount *service,
+account_reconnect (TpSvcAccount *service,
                    DBusGMethodInvocation *context)
 {
     McdAccount *self = MCD_ACCOUNT (service);
@@ -1553,7 +1554,7 @@ account_reconnect (McSvcAccount *service,
                self->priv->enabled ? 'T' : 'F',
                self->priv->valid ? 'T' : 'F',
                self->priv->req_presence_type);
-        mc_svc_account_return_from_reconnect (context);
+        tp_svc_account_return_from_reconnect (context);
         return;
     }
 
@@ -1567,13 +1568,13 @@ account_reconnect (McSvcAccount *service,
     /* FIXME: we shouldn't really return from this method until the
      * reconnection has actually happened, but that would require less tangled
      * integration between Account and Connection */
-    mc_svc_account_return_from_reconnect (context);
+    tp_svc_account_return_from_reconnect (context);
 }
 
 static void
-account_iface_init (McSvcAccountClass *iface, gpointer iface_data)
+account_iface_init (TpSvcAccountClass *iface, gpointer iface_data)
 {
-#define IMPLEMENT(x) mc_svc_account_implement_##x (\
+#define IMPLEMENT(x) tp_svc_account_implement_##x (\
     iface, account_##x)
     IMPLEMENT(remove);
     IMPLEMENT(update_parameters);
@@ -1763,7 +1764,7 @@ _mcd_account_dispose (GObject *object)
     if (!self->priv->removed)
     {
         self->priv->removed = TRUE;
-        mc_svc_account_emit_removed (self);
+        tp_svc_account_emit_removed (self);
     }
 
     if (priv->online_requests)
@@ -2282,7 +2283,7 @@ _mcd_account_set_avatar (McdAccount *account, const GArray *avatar,
         g_key_file_set_string (priv->keyfile, priv->unique_name,
                                MC_ACCOUNTS_KEY_AVATAR_TOKEN, token);
         if (!prev_token || strcmp (prev_token, token) != 0)
-            mc_svc_account_interface_avatar_emit_avatar_changed (account);
+            tp_svc_account_interface_avatar_emit_avatar_changed (account);
         g_free (prev_token);
     }
     else
diff --git a/src/mcd-account.h b/src/mcd-account.h
index ec518dd..de8008a 100644
--- a/src/mcd-account.h
+++ b/src/mcd-account.h
@@ -26,9 +26,6 @@
 
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/enums.h>
-/* auto-generated stubs */
-#include "_gen/svc-Account.h"
-#include "_gen/svc-Account_Interface_Avatar.h"
 
 G_BEGIN_DECLS
 #define MCD_TYPE_ACCOUNT         (mcd_account_get_type ())
diff --git a/src/mcd-channel.c b/src/mcd-channel.c
index 819c9ee..9de2a7f 100644
--- a/src/mcd-channel.c
+++ b/src/mcd-channel.c
@@ -38,25 +38,24 @@
 #include "mcd-channel.h"
 
 #include <glib/gi18n.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/gtypes.h>
+
 #include <telepathy-glib/dbus.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-channel-request.h>
 #include <telepathy-glib/svc-generic.h>
 #include <telepathy-glib/util.h>
 
 #include "mcd-account-priv.h"
 #include "mcd-channel-priv.h"
 #include "mcd-enum-types.h"
-#include "_gen/gtypes.h"
-#include "_gen/interfaces.h"
-#include "_gen/svc-request.h"
 
 #define MCD_CHANNEL_PRIV(channel) (MCD_CHANNEL (channel)->priv)
 
 static void request_iface_init (gpointer, gpointer);
 
 G_DEFINE_TYPE_WITH_CODE (McdChannel, mcd_channel, MCD_TYPE_MISSION,
-    G_IMPLEMENT_INTERFACE (MC_TYPE_SVC_CHANNEL_REQUEST, request_iface_init);
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_REQUEST, request_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
                            tp_dbus_properties_mixin_iface_init))
 
@@ -578,7 +577,7 @@ mcd_channel_class_init (McdChannelClass * klass)
         { NULL }
     };
     static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-        { MC_IFACE_CHANNEL_REQUEST,
+        { TP_IFACE_CHANNEL_REQUEST,
           tp_dbus_properties_mixin_getter_gobject_properties,
           NULL,
           request_props,
@@ -1444,7 +1443,7 @@ mcd_channel_get_tp_channel (McdChannel *channel)
 }
 
 static void
-channel_request_proceed (McSvcChannelRequest *iface,
+channel_request_proceed (TpSvcChannelRequest *iface,
                          DBusGMethodInvocation *context)
 {
     McdChannel *self = MCD_CHANNEL (iface);
@@ -1484,7 +1483,7 @@ channel_request_proceed (McSvcChannelRequest *iface,
     self->priv->request_data->proceeding = TRUE;
     _mcd_account_proceed_with_request (self->priv->request_data->account,
                                        self);
-    mc_svc_channel_request_return_from_proceed (context);
+    tp_svc_channel_request_return_from_proceed (context);
 }
 
 gboolean
@@ -1525,7 +1524,7 @@ _mcd_channel_request_cancel (McdChannel *self,
 }
 
 static void
-channel_request_cancel (McSvcChannelRequest *iface,
+channel_request_cancel (TpSvcChannelRequest *iface,
                         DBusGMethodInvocation *context)
 {
     McdChannel *self = MCD_CHANNEL (iface);
@@ -1533,7 +1532,7 @@ channel_request_cancel (McSvcChannelRequest *iface,
 
     if (_mcd_channel_request_cancel (self, &error))
     {
-        mc_svc_channel_request_return_from_cancel (context);
+        tp_svc_channel_request_return_from_cancel (context);
     }
     else
     {
@@ -1546,7 +1545,7 @@ static void
 request_iface_init (gpointer g_iface,
                     gpointer iface_data G_GNUC_UNUSED)
 {
-#define IMPLEMENT(x) mc_svc_channel_request_implement_##x (\
+#define IMPLEMENT(x) tp_svc_channel_request_implement_##x (\
     g_iface, channel_request_##x)
     IMPLEMENT (proceed);
     IMPLEMENT (cancel);
diff --git a/src/mcd-client-priv.h b/src/mcd-client-priv.h
index f11afd7..b750d8b 100644
--- a/src/mcd-client-priv.h
+++ b/src/mcd-client-priv.h
@@ -29,7 +29,7 @@
 #include <glib.h>
 #include <glib-object.h>
 
-#include <telepathy-glib/proxy.h>
+#include <telepathy-glib/client.h>
 
 G_BEGIN_DECLS
 
@@ -39,13 +39,13 @@ typedef struct _McdClientProxyPrivate McdClientProxyPrivate;
 
 struct _McdClientProxy
 {
-  TpProxy parent;
+  TpClient parent;
   McdClientProxyPrivate *priv;
 };
 
 struct _McdClientProxyClass
 {
-  TpProxyClass parent_class;
+  TpClientClass parent_class;
 };
 
 G_GNUC_INTERNAL GType _mcd_client_proxy_get_type (void);
@@ -81,10 +81,7 @@ G_GNUC_INTERNAL void _mcd_client_proxy_set_inactive (McdClientProxy *self);
 G_GNUC_INTERNAL void _mcd_client_proxy_set_active (McdClientProxy *self,
                                                    const gchar *unique_name);
 
-/* Analogous to TP_CM_*_BASE */
-#define MC_CLIENT_BUS_NAME_BASE MC_IFACE_CLIENT "."
-#define MC_CLIENT_OBJECT_PATH_BASE "/org/freedesktop/Telepathy/Client/"
-#define MC_CLIENT_BUS_NAME_BASE_LEN (sizeof (MC_CLIENT_BUS_NAME_BASE) - 1)
+#define MC_CLIENT_BUS_NAME_BASE_LEN (sizeof (TP_CLIENT_BUS_NAME_BASE) - 1)
 
 G_END_DECLS
 
diff --git a/src/mcd-client.c b/src/mcd-client.c
index 3cd2f4c..0bd5886 100644
--- a/src/mcd-client.c
+++ b/src/mcd-client.c
@@ -27,13 +27,13 @@
 #include "mcd-client-priv.h"
 
 #include <telepathy-glib/dbus.h>
+#include <telepathy-glib/defs.h>
 #include <telepathy-glib/errors.h>
 #include <telepathy-glib/proxy-subclass.h>
 
 #include "mcd-debug.h"
-#include "_gen/interfaces.h"
 
-G_DEFINE_TYPE (McdClientProxy, _mcd_client_proxy, TP_TYPE_PROXY);
+G_DEFINE_TYPE (McdClientProxy, _mcd_client_proxy, TP_TYPE_CLIENT);
 
 enum
 {
@@ -273,8 +273,8 @@ _mcd_client_proxy_new (TpDBusDaemon *dbus_daemon,
     g_return_val_if_fail (_mcd_client_check_valid_name (name_suffix, NULL),
                           NULL);
 
-    bus_name = g_strconcat (MC_CLIENT_BUS_NAME_BASE, name_suffix, NULL);
-    object_path = g_strconcat (MC_CLIENT_OBJECT_PATH_BASE, name_suffix, NULL);
+    bus_name = g_strconcat (TP_CLIENT_BUS_NAME_BASE, name_suffix, NULL);
+    object_path = g_strconcat (TP_CLIENT_OBJECT_PATH_BASE, name_suffix, NULL);
     g_strdelimit (object_path, ".", '/');
 
     g_assert (tp_dbus_check_valid_bus_name (bus_name,
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index e4a6738..77ae6f1 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -36,15 +36,16 @@
 
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
+
 #include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-channel-dispatch-operation.h>
 #include <telepathy-glib/svc-generic.h>
 #include <telepathy-glib/util.h>
 
 #include "mcd-channel-priv.h"
 #include "mcd-dbusprop.h"
 #include "mcd-misc.h"
-#include "_gen/interfaces.h"
-#include "_gen/gtypes.h"
 
 #define MCD_CLIENT_BASE_NAME "org.freedesktop.Telepathy.Client."
 #define MCD_CLIENT_BASE_NAME_LEN (sizeof (MCD_CLIENT_BASE_NAME) - 1)
@@ -52,7 +53,7 @@
 #define MCD_DISPATCH_OPERATION_PRIV(operation) (MCD_DISPATCH_OPERATION (operation)->priv)
 
 static void
-dispatch_operation_iface_init (McSvcChannelDispatchOperationClass *iface,
+dispatch_operation_iface_init (TpSvcChannelDispatchOperationClass *iface,
                                gpointer iface_data);
 static void properties_iface_init (TpSvcDBusPropertiesClass *iface,
                                    gpointer iface_data);
@@ -60,9 +61,9 @@ static void properties_iface_init (TpSvcDBusPropertiesClass *iface,
 static const McdDBusProp dispatch_operation_properties[];
 
 static const McdInterfaceData dispatch_operation_interfaces[] = {
-    MCD_IMPLEMENT_IFACE (mc_svc_channel_dispatch_operation_get_type,
+    MCD_IMPLEMENT_IFACE (tp_svc_channel_dispatch_operation_get_type,
                          dispatch_operation,
-                         MC_IFACE_CHANNEL_DISPATCH_OPERATION),
+                         TP_IFACE_CHANNEL_DISPATCH_OPERATION),
     { G_TYPE_INVALID, }
 };
 
@@ -222,7 +223,7 @@ mcd_dispatch_operation_finish (McdDispatchOperation *operation)
     if (priv->block_finished == 0)
     {
         DEBUG ("%s/%p has finished", priv->unique_name, operation);
-        mc_svc_channel_dispatch_operation_emit_finished (operation);
+        tp_svc_channel_dispatch_operation_emit_finished (operation);
     }
     else
     {
@@ -232,7 +233,7 @@ mcd_dispatch_operation_finish (McdDispatchOperation *operation)
 }
 
 static void
-dispatch_operation_handle_with (McSvcChannelDispatchOperation *self,
+dispatch_operation_handle_with (TpSvcChannelDispatchOperation *self,
                                 const gchar *handler_name,
                                 DBusGMethodInvocation *context)
 {
@@ -246,11 +247,11 @@ dispatch_operation_handle_with (McSvcChannelDispatchOperation *self,
         g_error_free (error);
     }
     else
-        mc_svc_channel_dispatch_operation_return_from_handle_with (context);
+        tp_svc_channel_dispatch_operation_return_from_handle_with (context);
 }
 
 static void
-dispatch_operation_claim (McSvcChannelDispatchOperation *self,
+dispatch_operation_claim (TpSvcChannelDispatchOperation *self,
                           DBusGMethodInvocation *context)
 {
     McdDispatchOperationPrivate *priv;
@@ -266,16 +267,16 @@ dispatch_operation_claim (McSvcChannelDispatchOperation *self,
     }
 
     priv->claimer = dbus_g_method_get_sender (context);
-    mc_svc_channel_dispatch_operation_return_from_claim (context);
+    tp_svc_channel_dispatch_operation_return_from_claim (context);
 
     mcd_dispatch_operation_finish (MCD_DISPATCH_OPERATION (self));
 }
 
 static void
-dispatch_operation_iface_init (McSvcChannelDispatchOperationClass *iface,
+dispatch_operation_iface_init (TpSvcChannelDispatchOperationClass *iface,
                                gpointer iface_data)
 {
-#define IMPLEMENT(x) mc_svc_channel_dispatch_operation_implement_##x (\
+#define IMPLEMENT(x) tp_svc_channel_dispatch_operation_implement_##x (\
     iface, dispatch_operation_##x)
     IMPLEMENT(handle_with);
     IMPLEMENT(claim);
@@ -580,7 +581,7 @@ mcd_dispatch_operation_get_properties (McdDispatchOperation *operation)
             value = g_slice_new0 (GValue);
             property->getprop ((TpSvcDBusProperties *)operation,
                                property->name, value);
-            name = g_strconcat (MC_IFACE_CHANNEL_DISPATCH_OPERATION, ".",
+            name = g_strconcat (TP_IFACE_CHANNEL_DISPATCH_OPERATION, ".",
                                 property->name, NULL);
             g_hash_table_insert (priv->properties, name, value);
         }
@@ -721,7 +722,7 @@ _mcd_dispatch_operation_lose_channel (McdDispatchOperation *self,
         DEBUG ("%s/%p losing channel %s: %s: %s",
                self->priv->unique_name, self, object_path, error_name,
                error->message);
-        mc_svc_channel_dispatch_operation_emit_channel_lost (self, object_path,
+        tp_svc_channel_dispatch_operation_emit_channel_lost (self, object_path,
                                                              error_name,
                                                              error->message);
         g_free (error_name);
@@ -786,7 +787,7 @@ _mcd_dispatch_operation_unblock_finished (McdDispatchOperation *self)
                 DEBUG ("%s/%p losing channel %s: %s: %s",
                        self->priv->unique_name, self, object_path, error_name,
                        error->message);
-                mc_svc_channel_dispatch_operation_emit_channel_lost (self,
+                tp_svc_channel_dispatch_operation_emit_channel_lost (self,
                     object_path, error_name, error->message);
                 g_free (error_name);
             }
@@ -798,7 +799,7 @@ _mcd_dispatch_operation_unblock_finished (McdDispatchOperation *self)
         if (self->priv->finished)
         {
             DEBUG ("%s/%p finished", self->priv->unique_name, self);
-            mc_svc_channel_dispatch_operation_emit_finished (self);
+            tp_svc_channel_dispatch_operation_emit_finished (self);
         }
     }
 }
diff --git a/src/mcd-dispatch-operation.h b/src/mcd-dispatch-operation.h
index 93515fd..918afa5 100644
--- a/src/mcd-dispatch-operation.h
+++ b/src/mcd-dispatch-operation.h
@@ -26,8 +26,6 @@
 
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/enums.h>
-/* auto-generated stubs */
-#include "_gen/svc-dispatch-operation.h"
 
 G_BEGIN_DECLS
 #define MCD_TYPE_DISPATCH_OPERATION         (mcd_dispatch_operation_get_type ())
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index bdc0fb5..95ed126 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -57,16 +57,14 @@
 #include "mcd-dispatch-operation-priv.h"
 #include "mcd-handler-map-priv.h"
 #include "mcd-misc.h"
-#include <telepathy-glib/interfaces.h>
+
+#include <telepathy-glib/defs.h>
 #include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/proxy-subclass.h>
+#include <telepathy-glib/svc-channel-dispatcher.h>
 #include <telepathy-glib/svc-generic.h>
 #include <telepathy-glib/util.h>
-#include "_gen/interfaces.h"
-#include "_gen/gtypes.h"
-#include "_gen/cli-client.h"
-#include "_gen/cli-client-body.h"
-#include "_gen/svc-dispatcher.h"
 
 #include <libmcclient/mc-errors.h>
 
@@ -79,10 +77,10 @@
 static void dispatcher_iface_init (gpointer, gpointer);
 
 G_DEFINE_TYPE_WITH_CODE (McdDispatcher, mcd_dispatcher, MCD_TYPE_MISSION,
-    G_IMPLEMENT_INTERFACE (MC_TYPE_SVC_CHANNEL_DISPATCHER,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_DISPATCHER,
                            dispatcher_iface_init);
     G_IMPLEMENT_INTERFACE (
-        MC_TYPE_SVC_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST,
+        TP_TYPE_SVC_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST,
         NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
                            tp_dbus_properties_mixin_iface_init))
@@ -147,7 +145,7 @@ typedef enum
 
 typedef struct _McdClient
 {
-    McdClientProxy *proxy;
+    TpClient *proxy;
     gchar *name;
     McdClientInterface interfaces;
     guint bypass_approver : 1;
@@ -241,7 +239,7 @@ typedef struct
 
 typedef struct
 {
-    McdClientProxy *handler;
+    TpClient *handler;
     gchar *request_path;
 } McdRemoveRequestData;
 
@@ -623,7 +621,7 @@ mcd_dispatcher_set_channel_handled_by (McdDispatcher *self,
 }
 
 static void
-handle_channels_cb (TpProxy *proxy, const GError *error, gpointer user_data,
+handle_channels_cb (TpClient *proxy, const GError *error, gpointer user_data,
                     GObject *weak_object)
 {
     McdHandlerCallData *call_data = user_data;
@@ -826,7 +824,7 @@ mcd_dispatcher_get_possible_handlers (McdDispatcher *self,
     {
         PossibleHandler *ph = iter->data;
 
-        ret[i] = g_strconcat (MC_CLIENT_BUS_NAME_BASE,
+        ret[i] = g_strconcat (TP_CLIENT_BUS_NAME_BASE,
                               ph->client->name, NULL);
         g_slice_free (PossibleHandler, ph);
     }
@@ -908,7 +906,7 @@ mcd_dispatcher_handle_channels (McdDispatcherContext *context,
     handler_data->channels = channels;
     DEBUG ("calling HandleChannels on %s for context %p", handler->name,
            context);
-    mc_cli_client_handler_call_handle_channels (handler->proxy, -1,
+    tp_cli_client_handler_call_handle_channels (handler->proxy, -1,
         account_path, connection_path,
         channels_array, satisfied_requests, user_action_time,
         handler_info, handle_channels_cb,
@@ -942,7 +940,7 @@ mcd_dispatcher_run_handlers (McdDispatcherContext *context)
 
         if (approved_handler != NULL && approved_handler[0] != '\0')
         {
-            gchar *bus_name = g_strconcat (MC_CLIENT_BUS_NAME_BASE,
+            gchar *bus_name = g_strconcat (TP_CLIENT_BUS_NAME_BASE,
                                            approved_handler, NULL);
             McdClient *handler = g_hash_table_lookup (self->priv->clients,
                                                       bus_name);
@@ -1023,7 +1021,7 @@ mcd_dispatcher_context_release_client_lock (McdDispatcherContext *context)
 }
 
 static void
-observe_channels_cb (TpProxy *proxy, const GError *error,
+observe_channels_cb (TpClient *proxy, const GError *error,
                      gpointer user_data, GObject *weak_object)
 {
     McdDispatcherContext *context = user_data;
@@ -1138,7 +1136,7 @@ mcd_dispatcher_run_observers (McdDispatcherContext *context)
         mcd_dispatcher_context_ref (context, "CTXREF05");
         DEBUG ("calling ObserveChannels on %s for context %p",
                client->name, context);
-        mc_cli_client_observer_call_observe_channels (client->proxy, -1,
+        tp_cli_client_observer_call_observe_channels (client->proxy, -1,
             account_path, connection_path, channels_array,
             dispatch_operation_path, satisfied_requests, observer_info,
             observe_channels_cb,
@@ -1177,7 +1175,7 @@ mcd_dispatcher_context_approver_not_invoked (McdDispatcherContext *context)
 }
 
 static void
-add_dispatch_operation_cb (TpProxy *proxy, const GError *error,
+add_dispatch_operation_cb (TpClient *proxy, const GError *error,
                            gpointer user_data, GObject *weak_object)
 {
     McdDispatcherContext *context = user_data;
@@ -1272,7 +1270,7 @@ mcd_dispatcher_run_approvers (McdDispatcherContext *context)
         _mcd_dispatch_operation_block_finished (context->operation);
 
         mcd_dispatcher_context_ref (context, "CTXREF06");
-        mc_cli_client_approver_call_add_dispatch_operation (client->proxy, -1,
+        tp_cli_client_approver_call_add_dispatch_operation (client->proxy, -1,
             channel_details, dispatch_operation, properties,
             add_dispatch_operation_cb,
             context,
@@ -1440,7 +1438,7 @@ on_operation_finished (McdDispatchOperation *operation,
 
     if (context->dispatcher->priv->operation_list_active)
     {
-        mc_svc_channel_dispatcher_interface_operation_list_emit_dispatch_operation_finished (
+        tp_svc_channel_dispatcher_interface_operation_list_emit_dispatch_operation_finished (
             context->dispatcher, mcd_dispatch_operation_get_path (operation));
     }
 
@@ -1536,7 +1534,7 @@ _mcd_dispatcher_enter_state_machine (McdDispatcher *dispatcher,
 
         if (priv->operation_list_active)
         {
-            mc_svc_channel_dispatcher_interface_operation_list_emit_new_dispatch_operation (
+            tp_svc_channel_dispatcher_interface_operation_list_emit_new_dispatch_operation (
                 dispatcher,
                 mcd_dispatch_operation_get_path (context->operation),
                 mcd_dispatch_operation_get_properties (context->operation));
@@ -1608,7 +1606,7 @@ _mcd_dispatcher_set_property (GObject * obj, guint prop_id,
 }
 
 static const char * const interfaces[] = {
-    MC_IFACE_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST,
+    TP_IFACE_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST,
     NULL
 };
 
@@ -2111,18 +2109,18 @@ client_add_interface_by_id (McdClient *client)
 {
     TpProxy *proxy = (TpProxy *) client->proxy;
 
-    tp_proxy_add_interface_by_id (proxy, MC_IFACE_QUARK_CLIENT);
+    tp_proxy_add_interface_by_id (proxy, TP_IFACE_QUARK_CLIENT);
     if (client->interfaces & MCD_CLIENT_APPROVER)
         tp_proxy_add_interface_by_id (proxy,
-                                      MC_IFACE_QUARK_CLIENT_APPROVER);
+                                      TP_IFACE_QUARK_CLIENT_APPROVER);
     if (client->interfaces & MCD_CLIENT_HANDLER)
         tp_proxy_add_interface_by_id (proxy,
-                                      MC_IFACE_QUARK_CLIENT_HANDLER);
+                                      TP_IFACE_QUARK_CLIENT_HANDLER);
     if (client->interfaces & MCD_CLIENT_INTERFACE_REQUESTS)
-        tp_proxy_add_interface_by_id (proxy, MC_IFACE_QUARK_CLIENT_INTERFACE_REQUESTS);
+        tp_proxy_add_interface_by_id (proxy, TP_IFACE_QUARK_CLIENT_INTERFACE_REQUESTS);
     if (client->interfaces & MCD_CLIENT_OBSERVER)
         tp_proxy_add_interface_by_id (proxy,
-                                      MC_IFACE_QUARK_CLIENT_OBSERVER);
+                                      TP_IFACE_QUARK_CLIENT_OBSERVER);
 }
 
 static void
@@ -2166,13 +2164,13 @@ get_interfaces_cb (TpProxy *proxy,
 
     while (arr != NULL && *arr != NULL)
     {
-        if (strcmp (*arr, MC_IFACE_CLIENT_APPROVER) == 0)
+        if (strcmp (*arr, TP_IFACE_CLIENT_APPROVER) == 0)
             client->interfaces |= MCD_CLIENT_APPROVER;
-        if (strcmp (*arr, MC_IFACE_CLIENT_HANDLER) == 0)
+        if (strcmp (*arr, TP_IFACE_CLIENT_HANDLER) == 0)
             client->interfaces |= MCD_CLIENT_HANDLER;
-        if (strcmp (*arr, MC_IFACE_CLIENT_INTERFACE_REQUESTS) == 0)
+        if (strcmp (*arr, TP_IFACE_CLIENT_INTERFACE_REQUESTS) == 0)
             client->interfaces |= MCD_CLIENT_INTERFACE_REQUESTS;
-        if (strcmp (*arr, MC_IFACE_CLIENT_OBSERVER) == 0)
+        if (strcmp (*arr, TP_IFACE_CLIENT_OBSERVER) == 0)
             client->interfaces |= MCD_CLIENT_OBSERVER;
         arr++;
     }
@@ -2188,7 +2186,7 @@ get_interfaces_cb (TpProxy *proxy,
         DEBUG ("%s is an Approver", client->name);
 
         tp_cli_dbus_properties_call_get
-            (client->proxy, -1, MC_IFACE_CLIENT_APPROVER,
+            (client->proxy, -1, TP_IFACE_CLIENT_APPROVER,
              "ApproverChannelFilter", get_channel_filter_cb,
              GUINT_TO_POINTER (MCD_CLIENT_APPROVER), NULL, G_OBJECT (self));
     }
@@ -2200,7 +2198,7 @@ get_interfaces_cb (TpProxy *proxy,
         DEBUG ("%s is a Handler", client->name);
 
         tp_cli_dbus_properties_call_get_all
-            (client->proxy, -1, MC_IFACE_CLIENT_HANDLER,
+            (client->proxy, -1, TP_IFACE_CLIENT_HANDLER,
              handler_get_all_cb, NULL, NULL, G_OBJECT (self));
     }
     if (client->interfaces & MCD_CLIENT_OBSERVER)
@@ -2211,7 +2209,7 @@ get_interfaces_cb (TpProxy *proxy,
         DEBUG ("%s is an Observer", client->name);
 
         tp_cli_dbus_properties_call_get
-            (client->proxy, -1, MC_IFACE_CLIENT_OBSERVER,
+            (client->proxy, -1, TP_IFACE_CLIENT_OBSERVER,
              "ObserverChannelFilter", get_channel_filter_cb,
              GUINT_TO_POINTER (MCD_CLIENT_OBSERVER), NULL, G_OBJECT (self));
     }
@@ -2227,20 +2225,20 @@ parse_client_file (McdClient *client, GKeyFile *file)
     guint i;
     gsize len = 0;
 
-    iface_names = g_key_file_get_string_list (file, MC_IFACE_CLIENT,
+    iface_names = g_key_file_get_string_list (file, TP_IFACE_CLIENT,
                                               "Interfaces", 0, NULL);
     if (!iface_names)
         return;
 
     for (i = 0; iface_names[i] != NULL; i++)
     {
-        if (strcmp (iface_names[i], MC_IFACE_CLIENT_APPROVER) == 0)
+        if (strcmp (iface_names[i], TP_IFACE_CLIENT_APPROVER) == 0)
             client->interfaces |= MCD_CLIENT_APPROVER;
-        else if (strcmp (iface_names[i], MC_IFACE_CLIENT_HANDLER) == 0)
+        else if (strcmp (iface_names[i], TP_IFACE_CLIENT_HANDLER) == 0)
             client->interfaces |= MCD_CLIENT_HANDLER;
-        else if (strcmp (iface_names[i], MC_IFACE_CLIENT_INTERFACE_REQUESTS) == 0)
+        else if (strcmp (iface_names[i], TP_IFACE_CLIENT_INTERFACE_REQUESTS) == 0)
             client->interfaces |= MCD_CLIENT_INTERFACE_REQUESTS;
-        else if (strcmp (iface_names[i], MC_IFACE_CLIENT_OBSERVER) == 0)
+        else if (strcmp (iface_names[i], TP_IFACE_CLIENT_OBSERVER) == 0)
             client->interfaces |= MCD_CLIENT_OBSERVER;
     }
     g_strfreev (iface_names);
@@ -2250,7 +2248,7 @@ parse_client_file (McdClient *client, GKeyFile *file)
     for (i = 0; i < len; i++)
     {
         if (client->interfaces & MCD_CLIENT_APPROVER &&
-            g_str_has_prefix (groups[i], MC_IFACE_CLIENT_APPROVER
+            g_str_has_prefix (groups[i], TP_IFACE_CLIENT_APPROVER
                               ".ApproverChannelFilter "))
         {
             client->approver_filters =
@@ -2258,7 +2256,7 @@ parse_client_file (McdClient *client, GKeyFile *file)
                                 parse_client_filter (file, groups[i]));
         }
         else if (client->interfaces & MCD_CLIENT_HANDLER &&
-            g_str_has_prefix (groups[i], MC_IFACE_CLIENT_HANDLER
+            g_str_has_prefix (groups[i], TP_IFACE_CLIENT_HANDLER
                               ".HandlerChannelFilter "))
         {
             client->handler_filters =
@@ -2266,7 +2264,7 @@ parse_client_file (McdClient *client, GKeyFile *file)
                                 parse_client_filter (file, groups[i]));
         }
         else if (client->interfaces & MCD_CLIENT_OBSERVER &&
-            g_str_has_prefix (groups[i], MC_IFACE_CLIENT_OBSERVER
+            g_str_has_prefix (groups[i], TP_IFACE_CLIENT_OBSERVER
                               ".ObserverChannelFilter "))
         {
             client->observer_filters =
@@ -2278,7 +2276,7 @@ parse_client_file (McdClient *client, GKeyFile *file)
 
     /* Other client options */
     client->bypass_approver =
-        g_key_file_get_boolean (file, MC_IFACE_CLIENT_HANDLER,
+        g_key_file_get_boolean (file, TP_IFACE_CLIENT_HANDLER,
                                 "BypassApproval", NULL);
 }
 
@@ -2341,7 +2339,7 @@ create_mcd_client (McdDispatcher *self,
     /* McdDispatcherPrivate *priv = MCD_DISPATCHER_PRIV (self); */
     McdClient *client;
 
-    g_assert (g_str_has_prefix (name, MC_CLIENT_BUS_NAME_BASE));
+    g_assert (g_str_has_prefix (name, TP_CLIENT_BUS_NAME_BASE));
 
     client = g_slice_new0 (McdClient);
     client->name = g_strdup (name + MC_CLIENT_BUS_NAME_BASE_LEN);
@@ -2349,8 +2347,8 @@ create_mcd_client (McdDispatcher *self,
     if (!activatable)
         client->active = TRUE;
 
-    client->proxy = _mcd_client_proxy_new (self->priv->dbus_daemon,
-                                           client->name, owner);
+    client->proxy = (TpClient *) _mcd_client_proxy_new (
+        self->priv->dbus_daemon, client->name, owner);
 
     DEBUG ("McdClient created for %s", name);
 
@@ -2410,7 +2408,7 @@ mcd_client_start_introspection (McdClientProxy *proxy,
             dispatcher->priv->startup_lock++;
 
         tp_cli_dbus_properties_call_get (client->proxy, -1,
-            MC_IFACE_CLIENT, "Interfaces", get_interfaces_cb, NULL,
+            TP_IFACE_CLIENT, "Interfaces", get_interfaces_cb, NULL,
             NULL, G_OBJECT (dispatcher));
     }
     else
@@ -2428,7 +2426,7 @@ mcd_client_start_introspection (McdClientProxy *proxy,
                 dispatcher->priv->startup_lock++;
 
             tp_cli_dbus_properties_call_get_all (client->proxy, -1,
-                                                 MC_IFACE_CLIENT_HANDLER,
+                                                 TP_IFACE_CLIENT_HANDLER,
                                                  handler_get_all_cb,
                                                  NULL, NULL,
                                                  G_OBJECT (dispatcher));
@@ -2452,7 +2450,7 @@ mcd_dispatcher_add_client (McdDispatcher *self,
     McdDispatcherPrivate *priv = MCD_DISPATCHER_PRIV (self);
     McdClient *client;
 
-    if (!g_str_has_prefix (name, MC_CLIENT_BUS_NAME_BASE))
+    if (!g_str_has_prefix (name, TP_CLIENT_BUS_NAME_BASE))
     {
         /* This is not a Telepathy Client */
         return;
@@ -2481,7 +2479,8 @@ mcd_dispatcher_add_client (McdDispatcher *self,
         }
         else
         {
-            _mcd_client_proxy_set_active (client->proxy, owner);
+            _mcd_client_proxy_set_active ((McdClientProxy *) client->proxy,
+                                          owner);
             client->active = TRUE;
         }
 
@@ -2600,7 +2599,7 @@ name_owner_changed_cb (TpDBusDaemon *proxy,
         if (client)
         {
             client->active = FALSE;
-            _mcd_client_proxy_set_inactive (client->proxy);
+            _mcd_client_proxy_set_inactive ((McdClientProxy *) client->proxy);
 
             if (!client->activatable)
             {
@@ -2679,12 +2678,12 @@ mcd_dispatcher_class_init (McdDispatcherClass * klass)
         { NULL }
     };
     static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
-        { MC_IFACE_CHANNEL_DISPATCHER,
+        { TP_IFACE_CHANNEL_DISPATCHER,
           tp_dbus_properties_mixin_getter_gobject_properties,
           NULL,
           cd_props,
         },
-        { MC_IFACE_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST,
+        { TP_IFACE_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST,
           tp_dbus_properties_mixin_getter_gobject_properties,
           NULL,
           op_list_props,
@@ -2701,10 +2700,6 @@ mcd_dispatcher_class_init (McdDispatcherClass * klass)
     object_class->finalize = _mcd_dispatcher_finalize;
     object_class->dispose = _mcd_dispatcher_dispose;
 
-    tp_proxy_init_known_interfaces ();
-    tp_proxy_or_subclass_hook_on_interface_add
-        (TP_TYPE_PROXY, mc_cli_client_add_signals);
-
     signals[CHANNEL_ADDED] =
 	g_signal_new ("channel_added",
 		      G_OBJECT_CLASS_TYPE (klass),
@@ -2780,7 +2775,7 @@ mcd_dispatcher_class_init (McdDispatcherClass * klass)
          g_param_spec_boxed ("dispatch-operations",
                              "ChannelDispatchOperation details",
                              "A dbus-glib a(oa{sv})",
-                             MC_ARRAY_TYPE_DISPATCH_OPERATION_DETAILS_LIST,
+                             TP_ARRAY_TYPE_DISPATCH_OPERATION_DETAILS_LIST,
                              G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
     client_ready_quark = g_quark_from_static_string ("mcd_client_ready");
@@ -3149,7 +3144,7 @@ on_request_status_changed (McdChannel *channel, McdChannelStatus status,
         /* no callback, as we don't really care */
         DEBUG ("calling RemoveRequest on %s for %s",
                tp_proxy_get_object_path (rrd->handler), rrd->request_path);
-        mc_cli_client_interface_requests_call_remove_request
+        tp_cli_client_interface_requests_call_remove_request
             (rrd->handler, -1, rrd->request_path, err_string, error->message,
              NULL, NULL, NULL, NULL);
         g_free (err_string);
@@ -3245,7 +3240,7 @@ _mcd_dispatcher_add_request (McdDispatcher *dispatcher, McdAccount *account,
     g_hash_table_insert (properties, "org.freedesktop.Telepathy.ChannelRequest"
                          ".PreferredHandler", &v_preferred_handler);
 
-    mc_cli_client_interface_requests_call_add_request (
+    tp_cli_client_interface_requests_call_add_request (
         handler->proxy, -1,
         _mcd_channel_get_request_path (channel), properties,
         NULL, NULL, NULL, NULL);
@@ -3568,7 +3563,7 @@ dispatcher_request_channel (McdDispatcher *self,
             goto despair;
         }
 
-        if (!g_str_has_prefix (preferred_handler, MC_CLIENT_BUS_NAME_BASE))
+        if (!g_str_has_prefix (preferred_handler, TP_CLIENT_BUS_NAME_BASE))
         {
             g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
                          "Not a Telepathy Client: %s", preferred_handler);
@@ -3594,7 +3589,7 @@ dispatcher_request_channel (McdDispatcher *self,
 
     /* This is OK because the signatures of CreateChannel and EnsureChannel
      * are the same */
-    mc_svc_channel_dispatcher_return_from_create_channel (context, path);
+    tp_svc_channel_dispatcher_return_from_create_channel (context, path);
 
     _mcd_dispatcher_add_request (self, account, channel);
 
@@ -3612,7 +3607,7 @@ finally:
 }
 
 static void
-dispatcher_create_channel (McSvcChannelDispatcher *iface,
+dispatcher_create_channel (TpSvcChannelDispatcher *iface,
                            const gchar *account_path,
                            GHashTable *requested_properties,
                            gint64 user_action_time,
@@ -3629,7 +3624,7 @@ dispatcher_create_channel (McSvcChannelDispatcher *iface,
 }
 
 static void
-dispatcher_ensure_channel (McSvcChannelDispatcher *iface,
+dispatcher_ensure_channel (TpSvcChannelDispatcher *iface,
                            const gchar *account_path,
                            GHashTable *requested_properties,
                            gint64 user_action_time,
@@ -3649,7 +3644,7 @@ static void
 dispatcher_iface_init (gpointer g_iface,
                        gpointer iface_data G_GNUC_UNUSED)
 {
-#define IMPLEMENT(x) mc_svc_channel_dispatcher_implement_##x (\
+#define IMPLEMENT(x) tp_svc_channel_dispatcher_implement_##x (\
     g_iface, dispatcher_##x)
     IMPLEMENT (create_channel);
     IMPLEMENT (ensure_channel);
diff --git a/src/mcd.xml b/src/mcd.xml
new file mode 100644
index 0000000..1bba1ef
--- /dev/null
+++ b/src/mcd.xml
@@ -0,0 +1,20 @@
+<tp:spec
+    xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
+    xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
+
+<xi:include href="../xml/Account_Interface_ChannelRequests.xml"/>
+<xi:include href="../xml/Account_Interface_Compat.xml"/>
+<xi:include href="../xml/Account_Interface_Conditions.xml"/>
+<xi:include href="../xml/Account_Interface_Stats.xml"/>
+
+<xi:include href="../xml/Account_Manager_Interface_Query.xml"/>
+<xi:include href="../xml/Account_Manager_Interface_Creation.xml"/>
+
+<xi:include href="../xml/Connection_Interface_Contact_Capabilities.xml"/>
+
+<xi:include href="../xml/generic-types.xml"/>
+<xi:include href="../xml/telepathy-types.xml"/>
+
+</tp:spec>
-- 
1.5.6.5




More information about the telepathy-commits mailing list