Copyright (C) 2008 Collabora Limited

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

A channel type for files offered for transferring. The actual transmission of the data is done by reading or writing a socket, the type of socket (local Unix, IPv4, etc.) when the File channel is created.

The File channel type may be requested for handles of type HANDLE_TYPE_CONTACT.

The direction of the file transfer.

This property should become useless with the new request API.

The state of the file transfer as described by the File_Transfer_State enum.

The file's MIME type. This cannot change once the channel has been created.

This property is mandatory. Protocols which do not have a content-type property with file transfers should set this value to application/octet-stream.

The name of the file on the sender's side. This is therefore given as a suggested filename for the receiver. This cannot change once the channel has been created.

If this property is an empty string, then its value is unspecified.

The size of the file. If this property is set, then the file transfer is guaranteed to be this size. This cannot change once the channel has been created.

If this property is UINT64_MAX, then its value is unspecified.

An estimate of the size of the file. This property should be used when the protocol doesn't allow exact file sizes (For example, accurate to the nearest megabyte). This property should not be set if the Size property can, or has, been set. This cannot change once the channel has been created.

If this property is UINT64_MAX, then its value is unspecified.

MD5 digest of the file as a string of 32 ASCII hex digits, which SHOULD be lower-case if they are letters. This cannot change once the channel has been created.

If this property is an empty string, then its value is unspecified.

Description of the file transfer. This cannot change once the channel has been created.

If this property is an empty string, then its value is unspecified.

A mapping from address types (members of Socket_Address_Type) to arrays of access-control type (members of Socket_Access_Control) that the connection manager supports for sockets with that address type. For simplicity, if a CM supports offering a particular type of file transfer, it is assumed to support accepting it.

A typical value for a host that supports only Unix sockets:

          {
            Socket_Address_Type_Unix:
              [Socket_Access_Control_Localhost, Socket_Access_Control_Credentials]
            Socket_Address_Type_Abstract_Unix:
              [Socket_Access_Control_Localhost, Socket_Access_Control_Credentials]
          }
        

The number of bytes that have been transferred at the time of requesting the property. This will be updated as the file transfer continues.

Path to the UNIX socket in use.

If this is an empty string, its value is undefined.

The file transfer is incoming. The file transfer is outgoing. The file transfer is waiting to be accepted/closed locally. The file transfer is waiting to be accepted/closed remotely. The file transfer is open for traffic. The file transfer has been completed successfully. The file transfer has been canceled. No reason was specified. The file transfer was canceled by the local user. The file transfer was canceled by the remote user. The file transfer was canceled because of a local error. The file transfer was canceled because of a remote error. A Unix socket. The variant contains a byte-array, signature 'ay', containing the path of the socket. An abstract Unix socket. The variant contains a byte-array, signature 'ay', containing the path of the socket including the leading null byte. An IPv4 socket. The variant contains a Socket_Address_IPv4, i.e. a structure with signature (sq) in which the string is an IPv4 dotted-quad address literal (and must not be a DNS name), while the 16-bit unsigned integer is the port number. An IPv6 socket. The variant contains a Socket_Address_IPv6, i.e. a structure with signature (sq) in which the string is an IPv6 address literal as specified in RFC2373 (and must not be a DNS name), while the 16-bit unsigned integer is the port number. The IP or Unix socket can be accessed by any local user (e.g. a Unix socket that accepts all local connections, or an IP socket listening on 127.0.0.1 (or ::1) or rejecting connections not from that address). The associated variant must be ignored. May only be used on IP sockets. The associated variant must contain a struct Socket_Address_IPv4 (or Socket_Address_IPv6) containing the string form of an IP address of the appropriate version, and a port number. The socket can only be accessed if the connecting process has that address and port number; all other connections will be rejected. May only be used on IP sockets. The associated variant must contain a struct Socket_Netmask_IPv4 (or Socket_Netmask_IPv6) with signature (sy), containing the string form of an IP address of the appropriate version, and a prefix length "n". The socket can only be accessed if the first n bits of the connecting address match the first n bits of the given address.

The connecting process must send a single zero (NUL) byte when it first connects, which is not considered to be part of the data stream. If the operating system uses sendmsg() with SCM_CREDS or SCM_CREDENTIALS to pass credentials over sockets, the connecting process must do so if possible; if not, it must still send the byte.

The listening process will disconnect the connection unless it can determine by OS-specific means that the connecting process has the same user ID as the listening process.

The associated variant must be ignored.

The supported socket address and access-control types for tubes. See GetAvailableStreamTubeTypes. Accept a file transfer that's in the "local pending" state. The file transfer becomes open after this method is called. The type of address the connection manager should listen on. The type of access control the connection manager should apply to the socket. A parameter for the access control type, to be interpreted as specified in the documentation for the Socket_Access_Control enum. The address on which the connection manager will listen for connections for this file transfer. The given address type or access-control mechanism is not supported. The file transfer is not in the "local pending" state, which is the only state this method makes sense. Emitted when the state of a file transfer changes. The new state of the file transfer; see the File_Transfer_State enumeration. The reason for the state change; see the File_Transfer_State_Change_Reason enumeration. The value will always be File_Transfer_State_Change_Reason_None, except when changing state to canceled. Emitted when the number of transferred bytes changes. This will not change with every single byte change. Instead, the most frequent this signal will be emmitted is once a second. This should be sufficient, and the TransferredBytes property should not be polled. The number of already transferred bytes.