diff options
author | Eitan Isaacson <eitan@monotonous.org> | 2010-12-27 15:38:36 -0800 |
---|---|---|
committer | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2011-11-21 12:46:13 -0200 |
commit | a45dc50337a4e377294a6088ab3bb8ac6662c9ca (patch) | |
tree | be62ded6c720877e44f12cb2883de851982fc6bf /examples | |
parent | 1ace42d618a5f099727215305553f5c9503d9fb1 (diff) | |
download | telepathy-glib-a45dc50337a4e377294a6088ab3bb8ac6662c9ca.tar.gz |
Basic protocol addressing test.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cm/echo-message-parts/protocol.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/cm/echo-message-parts/protocol.c b/examples/cm/echo-message-parts/protocol.c index 3c8bb6c42..6cde7bf39 100644 --- a/examples/cm/echo-message-parts/protocol.c +++ b/examples/cm/echo-message-parts/protocol.c @@ -21,6 +21,7 @@ G_DEFINE_TYPE (ExampleEcho2Protocol, const gchar * const protocol_interfaces[] = { TP_IFACE_PROTOCOL_INTERFACE_AVATARS, + TP_IFACE_PROTOCOL_INTERFACE_ADDRESSING, NULL }; const gchar * const supported_avatar_mime_types[] = { @@ -29,6 +30,16 @@ const gchar * const supported_avatar_mime_types[] = { "image/gif", NULL }; +const gchar * const addressing_vcard_fields[] = { + "x-jabber", + "tel", + NULL }; + +const gchar * const addressing_uri_schemes[] = { + "xmpp", + "tel", + NULL }; + static void example_echo_2_protocol_init ( ExampleEcho2Protocol *self) @@ -199,6 +210,18 @@ get_avatar_details (TpBaseProtocol *self, } static void +get_addressing_details (TpBaseProtocol *self, + GStrv *addressable_vcard_fields, + GStrv *addressable_uri_schemes) +{ + if (addressable_vcard_fields != NULL) + *addressable_vcard_fields = g_strdupv ((gchar **) addressing_vcard_fields); + + if (addressable_uri_schemes != NULL) + *addressable_uri_schemes = g_strdupv ((gchar **) addressing_uri_schemes); +} + +static void example_echo_2_protocol_class_init ( ExampleEcho2ProtocolClass *klass) { @@ -213,4 +236,5 @@ example_echo_2_protocol_class_init ( base_class->get_interfaces = get_interfaces; base_class->get_connection_details = get_connection_details; base_class->get_avatar_details = get_avatar_details; + base_class->get_addressing_details = get_addressing_details; } |