[Telepathy-commits] [telepathy-gabble/master] define the ChannelType in the concrete view class
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Thu Oct 9 04:05:43 PDT 2008
---
src/olpc-buddy-view.c | 11 +++++++++++
src/olpc-view.c | 3 +--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/olpc-buddy-view.c b/src/olpc-buddy-view.c
index dfe67c3..23c554f 100644
--- a/src/olpc-buddy-view.c
+++ b/src/olpc-buddy-view.c
@@ -48,6 +48,7 @@ enum
PROP_VIEW_PROPERTIES = 1,
PROP_ALIAS,
+ PROP_CHANNEL_TYPE,
PROP_CHANNEL_PROPERTIES,
LAST_PROPERTY
@@ -122,6 +123,10 @@ gabble_olpc_buddy_view_get_property (GObject *object,
switch (property_id)
{
+ case PROP_CHANNEL_TYPE:
+ g_value_set_static_string (value,
+ GABBLE_IFACE_OLPC_CHANNEL_TYPE_BUDDYVIEW);
+ break;
case PROP_CHANNEL_PROPERTIES:
g_value_take_boxed (value,
tp_dbus_properties_mixin_make_properties_hash (object,
@@ -162,6 +167,10 @@ gabble_olpc_buddy_view_set_property (GObject *object,
switch (property_id)
{
+ case PROP_CHANNEL_TYPE:
+ /* these properties are writable in the interface, but not actually
+ * meaningfully changeable on this channel, so we do nothing */
+ break;
case PROP_VIEW_PROPERTIES:
priv->properties = g_value_dup_boxed (value);
break;
@@ -330,6 +339,8 @@ gabble_olpc_buddy_view_class_init (
view_class->create_close_msg = gabble_olpc_buddy_view_create_close_msg;
view_class->create_request = gabble_olpc_buddy_view_create_request;
+ g_object_class_override_property (object_class, PROP_CHANNEL_TYPE,
+ "channel-type");
g_object_class_override_property (object_class, PROP_CHANNEL_PROPERTIES,
"channel-properties");
diff --git a/src/olpc-view.c b/src/olpc-view.c
index 0a283f8..19b192f 100644
--- a/src/olpc-view.c
+++ b/src/olpc-view.c
@@ -233,8 +233,7 @@ gabble_olpc_view_get_property (GObject *object,
g_value_set_string (value, self->object_path);
break;
case PROP_CHANNEL_TYPE:
- g_value_set_static_string (value,
- GABBLE_IFACE_OLPC_CHANNEL_TYPE_BUDDYVIEW);
+ /* This property has to be implemented in the concrete classes */
break;
case PROP_HANDLE_TYPE:
g_value_set_uint (value, TP_HANDLE_TYPE_NONE);
--
1.5.6.5
More information about the Telepathy-commits
mailing list