summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2010-08-09 18:57:07 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-08-09 18:57:07 +0100
commit13c6d5d146f7d555b966e6208de0c60ef6c92135 (patch)
tree42d4a7d4b9451ea46614fe119b16f8d219a789fb
parent69b6fd881618539e312a5982fa3889562789ce2c (diff)
Add the Interfaces property to the call example CM
-rw-r--r--examples/future/call-cm/call-content.c13
-rw-r--r--examples/future/call-cm/call-stream.c13
2 files changed, 26 insertions, 0 deletions
diff --git a/examples/future/call-cm/call-content.c b/examples/future/call-cm/call-content.c
index 62e588d8d..2271ae394 100644
--- a/examples/future/call-cm/call-content.c
+++ b/examples/future/call-cm/call-content.c
@@ -38,6 +38,7 @@ enum
{
PROP_OBJECT_PATH = 1,
PROP_CONNECTION,
+ PROP_INTERFACES,
PROP_NAME,
PROP_TYPE,
PROP_CREATOR,
@@ -85,6 +86,8 @@ constructed (GObject *object)
tp_handle_ref (contact_repo, self->priv->creator);
}
+static const gchar * const empty_strv[] = { NULL };
+
static void
get_property (GObject *object,
guint property_id,
@@ -103,6 +106,10 @@ get_property (GObject *object,
g_value_set_object (value, self->priv->conn);
break;
+ case PROP_INTERFACES:
+ g_value_set_static_boxed (value, empty_strv);
+ break;
+
case PROP_NAME:
g_value_set_string (value, self->priv->name);
break;
@@ -236,6 +243,7 @@ example_call_content_class_init (ExampleCallContentClass *klass)
{
static TpDBusPropertiesMixinPropImpl content_props[] = {
{ "Name", "name", NULL },
+ { "Interfaces", "interfaces", NULL },
{ "Type", "type", NULL },
{ "Creator", "creator", NULL },
{ "Disposition", "disposition", NULL },
@@ -306,6 +314,11 @@ example_call_content_class_init (ExampleCallContentClass *klass)
g_object_class_install_property (object_class, PROP_STREAM_PATHS,
param_spec);
+ param_spec = g_param_spec_boxed ("interfaces", "Interfaces",
+ "List of D-Bus interfaces",
+ G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (object_class, PROP_INTERFACES, param_spec);
+
klass->dbus_properties_class.interfaces = prop_interfaces;
tp_dbus_properties_mixin_class_init (object_class,
G_STRUCT_OFFSET (ExampleCallContentClass,
diff --git a/examples/future/call-cm/call-stream.c b/examples/future/call-cm/call-stream.c
index fb41030a8..a293a63a6 100644
--- a/examples/future/call-cm/call-stream.c
+++ b/examples/future/call-cm/call-stream.c
@@ -39,6 +39,7 @@ enum
{
PROP_OBJECT_PATH = 1,
PROP_CONNECTION,
+ PROP_INTERFACES,
PROP_HANDLE,
PROP_SIMULATION_DELAY,
PROP_LOCALLY_REQUESTED,
@@ -119,6 +120,8 @@ constructed (GObject *object)
}
}
+static const gchar * const empty_strv[] = { NULL };
+
static void
get_property (GObject *object,
guint property_id,
@@ -133,6 +136,10 @@ get_property (GObject *object,
g_value_set_string (value, self->priv->object_path);
break;
+ case PROP_INTERFACES:
+ g_value_set_static_boxed (value, empty_strv);
+ break;
+
case PROP_HANDLE:
g_value_set_uint (value, self->priv->handle);
break;
@@ -251,6 +258,7 @@ example_call_stream_class_init (ExampleCallStreamClass *klass)
{
static TpDBusPropertiesMixinPropImpl stream_props[] = {
{ "Senders", "senders", NULL },
+ { "Interfaces", "interfaces", NULL },
{ NULL }
};
static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
@@ -310,6 +318,11 @@ example_call_stream_class_init (ExampleCallStreamClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_SENDERS, param_spec);
+ param_spec = g_param_spec_boxed ("interfaces", "Interfaces",
+ "List of D-Bus interfaces",
+ G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (object_class, PROP_INTERFACES, param_spec);
+
signals[SIGNAL_REMOVED] = g_signal_new ("removed",
G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,