telepathy-gabble: console: give channels more meaningful object paths

Simon McVittie smcv at kemper.freedesktop.org
Mon Oct 14 08:21:20 PDT 2013


Module: telepathy-gabble
Branch: master
Commit: 3976b375d5029e07856fe13eb5f580223e23567b
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=3976b375d5029e07856fe13eb5f580223e23567b

Author: Will Thompson <will.thompson at collabora.co.uk>
Date:   Sun Jun 23 11:36:15 2013 +0100

console: give channels more meaningful object paths

---

 plugins/console/channel.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/plugins/console/channel.c b/plugins/console/channel.c
index 3909203..6a9503e 100644
--- a/plugins/console/channel.c
+++ b/plugins/console/channel.c
@@ -55,6 +55,7 @@ static void console_iface_init (
 static void gabble_console_channel_set_spew (
     GabbleConsoleChannel *self,
     gboolean spew);
+gchar *gabble_console_channel_get_path (TpBaseChannel *chan);
 static void gabble_console_channel_close (TpBaseChannel *chan);
 
 G_DEFINE_TYPE_WITH_CODE (GabbleConsoleChannel, gabble_console_channel,
@@ -165,6 +166,7 @@ gabble_console_channel_class_init (GabbleConsoleChannelClass *klass)
   object_class->dispose = gabble_console_channel_dispose;
 
   channel_class->channel_type = GABBLE_IFACE_GABBLE_PLUGIN_CONSOLE;
+  channel_class->get_object_path_suffix = gabble_console_channel_get_path;
   channel_class->close = gabble_console_channel_close;
 
   g_type_class_add_private (klass, sizeof (GabbleConsoleChannelPrivate));
@@ -182,6 +184,12 @@ gabble_console_channel_class_init (GabbleConsoleChannelClass *klass)
       console_props);
 }
 
+gchar *
+gabble_console_channel_get_path (TpBaseChannel *chan)
+{
+  return g_strdup_printf ("console%p", chan);
+}
+
 static void
 gabble_console_channel_close (TpBaseChannel *chan)
 {



More information about the telepathy-commits mailing list