summaryrefslogtreecommitdiff
path: root/tests/lib/textchan-group.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2009-01-06 00:27:16 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2009-01-07 18:57:50 +0000
commit93c2cd71002eee0c0960084b9d50e0625f66826c (patch)
treeeda2e22e8572652b6d08b800df200e3c5157bc2e /tests/lib/textchan-group.c
parenteb4204b272f1f45d86da0f95fdab18a51f011a4b (diff)
downloadtelepathy-glib-93c2cd71002eee0c0960084b9d50e0625f66826c.tar.gz
Run group proxy tests on channels without Properties
Diffstat (limited to 'tests/lib/textchan-group.c')
-rw-r--r--tests/lib/textchan-group.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/lib/textchan-group.c b/tests/lib/textchan-group.c
index 3e3a2b3bc..82c3f4631 100644
--- a/tests/lib/textchan-group.c
+++ b/tests/lib/textchan-group.c
@@ -53,6 +53,7 @@ enum
PROP_INITIATOR_HANDLE,
PROP_INITIATOR_ID,
PROP_DETAILED,
+ PROP_PROPERTIES,
N_PROPS
};
@@ -61,6 +62,7 @@ struct _TestTextChannelGroupPrivate
gchar *object_path;
gboolean detailed;
+ gboolean properties;
gboolean closed;
gboolean disposed;
@@ -103,7 +105,7 @@ constructor (GType type,
TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
(self->conn, TP_HANDLE_TYPE_CONTACT);
DBusGConnection *bus;
- TpChannelGroupFlags flags = TP_CHANNEL_GROUP_FLAG_PROPERTIES;
+ TpChannelGroupFlags flags = 0;
bus = tp_get_bus ();
dbus_g_connection_register_g_object (bus, self->priv->object_path, object);
@@ -120,6 +122,9 @@ constructor (GType type,
if (self->priv->detailed)
flags |= TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED;
+ if (self->priv->properties)
+ flags |= TP_CHANNEL_GROUP_FLAG_PROPERTIES;
+
tp_group_mixin_init (object, G_STRUCT_OFFSET (TestTextChannelGroup, group),
contact_repo, self->conn->self_handle);
tp_group_mixin_change_flags (object, flags, 0);
@@ -176,6 +181,9 @@ get_property (GObject *object,
case PROP_DETAILED:
g_value_set_boolean (value, self->priv->detailed);
break;
+ case PROP_PROPERTIES:
+ g_value_set_boolean (value, self->priv->properties);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -208,6 +216,9 @@ set_property (GObject *object,
case PROP_DETAILED:
self->priv->detailed = g_value_get_boolean (value);
break;
+ case PROP_PROPERTIES:
+ self->priv->properties = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -333,6 +344,13 @@ test_text_channel_group_class_init (TestTextChannelGroupClass *klass)
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_DETAILED, param_spec);
+ param_spec = g_param_spec_boolean ("properties",
+ "Has the Properties flag?",
+ "True if the Properties group flag should be set",
+ TRUE,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (object_class, PROP_PROPERTIES, param_spec);
+
tp_text_mixin_class_init (object_class,
G_STRUCT_OFFSET (TestTextChannelGroupClass, text_class));
tp_group_mixin_class_init (object_class,