diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2008-08-19 18:55:58 +0100 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2008-08-19 22:29:00 +0100 |
commit | 42606022c7c037724bfb9834481381354cc3f367 (patch) | |
tree | d51abd9b8d21df4468967658b48c8f4ca83127d9 /src | |
parent | 3f84b5232cb85aef0fe5929790306534954e893b (diff) | |
download | telepathy-salut-42606022c7c037724bfb9834481381354cc3f367.tar.gz |
SalutContactChannel: Add TargetID property
Diffstat (limited to 'src')
-rw-r--r-- | src/salut-contact-channel.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/salut-contact-channel.c b/src/salut-contact-channel.c index 81d71c30..242a0fc3 100644 --- a/src/salut-contact-channel.c +++ b/src/salut-contact-channel.c @@ -60,6 +60,7 @@ enum PROP_HANDLE, PROP_CONNECTION, PROP_INTERFACES, + PROP_TARGET_ID, LAST_PROPERTY }; @@ -156,6 +157,14 @@ salut_contact_channel_get_property (GObject *object, case PROP_INTERFACES: g_value_set_static_boxed (value, salut_contact_channel_interfaces); break; + case PROP_TARGET_ID: + { + TpHandleRepoIface *repo = tp_base_connection_get_handles ( + (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_LIST); + + g_value_set_string (value, tp_handle_inspect (repo, priv->handle)); + } + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -206,6 +215,7 @@ salut_contact_channel_class_init (SalutContactChannelClass *salut_contact_channe static TpDBusPropertiesMixinPropImpl channel_props[] = { { "TargetHandleType", "handle-type", NULL }, { "TargetHandle", "handle", NULL }, + { "TargetID", "target-id", NULL }, { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, { NULL } @@ -257,6 +267,13 @@ salut_contact_channel_class_init (SalutContactChannelClass *salut_contact_channe "handle-type"); g_object_class_override_property (object_class, PROP_HANDLE, "handle"); + param_spec = g_param_spec_string ("target-id", "Target JID", + "The string obtained by inspecting this channel's handle", + NULL, + G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB); + g_object_class_install_property (object_class, PROP_TARGET_ID, param_spec); + salut_contact_channel_class->dbus_props_class.interfaces = prop_interfaces; tp_dbus_properties_mixin_class_init (object_class, G_STRUCT_OFFSET (SalutContactChannelClass, dbus_props_class)); |