TpAutomaticClientFactory will create TpFileTransferChannels for us and
they're, like, way better.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
#include "empathy-client-factory.h"
#include "empathy-tp-chat.h"
#include "empathy-client-factory.h"
#include "empathy-tp-chat.h"
-#include "empathy-tp-file.h"
#include "empathy-utils.h"
#include <telepathy-yell/telepathy-yell.h>
#include "empathy-utils.h"
#include <telepathy-yell/telepathy-yell.h>
return TP_CHANNEL (call_channel_new_with_factory (
TP_SIMPLE_CLIENT_FACTORY (factory), conn, path, properties, error));
}
return TP_CHANNEL (call_channel_new_with_factory (
TP_SIMPLE_CLIENT_FACTORY (factory), conn, path, properties, error));
}
- else if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER))
- {
- return TP_CHANNEL (empathy_tp_file_new (
- TP_SIMPLE_CLIENT_FACTORY (factory), conn, path, properties, error));
- }
return chainup->create_channel (factory, conn, path, properties, error);
}
return chainup->create_channel (factory, conn, path, properties, error);
}
if (tp_proxy_get_invalidated (channel) != NULL)
continue;
if (tp_proxy_get_invalidated (channel) != NULL)
continue;
- if (!EMPATHY_IS_TP_FILE (channel))
+ if (!TP_IS_FILE_TRANSFER_CHANNEL (channel))
continue;
/* We handle only incoming FT */
continue;
/* We handle only incoming FT */
#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-ft-factory.h>
#include <libempathy/empathy-ft-handler.h>
#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-ft-factory.h>
#include <libempathy/empathy-ft-handler.h>
-#include <libempathy/empathy-tp-file.h>
#include <libempathy-gtk/empathy-contact-chooser.h>
#include <libempathy-gtk/empathy-ui-utils.h>
#include <libempathy-gtk/empathy-contact-chooser.h>
#include <libempathy-gtk/empathy-ui-utils.h>
static void
transfer_done_cb (EmpathyFTHandler *handler,
static void
transfer_done_cb (EmpathyFTHandler *handler,
- EmpathyTpFile *tp_file,
+ TpFileTransferChannel *channel,
NstPlugin *plugin)
{
quit ();
NstPlugin *plugin)
{
quit ();
#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-tp-chat.h>
#include <libempathy/empathy-tp-streamed-media.h>
#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-tp-chat.h>
#include <libempathy/empathy-tp-streamed-media.h>
-#include <libempathy/empathy-tp-file.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-gsettings.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-gsettings.h>
{
empathy_tp_chat_leave (user_data, "");
}
{
empathy_tp_chat_leave (user_data, "");
}
- else if (EMPATHY_IS_TP_FILE (user_data))
+ else if (TP_IS_FILE_TRANSFER_CHANNEL (user_data))
- empathy_tp_file_close (user_data);
+ tp_channel_close_async (user_data, NULL, NULL);
event_manager_call_channel_got_contact_cb,
approval, NULL, G_OBJECT (self));
}
event_manager_call_channel_got_contact_cb,
approval, NULL, G_OBJECT (self));
}
- else if (EMPATHY_IS_TP_FILE (channel))
+ else if (channel_type == TP_IFACE_QUARK_CHANNEL_TYPE_FILE_TRANSFER)
#define DEBUG_FLAG EMPATHY_DEBUG_FT
#include <libempathy/empathy-debug.h>
#define DEBUG_FLAG EMPATHY_DEBUG_FT
#include <libempathy/empathy-debug.h>
-#include <libempathy/empathy-tp-file.h>
#include <libempathy/empathy-utils.h>
#include <libempathy-gtk/empathy-ui-utils.h>
#include <libempathy/empathy-utils.h>
#include <libempathy-gtk/empathy-ui-utils.h>
static void
ft_handler_transfer_done_cb (EmpathyFTHandler *handler,
static void
ft_handler_transfer_done_cb (EmpathyFTHandler *handler,
- EmpathyTpFile *tp_file,
+ TpFileTransferChannel *channel,
EmpathyFTManager *manager)
{
if (empathy_ft_handler_is_incoming (handler) &&
EmpathyFTManager *manager)
{
if (empathy_ft_handler_is_incoming (handler) &&
static void
ft_handler_transfer_started_cb (EmpathyFTHandler *handler,
static void
ft_handler_transfer_started_cb (EmpathyFTHandler *handler,
- EmpathyTpFile *tp_file,
+ TpFileTransferChannel *channel,
EmpathyFTManager *manager)
{
guint64 transferred_bytes, total_bytes;
EmpathyFTManager *manager)
{
guint64 transferred_bytes, total_bytes;