diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-05-19 14:21:52 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2008-11-18 16:52:59 +0000 |
commit | c1e5ab80ddc7ba0207213706e16a0d832e22414c (patch) | |
tree | d947e5eb08e6970501eefcc7dd80e236737236af /examples | |
parent | f899dca4d40979010a5bd8b62ca29851a813569b (diff) |
echo2 example: update to support D-Bus properties
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cm/echo-message-parts/chan.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/cm/echo-message-parts/chan.c b/examples/cm/echo-message-parts/chan.c index d15f19906..dbb9ef5f8 100644 --- a/examples/cm/echo-message-parts/chan.c +++ b/examples/cm/echo-message-parts/chan.c @@ -189,6 +189,7 @@ constructor (GType type, TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE }; + static const char * const content_types[] = { "*/*", NULL }; tp_handle_ref (contact_repo, self->priv->handle); @@ -202,7 +203,11 @@ constructor (GType type, self->priv->conn); tp_message_mixin_implement_sending (object, send_message, - (sizeof (types) / sizeof (types[0])), types); + (sizeof (types) / sizeof (types[0])), types, + TP_MESSAGE_PART_SUPPORT_FLAG_DATA_ONLY | + TP_MESSAGE_PART_SUPPORT_FLAG_ONE_ATTACHMENT | + TP_MESSAGE_PART_SUPPORT_FLAG_MULTIPLE_ATTACHMENTS, + content_types); return object; } @@ -384,6 +389,10 @@ example_echo_2_channel_class_init (ExampleEcho2ChannelClass *klass) }; GObjectClass *object_class = (GObjectClass *) klass; GParamSpec *param_spec; + static TpDBusPropertiesMixinIfaceImpl interfaces[] = { + { NULL /* initialized with tp_message_mixin_init_dbus_properties() */ }, + { NULL } + }; g_type_class_add_private (klass, sizeof (ExampleEcho2ChannelPrivate)); @@ -448,6 +457,7 @@ example_echo_2_channel_class_init (ExampleEcho2ChannelClass *klass) G_STRUCT_OFFSET (ExampleEcho2ChannelClass, text_class)); klass->dbus_properties_class.interfaces = prop_interfaces; + tp_message_mixin_init_dbus_properties (prop_interfaces + 0); tp_dbus_properties_mixin_class_init (object_class, G_STRUCT_OFFSET (ExampleEcho2ChannelClass, dbus_properties_class)); } |