aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-05-16 00:15:36 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:53:17 +0800
commit69765b1425c0ab80df655df5a5e7a96b707beee6 (patch)
tree3ea9bea85bc1d9f28ac65f5e42a291f24eca0efe
parent0caac94000e5681e22e0938af94ed5ed4d3d206b (diff)
downloadgsoc2013-empathy-69765b1425c0ab80df655df5a5e7a96b707beee6.tar
gsoc2013-empathy-69765b1425c0ab80df655df5a5e7a96b707beee6.tar.gz
gsoc2013-empathy-69765b1425c0ab80df655df5a5e7a96b707beee6.tar.bz2
gsoc2013-empathy-69765b1425c0ab80df655df5a5e7a96b707beee6.tar.lz
gsoc2013-empathy-69765b1425c0ab80df655df5a5e7a96b707beee6.tar.xz
gsoc2013-empathy-69765b1425c0ab80df655df5a5e7a96b707beee6.tar.zst
gsoc2013-empathy-69765b1425c0ab80df655df5a5e7a96b707beee6.zip
Adapt the code to the tp style.
-rw-r--r--libempathy/empathy-ft-factory.c30
-rw-r--r--libempathy/empathy-ft-factory.h23
-rw-r--r--libempathy/empathy-ft-handler.c79
-rw-r--r--libempathy/empathy-ft-handler.h23
-rw-r--r--libempathy/empathy-tp-file.c108
-rw-r--r--libempathy/empathy-tp-file.h47
6 files changed, 166 insertions, 144 deletions
diff --git a/libempathy/empathy-ft-factory.c b/libempathy/empathy-ft-factory.c
index 97fe6022b..89ee446fd 100644
--- a/libempathy/empathy-ft-factory.c
+++ b/libempathy/empathy-ft-factory.c
@@ -43,8 +43,8 @@ static guint signals[LAST_SIGNAL] = { 0 };
static GObject *
do_constructor (GType type,
- guint n_props,
- GObjectConstructParam *props)
+ guint n_props,
+ GObjectConstructParam *props)
{
GObject *retval;
@@ -93,8 +93,8 @@ empathy_ft_factory_init (EmpathyFTFactory *self)
static void
ft_handler_outgoing_ready_cb (EmpathyFTHandler *handler,
- GError *error,
- gpointer user_data)
+ GError *error,
+ gpointer user_data)
{
EmpathyFTFactory *factory = user_data;
@@ -103,8 +103,8 @@ ft_handler_outgoing_ready_cb (EmpathyFTHandler *handler,
static void
ft_handler_incoming_ready_cb (EmpathyFTHandler *handler,
- GError *error,
- gpointer user_data)
+ GError *error,
+ gpointer user_data)
{
EmpathyFTFactory *factory = user_data;
@@ -121,9 +121,9 @@ empathy_ft_factory_dup_singleton (void)
void
empathy_ft_factory_new_transfer_outgoing (EmpathyFTFactory *factory,
- EmpathyContact *contact,
- GFile *source,
- gboolean use_hash)
+ EmpathyContact *contact,
+ GFile *source,
+ gboolean use_hash)
{
g_return_if_fail (EMPATHY_IS_FT_FACTORY (factory));
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
@@ -135,7 +135,7 @@ empathy_ft_factory_new_transfer_outgoing (EmpathyFTFactory *factory,
void
empathy_ft_factory_claim_channel (EmpathyFTFactory *factory,
- EmpathyDispatchOperation *operation)
+ EmpathyDispatchOperation *operation)
{
EmpathyTpFile *tp_file;
@@ -153,11 +153,11 @@ empathy_ft_factory_claim_channel (EmpathyFTFactory *factory,
}
void
-empathy_ft_factory_set_destination_for_incoming_handler
- (EmpathyFTFactory *factory,
- EmpathyFTHandler *handler,
- GFile *destination,
- gboolean use_hash)
+empathy_ft_factory_set_destination_for_incoming_handler (
+ EmpathyFTFactory *factory,
+ EmpathyFTHandler *handler,
+ GFile *destination,
+ gboolean use_hash)
{
g_return_if_fail (EMPATHY_IS_FT_FACTORY (factory));
g_return_if_fail (EMPATHY_IS_FT_HANDLER (handler));
diff --git a/libempathy/empathy-ft-factory.h b/libempathy/empathy-ft-factory.h
index 82dcb660b..27fad9a13 100644
--- a/libempathy/empathy-ft-factory.h
+++ b/libempathy/empathy-ft-factory.h
@@ -35,15 +35,18 @@ G_BEGIN_DECLS
#define EMPATHY_TYPE_FT_FACTORY empathy_ft_factory_get_type()
#define EMPATHY_FT_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_FT_FACTORY, EmpathyFTFactory))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ EMPATHY_TYPE_FT_FACTORY, EmpathyFTFactory))
#define EMPATHY_FT_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_FT_FACTORY, EmpathyFTFactoryClass))
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ EMPATHY_TYPE_FT_FACTORY, EmpathyFTFactoryClass))
#define EMPATHY_IS_FT_FACTORY(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_FT_FACTORY))
#define EMPATHY_IS_FT_FACTORY_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_FT_FACTORY))
#define EMPATHY_FT_FACTORY_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_FT_FACTORY, EmpathyFTFactoryClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ EMPATHY_TYPE_FT_FACTORY, EmpathyFTFactoryClass))
typedef struct {
GObject parent;
@@ -59,12 +62,16 @@ GType empathy_ft_factory_get_type (void);
/* public methods */
EmpathyFTFactory* empathy_ft_factory_dup_singleton (void);
void empathy_ft_factory_new_transfer_outgoing (EmpathyFTFactory *factory,
- EmpathyContact *contact, GFile *source, gboolean use_hash);
+ EmpathyContact *contact,
+ GFile *source,
+ gboolean use_hash);
void empathy_ft_factory_claim_channel (EmpathyFTFactory *factory,
- EmpathyDispatchOperation *operation);
-void empathy_ft_factory_set_destination_for_incoming_handler
- (EmpathyFTFactory *factory, EmpathyFTHandler *handler,
- GFile *destination, gboolean use_hash);
+ EmpathyDispatchOperation *operation);
+void empathy_ft_factory_set_destination_for_incoming_handler (
+ EmpathyFTFactory *factory,
+ EmpathyFTHandler *handler,
+ GFile *destination,
+ gboolean use_hash);
G_END_DECLS
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index 737857c9f..9580e121b 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -115,9 +115,9 @@ static gboolean do_hash_job_incoming (GIOSchedulerJob *job,
/* GObject implementations */
static void
do_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
EmpathyFTHandlerPriv *priv = GET_PRIV (object);
@@ -142,9 +142,9 @@ do_get_property (GObject *object,
static void
do_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
EmpathyFTHandlerPriv *priv = GET_PRIV (object);
@@ -409,7 +409,7 @@ check_hash_incoming (EmpathyFTHandler *handler)
static void
emit_error_signal (EmpathyFTHandler *handler,
- const GError *error)
+ const GError *error)
{
EmpathyFTHandlerPriv *priv = GET_PRIV (handler);
@@ -421,8 +421,8 @@ emit_error_signal (EmpathyFTHandler *handler,
static void
ft_transfer_operation_callback (EmpathyTpFile *tp_file,
- const GError *error,
- gpointer user_data)
+ const GError *error,
+ gpointer user_data)
{
EmpathyFTHandler *handler = user_data;
EmpathyFTHandlerPriv *priv = GET_PRIV (handler);
@@ -449,7 +449,7 @@ ft_transfer_operation_callback (EmpathyTpFile *tp_file,
static void
update_remaining_time_and_speed (EmpathyFTHandler *handler,
- guint64 transferred_bytes)
+ guint64 transferred_bytes)
{
EmpathyFTHandlerPriv *priv = GET_PRIV (handler);
time_t elapsed_time, current_time;
@@ -476,8 +476,8 @@ update_remaining_time_and_speed (EmpathyFTHandler *handler,
static void
ft_transfer_progress_callback (EmpathyTpFile *tp_file,
- guint64 transferred_bytes,
- gpointer user_data)
+ guint64 transferred_bytes,
+ gpointer user_data)
{
EmpathyFTHandler *handler = user_data;
EmpathyFTHandlerPriv *priv = GET_PRIV (handler);
@@ -503,8 +503,8 @@ ft_transfer_progress_callback (EmpathyTpFile *tp_file,
static void
ft_handler_create_channel_cb (EmpathyDispatchOperation *operation,
- const GError *error,
- gpointer user_data)
+ const GError *error,
+ gpointer user_data)
{
EmpathyFTHandler *handler = user_data;
EmpathyFTHandlerPriv *priv = GET_PRIV (handler);
@@ -665,7 +665,8 @@ hash_job_done (gpointer user_data)
error = g_error_new_literal (EMPATHY_FT_ERROR_QUARK,
EMPATHY_FT_ERROR_HASH_MISMATCH,
- _("The hash of the received file and the sent one do not match"));
+ _("The hash of the received file and the "
+ "sent one do not match"));
goto cleanup;
}
else
@@ -720,8 +721,8 @@ emit_hashing_progress (gpointer user_data)
static gboolean
do_hash_job (GIOSchedulerJob *job,
- GCancellable *cancellable,
- gpointer user_data)
+ GCancellable *cancellable,
+ gpointer user_data)
{
HashingData *hash_data = user_data;
gssize bytes_read;
@@ -770,8 +771,8 @@ out:
static gboolean
do_hash_job_incoming (GIOSchedulerJob *job,
- GCancellable *cancellable,
- gpointer user_data)
+ GCancellable *cancellable,
+ gpointer user_data)
{
HashingData *hash_data = user_data;
EmpathyFTHandler *handler = hash_data->handler;
@@ -797,8 +798,8 @@ do_hash_job_incoming (GIOSchedulerJob *job,
static void
ft_handler_read_async_cb (GObject *source,
- GAsyncResult *res,
- gpointer user_data)
+ GAsyncResult *res,
+ gpointer user_data)
{
GFileInputStream *stream;
GError *error = NULL;
@@ -883,8 +884,8 @@ callbacks_data_free (gpointer user_data)
static void
ft_handler_gfile_ready_cb (GObject *source,
- GAsyncResult *res,
- CallbacksData *cb_data)
+ GAsyncResult *res,
+ CallbacksData *cb_data)
{
GFileInfo *info;
GError *error = NULL;
@@ -928,10 +929,10 @@ out:
static void
contact_factory_contact_cb (EmpathyTpContactFactory *factory,
- EmpathyContact *contact,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
+ EmpathyContact *contact,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
{
CallbacksData *cb_data = user_data;
EmpathyFTHandler *handler = EMPATHY_FT_HANDLER (weak_object);
@@ -954,10 +955,10 @@ contact_factory_contact_cb (EmpathyTpContactFactory *factory,
static void
channel_get_all_properties_cb (TpProxy *proxy,
- GHashTable *properties,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
+ GHashTable *properties,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
{
CallbacksData *cb_data = user_data;
EmpathyFTHandler *handler = EMPATHY_FT_HANDLER (weak_object);
@@ -1008,10 +1009,10 @@ channel_get_all_properties_cb (TpProxy *proxy,
void
empathy_ft_handler_new_outgoing (EmpathyContact *contact,
- GFile *source,
- gboolean use_hash,
- EmpathyFTHandlerReadyCallback callback,
- gpointer user_data)
+ GFile *source,
+ gboolean use_hash,
+ EmpathyFTHandlerReadyCallback callback,
+ gpointer user_data)
{
EmpathyFTHandler *handler;
CallbacksData *data;
@@ -1045,8 +1046,8 @@ empathy_ft_handler_new_outgoing (EmpathyContact *contact,
void
empathy_ft_handler_new_incoming (EmpathyTpFile *tp_file,
- EmpathyFTHandlerReadyCallback callback,
- gpointer user_data)
+ EmpathyFTHandlerReadyCallback callback,
+ gpointer user_data)
{
EmpathyFTHandler *handler;
TpChannel *channel;
@@ -1111,8 +1112,8 @@ empathy_ft_handler_cancel_transfer (EmpathyFTHandler *handler)
void
empathy_ft_handler_incoming_set_destination (EmpathyFTHandler *handler,
- GFile *destination,
- gboolean use_hash)
+ GFile *destination,
+ gboolean use_hash)
{
DEBUG ("Set incoming destination, use hash %s",
use_hash ? "True" : "False");
diff --git a/libempathy/empathy-ft-handler.h b/libempathy/empathy-ft-handler.h
index 7ad2a9308..b2d51719d 100644
--- a/libempathy/empathy-ft-handler.h
+++ b/libempathy/empathy-ft-handler.h
@@ -34,15 +34,18 @@ G_BEGIN_DECLS
#define EMPATHY_TYPE_FT_HANDLER empathy_ft_handler_get_type()
#define EMPATHY_FT_HANDLER(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandler))
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandler))
#define EMPATHY_FT_HANDLER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandlerClass))
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandlerClass))
#define EMPATHY_IS_FT_HANDLER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_FT_HANDLER))
#define EMPATHY_IS_FT_HANDLER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_FT_HANDLER))
#define EMPATHY_FT_HANDLER_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandlerClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandlerClass))
typedef struct {
GObject parent;
@@ -54,20 +57,24 @@ typedef struct {
} EmpathyFTHandlerClass;
typedef void (* EmpathyFTHandlerReadyCallback) (EmpathyFTHandler *handler,
- GError *error,
- gpointer user_data);
+ GError *error,
+ gpointer user_data);
GType empathy_ft_handler_get_type (void);
/* public methods */
void empathy_ft_handler_new_outgoing (EmpathyContact *contact,
- GFile *source, gboolean use_hash, EmpathyFTHandlerReadyCallback callback,
+ GFile *source,
+ gboolean use_hash,
+ EmpathyFTHandlerReadyCallback callback,
gpointer user_data);
void empathy_ft_handler_new_incoming (EmpathyTpFile *tp_file,
- EmpathyFTHandlerReadyCallback callback, gpointer user_data);
+ EmpathyFTHandlerReadyCallback callback,
+ gpointer user_data);
void empathy_ft_handler_incoming_set_destination (EmpathyFTHandler *handler,
- GFile *destination, gboolean use_hash);
+ GFile *destination,
+ gboolean use_hash);
void empathy_ft_handler_start_transfer (EmpathyFTHandler *handler);
void empathy_ft_handler_cancel_transfer (EmpathyFTHandler *handler);
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index 61cb22e66..d9d7005e5 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -117,10 +117,10 @@ G_DEFINE_TYPE (EmpathyTpFile, empathy_tp_file, G_TYPE_OBJECT);
static void
tp_file_get_state_cb (TpProxy *proxy,
- const GValue *value,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
+ const GValue *value,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
{
EmpathyTpFilePriv *priv = GET_PRIV (weak_object);
@@ -136,10 +136,10 @@ tp_file_get_state_cb (TpProxy *proxy,
static void
tp_file_invalidated_cb (TpProxy *proxy,
- guint domain,
- gint code,
- gchar *message,
- EmpathyTpFile *tp_file)
+ guint domain,
+ gint code,
+ gchar *message,
+ EmpathyTpFile *tp_file)
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
@@ -173,7 +173,7 @@ ft_operation_close_clean (EmpathyTpFile *tp_file)
static void
ft_operation_close_with_error (EmpathyTpFile *tp_file,
- GError *error)
+ GError *error)
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
@@ -194,8 +194,8 @@ ft_operation_close_with_error (EmpathyTpFile *tp_file,
static void
splice_stream_ready_cb (GObject *source,
- GAsyncResult *res,
- gpointer user_data)
+ GAsyncResult *res,
+ gpointer user_data)
{
EmpathyTpFile *tp_file;
GError *error = NULL;
@@ -338,10 +338,10 @@ error_from_state_change_reason (TpFileTransferStateChangeReason reason)
static void
tp_file_state_changed_cb (TpChannel *proxy,
- guint state,
- guint reason,
- gpointer user_data,
- GObject *weak_object)
+ guint state,
+ guint reason,
+ gpointer user_data,
+ GObject *weak_object)
{
EmpathyTpFilePriv *priv = GET_PRIV (weak_object);
GError *error;
@@ -381,9 +381,9 @@ tp_file_state_changed_cb (TpChannel *proxy,
static void
tp_file_transferred_bytes_changed_cb (TpChannel *proxy,
- guint64 count,
- gpointer user_data,
- GObject *weak_object)
+ guint64 count,
+ gpointer user_data,
+ GObject *weak_object)
{
EmpathyTpFilePriv *priv = GET_PRIV (weak_object);
@@ -399,10 +399,10 @@ tp_file_transferred_bytes_changed_cb (TpChannel *proxy,
static void
ft_operation_provide_or_accept_file_cb (TpChannel *proxy,
- const GValue *address,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
+ const GValue *address,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
{
EmpathyTpFile *tp_file = EMPATHY_TP_FILE (weak_object);
GError *myerr = NULL;
@@ -457,8 +457,8 @@ ft_operation_provide_or_accept_file_cb (TpChannel *proxy,
static void
file_read_async_cb (GObject *source,
- GAsyncResult *res,
- gpointer user_data)
+ GAsyncResult *res,
+ gpointer user_data)
{
GValue nothing = { 0 };
EmpathyTpFile *tp_file = user_data;
@@ -485,13 +485,14 @@ file_read_async_cb (GObject *source,
tp_cli_channel_type_file_transfer_call_provide_file (
priv->channel, -1,
TP_SOCKET_ADDRESS_TYPE_UNIX, TP_SOCKET_ACCESS_CONTROL_LOCALHOST,
- &nothing, ft_operation_provide_or_accept_file_cb, NULL, NULL, G_OBJECT (tp_file));
+ &nothing, ft_operation_provide_or_accept_file_cb,
+ NULL, NULL, G_OBJECT (tp_file));
}
static void
file_replace_async_cb (GObject *source,
- GAsyncResult *res,
- gpointer user_data)
+ GAsyncResult *res,
+ gpointer user_data)
{
GValue nothing = { 0 };
EmpathyTpFile *tp_file = user_data;
@@ -524,9 +525,9 @@ file_replace_async_cb (GObject *source,
static void
channel_closed_cb (TpChannel *proxy,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
{
EmpathyTpFile *tp_file = EMPATHY_TP_FILE (weak_object);
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
@@ -541,7 +542,7 @@ channel_closed_cb (TpChannel *proxy,
static void
close_channel_internal (EmpathyTpFile *tp_file,
- gboolean cancel)
+ gboolean cancel)
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
@@ -612,9 +613,9 @@ do_finalize (GObject *object)
static void
do_get_property (GObject *object,
- guint param_id,
- GValue *value,
- GParamSpec *pspec)
+ guint param_id,
+ GValue *value,
+ GParamSpec *pspec)
{
EmpathyTpFilePriv *priv = GET_PRIV (object);
@@ -634,9 +635,9 @@ do_get_property (GObject *object,
static void
do_set_property (GObject *object,
- guint param_id,
- const GValue *value,
- GParamSpec *pspec)
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
EmpathyTpFilePriv *priv = GET_PRIV (object);
switch (param_id)
@@ -655,8 +656,8 @@ do_set_property (GObject *object,
static GObject *
do_constructor (GType type,
- guint n_props,
- GObjectConstructParam *props)
+ guint n_props,
+ GObjectConstructParam *props)
{
GObject *file_obj;
EmpathyTpFile *tp_file;
@@ -735,7 +736,8 @@ empathy_tp_file_class_init (EmpathyTpFileClass *klass)
* Return value: a new #EmpathyTpFile
*/
EmpathyTpFile *
-empathy_tp_file_new (TpChannel *channel, gboolean incoming)
+empathy_tp_file_new (TpChannel *channel,
+ gboolean incoming)
{
EmpathyTpFile *tp_file;
@@ -750,13 +752,13 @@ empathy_tp_file_new (TpChannel *channel, gboolean incoming)
void
empathy_tp_file_accept (EmpathyTpFile *tp_file,
- guint64 offset,
- GFile *gfile,
- GCancellable *cancellable,
- EmpathyTpFileProgressCallback progress_callback,
- gpointer progress_user_data,
- EmpathyTpFileOperationCallback op_callback,
- gpointer op_user_data)
+ guint64 offset,
+ GFile *gfile,
+ GCancellable *cancellable,
+ EmpathyTpFileProgressCallback progress_callback,
+ gpointer progress_user_data,
+ EmpathyTpFileOperationCallback op_callback,
+ gpointer op_user_data)
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
@@ -777,12 +779,12 @@ empathy_tp_file_accept (EmpathyTpFile *tp_file,
void
empathy_tp_file_offer (EmpathyTpFile *tp_file,
- GFile *gfile,
- GCancellable *cancellable,
- EmpathyTpFileProgressCallback progress_callback,
- gpointer progress_user_data,
- EmpathyTpFileOperationCallback op_callback,
- gpointer op_user_data)
+ GFile *gfile,
+ GCancellable *cancellable,
+ EmpathyTpFileProgressCallback progress_callback,
+ gpointer progress_user_data,
+ EmpathyTpFileOperationCallback op_callback,
+ gpointer op_user_data)
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
diff --git a/libempathy/empathy-tp-file.h b/libempathy/empathy-tp-file.h
index 612c00a44..85d693ba8 100644
--- a/libempathy/empathy-tp-file.h
+++ b/libempathy/empathy-tp-file.h
@@ -1,4 +1,3 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2007-2009 Collabora Ltd.
* Copyright (C) 2007 Marco Barisione <marco@barisione.org>
@@ -34,12 +33,17 @@ G_BEGIN_DECLS
#define EMPATHY_TP_FILE_UNKNOWN_SIZE G_MAXUINT64
-#define EMPATHY_TYPE_TP_FILE (empathy_tp_file_get_type ())
-#define EMPATHY_TP_FILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_TP_FILE, EmpathyTpFile))
-#define EMPATHY_TP_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_TP_FILE, EmpathyTpFileClass))
-#define EMPATHY_IS_TP_FILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_TP_FILE))
-#define EMPATHY_IS_TP_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_TP_FILE))
-#define EMPATHY_TP_FILE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_TP_FILE, EmpathyTpFileClass))
+#define EMPATHY_TYPE_TP_FILE (empathy_tp_file_get_type ())
+#define EMPATHY_TP_FILE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ EMPATHY_TYPE_TP_FILE, EmpathyTpFile))
+#define EMPATHY_TP_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
+ EMPATHY_TYPE_TP_FILE, EmpathyTpFileClass))
+#define EMPATHY_IS_TP_FILE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ EMPATHY_TYPE_TP_FILE))
+#define EMPATHY_IS_TP_FILE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+ EMPATHY_TYPE_TP_FILE))
+#define EMPATHY_TP_FILE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+ EMPATHY_TYPE_TP_FILE, EmpathyTpFileClass))
typedef struct _EmpathyTpFile EmpathyTpFile;
typedef struct _EmpathyTpFileClass EmpathyTpFileClass;
@@ -69,24 +73,25 @@ GType empathy_tp_file_get_type (void) G_GNUC_CONST;
/* public methods */
-EmpathyTpFile * empathy_tp_file_new (TpChannel *channel, gboolean incoming);
+EmpathyTpFile * empathy_tp_file_new (TpChannel *channel,
+ gboolean incoming);
void empathy_tp_file_accept (EmpathyTpFile *tp_file,
- guint64 offset,
- GFile *gfile,
- GCancellable *cancellable,
- EmpathyTpFileProgressCallback progress_callback,
- gpointer progress_user_data,
- EmpathyTpFileOperationCallback op_callback,
- gpointer op_user_data);
+ guint64 offset,
+ GFile *gfile,
+ GCancellable *cancellable,
+ EmpathyTpFileProgressCallback progress_callback,
+ gpointer progress_user_data,
+ EmpathyTpFileOperationCallback op_callback,
+ gpointer op_user_data);
void empathy_tp_file_offer (EmpathyTpFile *tp_file,
- GFile *gfile,
- GCancellable *cancellable,
- EmpathyTpFileProgressCallback progress_callback,
- gpointer progress_user_data,
- EmpathyTpFileOperationCallback op_callback,
- gpointer op_user_data);
+ GFile *gfile,
+ GCancellable *cancellable,
+ EmpathyTpFileProgressCallback progress_callback,
+ gpointer progress_user_data,
+ EmpathyTpFileOperationCallback op_callback,
+ gpointer op_user_data);
void empathy_tp_file_cancel (EmpathyTpFile *tp_file);
void empathy_tp_file_close (EmpathyTpFile *tp_file);