/* empathy-ft-factory.c */
-#include <glib.h>
-
-#include <telepathy-glib/telepathy-glib.h>
-
+#include "config.h"
#include "empathy-ft-factory.h"
-#include "empathy-ft-handler.h"
+
#include "empathy-request-util.h"
#include "empathy-utils.h"
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 */
- empathy_ft_handler_new_incoming ((EmpathyTpFile *) channel,
+ empathy_ft_handler_new_incoming ((TpFileTransferChannel *) channel,
ft_handler_incoming_ready_cb, self);
}
GError *error,
gpointer user_data)
{
- EmpathyFTFactory *factory = user_data;
+ EmpathyFTFactory *factory = EMPATHY_FT_FACTORY (user_data);
g_signal_emit (factory, signals[NEW_FT_HANDLER], 0, handler, error);
+
+ g_object_unref (factory);
}
/* public methods */
g_return_if_fail (G_IS_FILE (source));
empathy_ft_handler_new_outgoing (contact, source, action_time,
- ft_handler_outgoing_ready_cb, factory);
+ ft_handler_outgoing_ready_cb, g_object_ref (factory));
}
/**