## File Transfer channels

File Transfer channels — service-side interface for the File Transfer channel type

## Synopsis

    #include <telepathy-glib/telepathy-glib-dbus.h>

                        TpSvcChannelTypeFileTransfer;
                        TpSvcChannelTypeFileTransferClass;
    void                (*tp_svc_channel_type_file_transfer_accept_file_impl)
                                                            (TpSvcChannelTypeFileTransfer *self,
                                                             guint in_Address_Type,
                                                             guint in_Access_Control,
                                                             const GValue *in_Access_Control_Param,
                                                             guint64 in_Offset,
                                                             DBusGMethodInvocation *context);
    void                tp_svc_channel_type_file_transfer_emit_file_transfer_state_changed
                                                            (gpointer instance,
                                                             guint arg_State,
                                                             guint arg_Reason);
    void                tp_svc_channel_type_file_transfer_emit_initial_offset_defined
                                                            (gpointer instance,
                                                             guint64 arg_InitialOffset);
    void                tp_svc_channel_type_file_transfer_emit_transferred_bytes_changed
                                                            (gpointer instance,
                                                             guint64 arg_Count);
    void                tp_svc_channel_type_file_transfer_emit_uri_defined
                                                            (gpointer instance,
                                                             const gchar *arg_URI);
    void                tp_svc_channel_type_file_transfer_implement_accept_file
                                                            (TpSvcChannelTypeFileTransferClass *klass,
                                                             tp_svc_channel_type_file_transfer_accept_file_impl impl);
    void                tp_svc_channel_type_file_transfer_implement_provide_file
                                                            (TpSvcChannelTypeFileTransferClass *klass,
                                                             tp_svc_channel_type_file_transfer_provide_file_impl impl);
    void                (*tp_svc_channel_type_file_transfer_provide_file_impl)
                                                            (TpSvcChannelTypeFileTransfer *self,
                                                             guint in_Address_Type,
                                                             guint in_Access_Control,
                                                             const GValue *in_Access_Control_Param,
                                                             DBusGMethodInvocation *context);
    void                tp_svc_channel_type_file_transfer_return_from_accept_file
                                                            (DBusGMethodInvocation *context,
                                                             const GValue *out_Address);
    void                tp_svc_channel_type_file_transfer_return_from_provide_file
                                                            (DBusGMethodInvocation *context,
                                                             const GValue *out_Address);

## Object Hierarchy

      GInterface
       +----TpSvcChannelTypeFileTransfer

## Signals

      "file-transfer-state-changed"                    : Has Details
      "initial-offset-defined"                         : Has Details
      "transferred-bytes-changed"                      : Has Details
      "u-ri-defined"                                   : Has Details

## Description

This section documents the auto-generated GInterface used to implement the File Transfer channel type.

## Details

### TpSvcChannelTypeFileTransfer

    typedef struct _TpSvcChannelTypeFileTransfer TpSvcChannelTypeFileTransfer;

Dummy typedef representing any implementation of this interface.

### TpSvcChannelTypeFileTransferClass

    typedef struct _TpSvcChannelTypeFileTransferClass TpSvcChannelTypeFileTransferClass;

The class of TpSvcChannelTypeFileTransfer.

In a full implementation of this interface (i.e. all methods implemented), the interface initialization function used in `G_IMPLEMENT_INTERFACE()` would typically look like this:

    static void
    implement_channel_type_file_transfer (gpointer klass,
        gpointer unused G_GNUC_UNUSED)
    {
    #define IMPLEMENT(x) tp_svc_channel_type_file_transfer_implement_##x (\
      klass, my_object_##x)
      IMPLEMENT (accept_file);
      IMPLEMENT (provide_file);
    #undef IMPLEMENT
    }

### tp_svc_channel_type_file_transfer_accept_file_impl ()

    void                (*tp_svc_channel_type_file_transfer_accept_file_impl)
                                                            (TpSvcChannelTypeFileTransfer *self,
                                                             guint in_Address_Type,
                                                             guint in_Access_Control,
                                                             const GValue *in_Access_Control_Param,
                                                             guint64 in_Offset,
                                                             DBusGMethodInvocation *context);

The signature of an implementation of the D-Bus method AcceptFile on interface org.freedesktop.Telepathy.Channel.Type.FileTransfer.

`self` : | The object implementing this interface
`in_Address_Type` : | guint (FIXME, generate documentation)
`in_Access_Control` : | guint (FIXME, generate documentation)
`in_Access_Control_Param` : | const GValue * (FIXME, generate documentation)
`in_Offset` : | guint64 (FIXME, generate documentation)
`context` : | Used to return values or throw an error

### tp_svc_channel_type_file_transfer_emit_file_transfer_state_changed ()

    void                tp_svc_channel_type_file_transfer_emit_file_transfer_state_changed
                                                            (gpointer instance,
                                                             guint arg_State,
                                                             guint arg_Reason);

Type-safe wrapper around g_signal_emit to emit the FileTransferStateChanged signal on interface org.freedesktop.Telepathy.Channel.Type.FileTransfer.

`instance` : | The object implementing this interface
`arg_State` : | guint (FIXME, generate documentation)
`arg_Reason` : | guint (FIXME, generate documentation)

### tp_svc_channel_type_file_transfer_emit_initial_offset_defined ()

    void                tp_svc_channel_type_file_transfer_emit_initial_offset_defined
                                                            (gpointer instance,
                                                             guint64 arg_InitialOffset);

Type-safe wrapper around g_signal_emit to emit the InitialOffsetDefined signal on interface org.freedesktop.Telepathy.Channel.Type.FileTransfer.

