|  |  |  | libempathy Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
#include <libempthy/empathy-tp-file.h> #define EMPATHY_TP_FILE_UNKNOWN_SIZE EmpathyTpFilePriv; EmpathyTpFile; EmpathyTpFile * empathy_tp_file_new (TpChannel *channel); TpChannel * empathy_tp_file_get_channel (EmpathyTpFile *tp_file); void empathy_tp_file_accept (EmpathyTpFile *tp_file, guint64 offset, GFile *gfile, GError **error); void empathy_tp_file_cancel (EmpathyTpFile *tp_file); void empathy_tp_file_close (EmpathyTpFile *tp_file); void empathy_tp_file_offer (EmpathyTpFile *tp_file, GFile *gfile, GError **error); EmpathyContact * empathy_tp_file_get_contact (EmpathyTpFile *tp_file); const gchar * empathy_tp_file_get_filename (EmpathyTpFile *tp_file); gboolean empathy_tp_file_is_incoming (EmpathyTpFile *tp_file); TpFileTransferState empathy_tp_file_get_state (EmpathyTpFile *tp_file, TpFileTransferStateChangeReason *reason); guint64 empathy_tp_file_get_size (EmpathyTpFile *tp_file); guint64 empathy_tp_file_get_transferred_bytes (EmpathyTpFile *tp_file); gint empathy_tp_file_get_remaining_time (EmpathyTpFile *tp_file); const gchar * empathy_tp_file_get_content_type (EmpathyTpFile *tp_file);
"channel" TpChannel* : Read / Write / Construct Only "content-hash" gchar* : Read / Write "content-hash-type" guint : Read / Write "content-type" gchar* : Read / Write "filename" gchar* : Read / Write "incoming" gboolean : Read / Write / Construct "size" guint64 : Read / Write "state" guint : Read / Write / Construct "transferred-bytes" guint64 : Read / Write
#define EMPATHY_TP_FILE_UNKNOWN_SIZE G_MAXUINT64
Value used for the "size" or "estimated-size" properties when the size of the transferred file is unknown.
EmpathyTpFile * empathy_tp_file_new (TpChannel *channel);
Creates a new EmpathyTpFile wrapping channel, or return a new ref to an
existing EmpathyTpFile for that channel.
| 
 | a Telepathy channel | 
| Returns : | a new EmpathyTpFile | 
TpChannel * empathy_tp_file_get_channel (EmpathyTpFile *tp_file);
Returns the Telepathy file transfer channel
| 
 | an EmpathyTpFile | 
| Returns : | the TpChannel | 
void empathy_tp_file_accept (EmpathyTpFile *tp_file, guint64 offset, GFile *gfile, GError **error);
Accepts a file transfer that's in the "local pending" state (i.e. TP_FILE_TRANSFER_STATE_LOCAL_PENDING).
| 
 | an EmpathyTpFile | 
| 
 | position where to start the transfer | 
| 
 | a GFile where to write transfered data | 
| 
 | a GError set if there is an error when opening gfile | 
void empathy_tp_file_offer (EmpathyTpFile *tp_file, GFile *gfile, GError **error);
Offers a file transfer that's in the "not offered" state (i.e. TP_FILE_TRANSFER_STATE_NOT_OFFERED).
| 
 | an EmpathyTpFile | 
| 
 | a GFile where to read the data to transfer | 
| 
 | a GError set if there is an error when opening gfile | 
EmpathyContact * empathy_tp_file_get_contact (EmpathyTpFile *tp_file);
| 
 | |
| Returns : | 
const gchar * empathy_tp_file_get_filename (EmpathyTpFile *tp_file);
| 
 | |
| Returns : | 
gboolean empathy_tp_file_is_incoming (EmpathyTpFile *tp_file);
| 
 | |
| Returns : | 
TpFileTransferState empathy_tp_file_get_state (EmpathyTpFile *tp_file, TpFileTransferStateChangeReason *reason);
| 
 | |
| 
 | |
| Returns : | 
guint64 empathy_tp_file_get_size (EmpathyTpFile *tp_file);
| 
 | |
| Returns : | 
guint64 empathy_tp_file_get_transferred_bytes (EmpathyTpFile *tp_file);
| 
 | |
| Returns : | 
gint empathy_tp_file_get_remaining_time (EmpathyTpFile *tp_file);
| 
 | |
| Returns : | 
const gchar * empathy_tp_file_get_content_type (EmpathyTpFile *tp_file);
| 
 | |
| Returns : | 
"channel" property"channel" TpChannel* : Read / Write / Construct Only
The file transfer channel.
"content-hash" property"content-hash" gchar* : Read / Write
The hash of the transfer's contents.
Default value: ""
"content-hash-type" property"content-hash-type" guint : Read / Write
The type of the file transfer hash.
Default value: 0
"content-type" property"content-type" gchar* : Read / Write
The file transfer content-type.
Default value: ""
"filename" property"filename" gchar* : Read / Write
The file transfer filename.
Default value: ""
"incoming" property"incoming" gboolean : Read / Write / Construct
Whether the transfer is incoming.
Default value: FALSE
"size" property"size" guint64 : Read / Write
The file transfer size.
Default value: 18446744073709551615
"state" property"state" guint : Read / Write / Construct
The file transfer state.
Default value: 4294967295
"transferred-bytes" property"transferred-bytes" guint64 : Read / Write
The number of bytes transferred.
Default value: 0