diff options
author | Morten Mjelva <morten.mjelva@gmail.com> | 2011-02-16 23:37:14 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-07-13 15:22:26 +0200 |
commit | 2e2a28f8864b0f592f1e6229517d9b4e4f48b0c1 (patch) | |
tree | d155615efbac78ca2b79f5c783695f98935754b3 /telepathy-glib/automatic-proxy-factory.c | |
parent | 4bb8d5f8aad41a5d89db289de1cad6e969efd0bb (diff) | |
download | telepathy-glib-2e2a28f8864b0f592f1e6229517d9b4e4f48b0c1.tar.gz |
Add TpFileTransferChannel (fdo #31376)
Only support basic properties for now.
Diffstat (limited to 'telepathy-glib/automatic-proxy-factory.c')
-rw-r--r-- | telepathy-glib/automatic-proxy-factory.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/telepathy-glib/automatic-proxy-factory.c b/telepathy-glib/automatic-proxy-factory.c index 36c53cb2a..696f73150 100644 --- a/telepathy-glib/automatic-proxy-factory.c +++ b/telepathy-glib/automatic-proxy-factory.c @@ -41,6 +41,10 @@ * %TP_IFACE_CHANNEL_INTERFACE_MESSAGES;</para> * </listitem> * <listitem> + * <para>a #TpFileTransferChannel, if the channel is of type + * %TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER;</para> + * </listitem> + * <listitem> * <para>a plain #TpChannel, otherwise</para> * </listitem> * </itemizedlist> @@ -92,6 +96,7 @@ #include <telepathy-glib/interfaces.h> #include <telepathy-glib/stream-tube-channel.h> #include <telepathy-glib/text-channel.h> +#include <telepathy-glib/file-transfer-channel.h> #include <telepathy-glib/util.h> #define DEBUG_FLAG TP_DEBUG_CLIENT @@ -144,6 +149,11 @@ tp_automatic_proxy_factory_create_channel_impl ( DEBUG ("channel %s doesn't implement Messages so we can't create " "a TpTextChannel", path); } + else if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) + { + return TP_CHANNEL (tp_file_transfer_channel_new (conn, path, properties, + error)); + } return tp_channel_new_from_properties (conn, path, properties, error); } @@ -197,6 +207,11 @@ tp_automatic_proxy_factory_dup_channel_features_impl (TpChannel *channel) feature = TP_TEXT_CHANNEL_FEATURE_SMS; g_array_append_val (features, feature); } + else if (TP_IS_FILE_TRANSFER_CHANNEL (channel)) + { + feature = TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE; + g_array_append_val (features, feature); + } return features; } |