*
* Author: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
*/
-
+
/* empathy-ft-handler.c */
#include <glib.h>
* will be emitted before or after the transfer, depending on the direction
* (respectively outgoing and incoming) of the handler.
* At any time between the call to empathy_ft_handler_start_transfer() and
- * the last signal, a ::transfer-error can be emitted, indicating that an
+ * the last signal, a ::transfer-error can be emitted, indicating that an
* error has happened in the operation. The message of the error is localized
* to use in an UI.
*/
static void
do_set_property (GObject *object,
- guint property_id,
+ guint property_id,
const GValue *value,
GParamSpec *pspec)
{
g_object_unref (priv->dispatcher);
priv->dispatcher = NULL;
}
-
+
G_OBJECT_CLASS (empathy_ft_handler_parent_class)->dispose (object);
}
* to be completed
* @speed: the current speed of the transfer (in KB/s)
*
- * This signal is emitted to notify clients of the progress of the
+ * This signal is emitted to notify clients of the progress of the
* transfer.
*/
signals[TRANSFER_PROGRESS] =
* @current_bytes: the bytes currently hashed
* @total_bytes: the total bytes of the handler
*
- * This signal is emitted to notify clients of the progress of the
- * hashing operation.
+ * This signal is emitted to notify clients of the progress of the
+ * hashing operation.
*/
signals[HASHING_PROGRESS] =
g_signal_new ("hashing-progress", G_TYPE_FROM_CLASS (klass),
{
emit_error_signal (handler, error);
}
- else
+ else
{
priv->is_completed = TRUE;
g_signal_emit (handler, signals[TRANSFER_DONE], 0, tp_file);
value = tp_g_value_slice_new_string
(g_checksum_get_string (hash_data->checksum));
g_hash_table_insert (priv->request,
- TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentHash", value);
+ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentHash", value);
}
cleanup:
static void
ft_handler_complete_request (EmpathyFTHandler *handler)
-{
+{
EmpathyFTHandlerPriv *priv = GET_PRIV (handler);
TpConnection *connection;
callbacks_data_free (cb_data);
}
-static void
+static void
contact_factory_contact_cb (EmpathyTpContactFactory *factory,
EmpathyContact *contact,
const GError *error,
if (priv->tpfile == NULL)
return FALSE;
- return empathy_tp_file_is_incoming (priv->tpfile);
+ return empathy_tp_file_is_incoming (priv->tpfile);
}
/**
* Returns whether the transfer for @handler has been cancelled or has stopped
* due to an error.
*
- * Return value: %TRUE if the transfer for @handler has been cancelled
+ * Return value: %TRUE if the transfer for @handler has been cancelled
* or has stopped due to an error, %FALSE otherwise.
*/
gboolean
error_from_state_change_reason (TpFileTransferStateChangeReason reason)
{
const char *string;
- GError *retval;
+ GError *retval = NULL;
string = NULL;
GObject *weak_object)
{
EmpathyTpFilePriv *priv = GET_PRIV (weak_object);
- GError *error;
+ GError *error = NULL;
if (state == priv->state)
return;
if (priv->cancellable != NULL &&
!g_cancellable_is_cancelled (priv->cancellable) && cancel)
- g_cancellable_cancel (priv->cancellable);
+ g_cancellable_cancel (priv->cancellable);
}
static void
file_obj = G_OBJECT_CLASS (empathy_tp_file_parent_class)->constructor (type,
n_props, props);
-
+
tp_file = EMPATHY_TP_FILE (file_obj);
priv = GET_PRIV (tp_file);
EmpathyTpFilePriv *priv;
g_return_val_if_fail (EMPATHY_IS_TP_FILE (tp_file), FALSE);
-
+
priv = GET_PRIV (tp_file);
return priv->incoming;