From e35dcf1f68a4e39d671d765a45698428a4b90acc Mon Sep 17 00:00:00 2001 From: xclaesse Date: Fri, 21 Nov 2008 16:16:25 +0000 Subject: Updated Channel.Type.File spec. (Jonny Lamb) Signed-off-by: Jonny Lamb git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1778 4ee84921-47dd-4033-b63a-18d7a039a3e4 --- extensions/Channel_Type_File.xml | 274 +++++++++++++++++++++------------------ 1 file changed, 146 insertions(+), 128 deletions(-) diff --git a/extensions/Channel_Type_File.xml b/extensions/Channel_Type_File.xml index 1377a9b9e..b8717ad04 100644 --- a/extensions/Channel_Type_File.xml +++ b/extensions/Channel_Type_File.xml @@ -27,21 +27,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -

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

- +

The Telepathy client should connect to the socket or address that + the connection manager has set up and provided back to the clients + through the two methods.

- - -

The direction of the file transfer.

+

If something goes wrong with the transfer, you should call Close + on the channel.

-

This property should become useless with the new request API.

-
-
+

The File channel type may be requested for handles of type + HANDLE_TYPE_CONTACT. If the channel is requested for any other + handle type then the behviour is undefined.

+ + access="read">

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

@@ -53,7 +52,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.The file's MIME type. This cannot change once the channel has been created.

-

This property is mandatory. Protocols which do not have a +

This property is mandatory when requesting the channel with the + CreateChannels requests method. Protocols which do not have a content-type property with file transfers should set this value to application/octet-stream.

@@ -65,7 +65,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -

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

+

This property should be the basename of the file being sent. For example, + if the sender sends the file /home/user/monkey.pdf then this property should + be set to monkey.pdf.

+ +

This property is mandatory when requesting the channel with the + CreateChannels requests method. This property cannot be empty and + must be set to a sensible value.

@@ -75,29 +81,41 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -

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

+

When you are creating a channel with this property, its value + MUST be accurate and in bytes. However, when receiving a file, this + property still must be in bytes but might not be entirely accurate + to the byte.

+ +

This property is mandatory when requesting the channel with the + CreateChannels requests method. 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.

+

The type of the ContentHash property from values of the + File_Hash_Type enum.

+ +

This property is optional when requesting the channel with the + CreateChannels requests method. However, if you wish to include the + ContentHash property you MUST also include this property. If you + omit this property from a CreateChannels method call then its value + will be assumed to be File_Hash_Type_None.

- + -

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.

+

Hash of the contents of the file transfer, of type described + in the value of the ContentHashType property.

+ +

This property is optional when requesting the channel with the + CreateChannels requests method. Its value MUST correspond to the + appropriate type of the ContentHashType property. If the + ContentHashType property is not set, or set to File_Hash_Type_None, + then this property will not even be looked at.

@@ -106,7 +124,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.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.

+

This property is optional when requesting the channel with the + CreateChannel requests method. If this property is an empty string, + then its value is unspecified.

@@ -141,56 +161,68 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- + -

Path to the UNIX socket in use.

+

The offset from the beginning of the file that the transfer should + start from. This should be checked by the receiver after the transfer + changes state from Accepted to Open.

+ +

Before setting the State property to Open, the connection manager + MUST set the InitialOffset property. If there is no offset then this + value MUST be set to 0.

-

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

+

This property MUST NOT change after the state of the transfer has + changed to Open.

- - + + - The file transfer is incoming. + The file transfer is currently not set up correctly. - + - The file transfer is outgoing. + The file transfer is waiting for the local user to offer the file + as a transfer. - - - - + + + The file transfer has been accepted locally, but not currently open. + The transfer should now wait for the state to change to open and + check the offset value. + + + 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. @@ -218,106 +250,92 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - - + + - A Unix socket. The variant contains a byte-array, signature 'ay', - containing the path of the socket. + No hash. - - + - An abstract Unix socket. The variant contains a byte-array, - signature 'ay', containing the path of the socket including the - leading null byte. + MD5 digest as a string of 32 ASCII hex digits, which SHOULD be + lower-case if they are letters. - - + - 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. + SHA1 digest as a string of ASCII hex digits, which SHOULD be + lower-case if they are letters. - - + - 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. + SHA1 digest as a string of ASCII hex digits, which SHOULD be + lower-case if they are letters. - - - - + + + Accept a file transfer that's in the "local pending" state. The file + transfer's state becomes accepted after this method is called. At this + point, the receiver must wait for the state to change to open. When this + happens, the InitialOffset property should be read to find from where the + file is actually being sent. + + - 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. + The type of address the connection manager should listen on. - - + + + + The type of access control the connection manager should apply to + the socket. + + + - 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. + A parameter for the access control type, to be interpreted as + specified in the documentation for the Socket_Access_Control enum. - - + + - 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 offset in bytes of wthere the file tranfer should start from. + The offset is taken from the beginning of the file. Values of zero + will start the transfer from the beginning of the file. - - - -

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 address on which the connection manager will listen for + connections for this file transfer. -
-
+ - - - The supported socket address and access-control types - for tubes. See GetAvailableStreamTubeTypes. - - - + + + + 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. + + + + - + - Accept a file transfer that's in the "local pending" state. The file - transfer becomes open after this method is called. + Offer a file transfer that's in the "not offered" state. The file transfer + becomes remote pending after this method is called. @@ -353,8 +371,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - The file transfer is not in the "local pending" state, which is the only - state this method makes sense. + The file transfer is not in the "not offered" state, or there isn't + enough information for the transfer to start. @@ -381,10 +399,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - 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. + Emitted when the number of transferred bytes changes. This will not be + signalled with every single byte change. Instead, the most frequent + this signal will be emitted is once a second. This should be + sufficient, and the TransferredBytes property should not be polled. -- cgit v1.2.3