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))
EMPATHY_FT_ERROR_HASH_MISMATCH,
EMPATHY_FT_ERROR_TP_ERROR,
EMPATHY_FT_ERROR_SOCKET,
- EMPATHY_FT_ERROR_NOT_SUPPORTED
+ EMPATHY_FT_ERROR_NOT_SUPPORTED,
+ EMPATHY_FT_ERROR_INVALID_SOURCE_FILE,
+ EMPATHY_FT_ERROR_EMPTY_SOURCE_FILE
} EmpathyFTErrorEnum;
typedef struct _EmpathyTpFile EmpathyTpFile;
/* prototypes for operation callbacks */
+/**
+ * EmpathyTpFileProgressCallback:
+ * @tp_file: the #EmpathyTpFile being transferred
+ * @current_bytes: the bytes currently transferred by the operation
+ * @user_data: user data passed to the callback
+ **/
typedef void (* EmpathyTpFileProgressCallback)
(EmpathyTpFile *tp_file,
guint64 current_bytes,
gpointer user_data);
+/**
+ * EmpathyTpFileOperationCallback:
+ * @tp_file: the #EmpathyTpFile that has been transferred
+ * @error: a #GError if the operation didn't succeed, %NULL otherwise
+ * @user_data: user data passed to the callback
+ **/
typedef void (* EmpathyTpFileOperationCallback)
(EmpathyTpFile *tp_file,
const GError *error,