TpFileTransferChannel

TpFileTransferChannel — proxy object for a file transfer channel

Synopsis

#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);

Object Hierarchy

  GObject
   +----TpProxy
         +----TpChannel
               +----TpFileTransferChannel

Implemented Interfaces

TpFileTransferChannel implements TpChannelIface.

Properties

  "date"                     GDateTime*            : Read
  "description"              gchar*                : Read
  "filename"                 gchar*                : Read
  "mime-type"                gchar*                : Read
  "size"                     guint64               : Read
  "transferred-bytes"        guint64               : Read

Description

TpFileTransferChannel is a sub-class of TpChannel providing convenient API to send and receive files.

Details

struct TpFileTransferChannel

struct TpFileTransferChannel;

Data structure representing a TpFileTransferChannel.

Since 0.15.5


struct TpFileTransferChannelClass

struct TpFileTransferChannelClass {
};

The class of a TpFileTransferChannel.

Since 0.15.5


tp_file_transfer_channel_new ()

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

conn :

a TpConnection; may not be NULL

object_path :

the object path of the channel; may not be NULL

immutable_properties :

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]

error :

used to indicate the error if NULL is returned

Returns :

a newly created TpFileTransferChannel. [transfer full]

Since 0.15.5


TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE

#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


tp_file_transfer_channel_get_mime_type ()

const char *        tp_file_transfer_channel_get_mime_type
                                                        (TpFileTransferChannel *self);

Return the "mime-type" property

self :

a TpFileTransferChannel

Returns :

the value of the "mime-type" property. [transfer none]

Since 0.15.5


tp_file_transfer_channel_get_date ()

GDateTime *         tp_file_transfer_channel_get_date   (TpFileTransferChannel *self);

Return the "date" property

self :

a TpFileTransferChannel

Returns :

the value of the "date" property. [transfer none]

Since 0.15.5


tp_file_transfer_channel_get_description ()

const gchar *       tp_file_transfer_channel_get_description
                                                        (TpFileTransferChannel *self);

Return the "description" property

self :

a TpFileTransferChannel

Returns :

the value of the "description" property. [transfer none]

Since 0.15.5


tp_file_transfer_channel_get_filename ()

const gchar *       tp_file_transfer_channel_get_filename
                                                        (TpFileTransferChannel *self);

Return the "filename" property

self :

a TpFileTransferChannel

Returns :

the value of the "filename" property. [transfer none]

Since 0.15.5


tp_file_transfer_channel_get_size ()

guint64             tp_file_transfer_channel_get_size   (TpFileTransferChannel *self);

Return the "size" property

self :

a TpFileTransferChannel

Returns :

the value of the "size" property

Since 0.15.5


tp_file_transfer_channel_get_transferred_bytes ()

guint64             tp_file_transfer_channel_get_transferred_bytes
                                                        (TpFileTransferChannel *self);

Return the "transferred-bytes" property

self :

a TpFileTransferChannel

Returns :

the value of the "transferred-bytes" property

Since 0.15.5

Property Details

The "date" property

  "date"                     GDateTime*            : Read

A GDateTime representing the last modification time of the file to be transferred.

Since 0.15.5


The "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


The "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


The "mime-type" property

  "mime-type"                gchar*                : Read

The MIME type of the file to be transferred.

Default value: NULL

Since 0.15.5


The "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


The "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