[Telepathy-commits] [telepathy-salut/master] SalutRoomlistChannel: Add the conference-server property

Alban Crequy alban.crequy at collabora.co.uk
Wed Nov 12 10:45:23 PST 2008


---
 src/salut-roomlist-channel.c |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/salut-roomlist-channel.c b/src/salut-roomlist-channel.c
index 867be14..f98a4b5 100644
--- a/src/salut-roomlist-channel.c
+++ b/src/salut-roomlist-channel.c
@@ -61,6 +61,7 @@ enum
   PROP_HANDLE,
   PROP_CONNECTION,
   PROP_INTERFACES,
+  PROP_CONFERENCE_SERVER,
   PROP_TARGET_ID,
   PROP_INITIATOR_HANDLE,
   PROP_INITIATOR_ID,
@@ -147,6 +148,10 @@ salut_roomlist_channel_get_property (GObject *object,
     case PROP_INTERFACES:
       g_value_set_static_boxed (value, salut_roomlist_channel_interfaces);
       break;
+    case PROP_CONFERENCE_SERVER:
+      /* Salut does not use a server, so this string is always empty */
+      g_value_set_string (value, "");
+      break;
     case PROP_TARGET_ID:
       g_value_set_static_string (value, "");
       break;
@@ -225,6 +230,10 @@ salut_roomlist_channel_set_property (GObject *object,
     case PROP_CONNECTION:
       priv->connection = g_value_get_object (value);
       break;
+    case PROP_CONFERENCE_SERVER:
+      /* Salut does not use a server, so this string is always empty */
+      g_assert (strlen (g_value_get_string (value)) == 0);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -251,12 +260,21 @@ salut_roomlist_channel_class_init (
       { "Interfaces", "interfaces", NULL },
       { NULL }
   };
+  static TpDBusPropertiesMixinPropImpl roomlist_props[] = {
+      { "Server", "conference-server", NULL },
+      { NULL }
+  };
   static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
       { TP_IFACE_CHANNEL,
         tp_dbus_properties_mixin_getter_gobject_properties,
         NULL,
         channel_props,
       },
+      { TP_IFACE_CHANNEL_TYPE_ROOM_LIST,
+        tp_dbus_properties_mixin_getter_gobject_properties,
+        NULL,
+        roomlist_props,
+      },
       { NULL }
   };
 
@@ -325,6 +343,14 @@ salut_roomlist_channel_class_init (
                                     G_PARAM_STATIC_STRINGS);
   g_object_class_install_property (object_class, PROP_CONNECTION, param_spec);
 
+  param_spec = g_param_spec_string ("conference-server",
+      "Name of conference server to use",
+      "Name of conference server to use, which is an empty string for Salut",
+      "",
+      G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+  g_object_class_install_property (object_class, PROP_CONFERENCE_SERVER,
+      param_spec);
+
   salut_roomlist_channel_class->dbus_props_class.interfaces = prop_interfaces;
   tp_dbus_properties_mixin_class_init (object_class,
       G_STRUCT_OFFSET (SalutRoomlistChannelClass, dbus_props_class));
-- 
1.5.6.5




More information about the Telepathy-commits mailing list