![]() |
![]() |
![]() |
telepathy-glib API Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
#include <telepathy-glib/telepathy-glib.h> struct TpFileTransferChannel; struct TpFileTransferChannelClass; TpFileTransferChannel * tp_file_transfer_channel_new (TpConnection *conn
,const gchar *object_path
,const GHashTable *immutable_properties
,GError **error
); #define TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE const char * tp_file_transfer_channel_get_mime_type (TpFileTransferChannel *self
); GDateTime * tp_file_transfer_channel_get_date (TpFileTransferChannel *self
); const gchar * tp_file_transfer_channel_get_description (TpFileTransferChannel *self
); const gchar * tp_file_transfer_channel_get_filename (TpFileTransferChannel *self
); guint64 tp_file_transfer_channel_get_size (TpFileTransferChannel *self
); guint64 tp_file_transfer_channel_get_transferred_bytes (TpFileTransferChannel *self
);
"date" GDateTime* : Read "description" gchar* : Read "filename" gchar* : Read "mime-type" gchar* : Read "size" guint64 : Read "transferred-bytes" guint64 : Read
TpFileTransferChannel is a sub-class of TpChannel providing convenient API to send and receive files.
struct TpFileTransferChannel;
Data structure representing a TpFileTransferChannel.
Since 0.15.5
struct TpFileTransferChannelClass { };
The class of a TpFileTransferChannel.
Since 0.15.5
TpFileTransferChannel * tp_file_transfer_channel_new (TpConnection *conn
,const gchar *object_path
,const GHashTable *immutable_properties
,GError **error
);
Convenient function to create a new TpFileTransferChannel
|
a TpConnection; may not be NULL
|
|
the object path of the channel; may not be NULL
|
|
the immutable properties of the channel, as signalled by the NewChannel D-Bus signal or returned by the CreateChannel and EnsureChannel D-Bus methods: a mapping from strings (D-Bus interface name + "." + property name) to GValue instances. [transfer none][element-type utf8 GObject.Value] |
|
used to indicate the error if NULL is returned |
Returns : |
a newly created TpFileTransferChannel. [transfer full] |
Since 0.15.5
#define TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE
Expands to a call to a function that returns a quark for the "core" feature on a TpFileTransferChannel.
When this feature is prepared, the "transferred-bytes" property has been retrieved and will be updated.
One can ask for a feature to be prepared using the tp_proxy_prepare_async()
function, and waiting for it to trigger the callback.
Since 0.15.5
const char * tp_file_transfer_channel_get_mime_type
(TpFileTransferChannel *self
);
Return the "mime-type" property
|
a TpFileTransferChannel |
Returns : |
the value of the "mime-type" property. [transfer none] |
Since 0.15.5
GDateTime * tp_file_transfer_channel_get_date (TpFileTransferChannel *self
);
Return the "date" property
|
a TpFileTransferChannel |
Returns : |
the value of the "date" property. [transfer none] |
Since 0.15.5
const gchar * tp_file_transfer_channel_get_description
(TpFileTransferChannel *self
);
Return the "description" property
|
a TpFileTransferChannel |
Returns : |
the value of the "description" property. [transfer none] |
Since 0.15.5
const gchar * tp_file_transfer_channel_get_filename
(TpFileTransferChannel *self
);
Return the "filename" property
|
a TpFileTransferChannel |
Returns : |
the value of the "filename" property. [transfer none] |
Since 0.15.5
guint64 tp_file_transfer_channel_get_size (TpFileTransferChannel *self
);
Return the "size" property
|
a TpFileTransferChannel |
Returns : |
the value of the "size" property |
Since 0.15.5
guint64 tp_file_transfer_channel_get_transferred_bytes
(TpFileTransferChannel *self
);
Return the "transferred-bytes" property
|
a TpFileTransferChannel |
Returns : |
the value of the "transferred-bytes" property |
Since 0.15.5
"date"
property"date" GDateTime* : Read
A GDateTime representing the last modification time of the file to be transferred.
Since 0.15.5
"description"
property"description" gchar* : Read
The description of the file transfer, defined by the sender when offering the file.
Since 0.15.5
Default value: NULL
"filename"
property"filename" gchar* : Read
The name of the file on the sender's side. This is therefore given as a suggested filename for the receiver.
Since 0.15.5
Default value: NULL
"mime-type"
property"mime-type" gchar* : Read
The MIME type of the file to be transferred.
Default value: NULL
Since 0.15.5
"size"
property"size" guint64 : Read
The size of the file to be transferred,
or G_MAXUINT64
if not known.
Since 0.15.5
Default value: 0
"transferred-bytes"
property"transferred-bytes" guint64 : Read
The number of bytes transferred so far in this file transfer.
The TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE
feature has to be prepared for
this property to be meaningful and kept up to date.
Default value: 0
Since 0.15.5