`instance` : | The object implementing this interface
`arg_InitialOffset` : | guint64 (FIXME, generate documentation)

### tp_svc_channel_type_file_transfer_emit_transferred_bytes_changed ()

    void                tp_svc_channel_type_file_transfer_emit_transferred_bytes_changed
                                                            (gpointer instance,
                                                             guint64 arg_Count);

Type-safe wrapper around g_signal_emit to emit the TransferredBytesChanged signal on interface org.freedesktop.Telepathy.Channel.Type.FileTransfer.

`instance` : | The object implementing this interface
`arg_Count` : | guint64 (FIXME, generate documentation)

### tp_svc_channel_type_file_transfer_emit_uri_defined ()

    void                tp_svc_channel_type_file_transfer_emit_uri_defined
                                                            (gpointer instance,
                                                             const gchar *arg_URI);

Type-safe wrapper around g_signal_emit to emit the URIDefined signal on interface org.freedesktop.Telepathy.Channel.Type.FileTransfer.

`instance` : | The object implementing this interface
`arg_URI` : | const gchar * (FIXME, generate documentation)

### tp_svc_channel_type_file_transfer_implement_accept_file ()

    void                tp_svc_channel_type_file_transfer_implement_accept_file
                                                            (TpSvcChannelTypeFileTransferClass *klass,
                                                             tp_svc_channel_type_file_transfer_accept_file_impl impl);

Register an implementation for the AcceptFile method in the vtable of an implementation of this interface. To be called from the interface init function.

`klass` : | A class whose instances implement this interface
`impl` : | A callback used to implement the AcceptFile D-Bus method

### tp_svc_channel_type_file_transfer_implement_provide_file ()

    void                tp_svc_channel_type_file_transfer_implement_provide_file
                                                            (TpSvcChannelTypeFileTransferClass *klass,
                                                             tp_svc_channel_type_file_transfer_provide_file_impl impl);

Register an implementation for the ProvideFile method in the vtable of an implementation of this interface. To be called from the interface init function.

`klass` : | A class whose instances implement this interface
`impl` : | A callback used to implement the ProvideFile D-Bus method

### tp_svc_channel_type_file_transfer_provide_file_impl ()

    void                (*tp_svc_channel_type_file_transfer_provide_file_impl)
                                                            (TpSvcChannelTypeFileTransfer *self,
                                                             guint in_Address_Type,
                                                             guint in_Access_Control,
                                                             const GValue *in_Access_Control_Param,
                                                             DBusGMethodInvocation *context);

The signature of an implementation of the D-Bus method ProvideFile on interface org.freedesktop.Telepathy.Channel.Type.FileTransfer.

`self` : | The object implementing this interface
`in_Address_Type` : | guint (FIXME, generate documentation)
`in_Access_Control` : | guint (FIXME, generate documentation)
`in_Access_Control_Param` : | const GValue * (FIXME, generate documentation)
`context` : | Used to return values or throw an error

### tp_svc_channel_type_file_transfer_return_from_accept_file ()

    void                tp_svc_channel_type_file_transfer_return_from_accept_file
                                                            (DBusGMethodInvocation *context,
                                                             const GValue *out_Address);

Return successfully by calling `dbus_g_method_return()`. This inline function exists only to provide type-safety.

`context` : | The D-Bus method invocation context
`out_Address` : | const GValue * (FIXME, generate documentation)

### tp_svc_channel_type_file_transfer_return_from_provide_file ()

    void                tp_svc_channel_type_file_transfer_return_from_provide_file
                                                            (DBusGMethodInvocation *context,
                                                             const GValue *out_Address);

Return successfully by calling `dbus_g_method_return()`. This inline function exists only to provide type-safety.

`context` : | The D-Bus method invocation context
`out_Address` : | const GValue * (FIXME, generate documentation)

## Signal Details

### The `"file-transfer-state-changed"` signal

    void                user_function                      (TpSvcChannelTypeFileTransfer *self,
                                                            guint                         arg_State,
                                                            guint                         arg_Reason,
                                                            gpointer                      user_data)       : Has Details

The FileTransferStateChanged D-Bus signal is emitted whenever this GObject signal is.

`self` : | an object
`arg_State` : | guint (FIXME, generate documentation)
`arg_Reason` : | guint (FIXME, generate documentation)
`user_data` : | user data set when the signal handler was connected.

### The `"initial-offset-defined"` signal

    void                user_function                      (TpSvcChannelTypeFileTransfer *self,
                                                            guint64                       arg_InitialOffset,
                                                            gpointer                      user_data)              : Has Details

The InitialOffsetDefined D-Bus signal is emitted whenever this GObject signal is.

`self` : | an object
`arg_InitialOffset` : | guint64 (FIXME, generate documentation)
`user_data` : | user data set when the signal handler was connected.

### The `"transferred-bytes-changed"` signal

    void                user_function                      (TpSvcChannelTypeFileTransfer *self,
                                                            guint64                       arg_Count,
                                                            gpointer                      user_data)      : Has Details

The TransferredBytesChanged D-Bus signal is emitted whenever this GObject signal is.

`self` : | an object
`arg_Count` : | guint64 (FIXME, generate documentation)
`user_data` : | user data set when the signal handler was connected.

### The `"u-ri-defined"` signal

    void                user_function                      (TpSvcChannelTypeFileTransfer *self,
                                                            gchar                        *arg_URI,
                                                            gpointer                      user_data)      : Has Details

The URIDefined D-Bus signal is emitted whenever this GObject signal is.

`self` : | an object
`arg_URI` : | const gchar * (FIXME, generate documentation)
`user_data` : | user data set when the signal handler was connected.