Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties

Tp::Client::ChannelTypeFileTransferInterface Class Reference
[Channel proxies]

#include <TelepathyQt4/Channel>

Inherits Tp::AbstractInterface.

List of all members.

Public Slots

Signals

Public Member Functions

Static Public Member Functions

Protected Member Functions

Properties


Detailed Description

Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Type.FileTransfer."


Constructor & Destructor Documentation

Tp::Client::ChannelTypeFileTransferInterface::ChannelTypeFileTransferInterface ( const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ChannelTypeFileTransferInterface associated with the given object on the session bus.

Parameters:
busName Name of the service the object is on.
objectPath Path to the object on the service.
parent Passed to the parent class constructor.
Tp::Client::ChannelTypeFileTransferInterface::ChannelTypeFileTransferInterface ( const QDBusConnection &  connection,
const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ChannelTypeFileTransferInterface associated with the given object on the given bus.

Parameters:
connection The bus via which the object can be reached.
busName Name of the service the object is on.
objectPath Path to the object on the service.
parent Passed to the parent class constructor.
Tp::Client::ChannelTypeFileTransferInterface::ChannelTypeFileTransferInterface ( Tp::DBusProxy proxy  ) 

Creates a ChannelTypeFileTransferInterface associated with the same object as the given proxy.

Parameters:
proxy The proxy to use. It will also be the QObject::parent() for this object.
Tp::Client::ChannelTypeFileTransferInterface::ChannelTypeFileTransferInterface ( const Tp::Client::ChannelInterface mainInterface  )  [explicit]

Creates a ChannelTypeFileTransferInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.

Parameters:
mainInterface The proxy to use.
Tp::Client::ChannelTypeFileTransferInterface::ChannelTypeFileTransferInterface ( const Tp::Client::ChannelInterface mainInterface,
QObject *  parent 
)

Creates a ChannelTypeFileTransferInterface associated with the same object as the given proxy. However, a different parent object can be specified.

Parameters:
mainInterface The proxy to use.
parent Passed to the parent class constructor.

Member Function Documentation

static const char* Tp::Client::ChannelTypeFileTransferInterface::staticInterfaceName (  )  [inline, static]

Returns the name of the interface "org.freedesktop.Telepathy.Channel.Type.FileTransfer", which this class represents.

Returns:
The D-Bus interface name.
TELEPATHY_QT4_DEPRECATED uint Tp::Client::ChannelTypeFileTransferInterface::State (  )  const [inline]

Getter for the remote object property "State".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyState() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyState (  )  const [inline]

Asynchronous getter for the remote object property "State" of type uint.

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

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED QString Tp::Client::ChannelTypeFileTransferInterface::ContentType (  )  const [inline]

Getter for the remote object property "ContentType".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyContentType() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyContentType (  )  const [inline]

Asynchronous getter for the remote object property "ContentType" of type QString.

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

This property is mandatory when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. Protocols which do not have a content-type property with file transfers should set this value to application/octet-stream.

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED QString Tp::Client::ChannelTypeFileTransferInterface::Filename (  )  const [inline]

Getter for the remote object property "Filename".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyFilename() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyFilename (  )  const [inline]

Asynchronous getter for the remote object property "Filename" of type QString.

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.

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 <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. This property cannot be empty and MUST be set to a sensible value.

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED qulonglong Tp::Client::ChannelTypeFileTransferInterface::Size (  )  const [inline]

Getter for the remote object property "Size".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertySize() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertySize (  )  const [inline]

Asynchronous getter for the remote object property "Size" of type qulonglong.

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.

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 <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. If this information isn't provided in the protocol, connection managers MUST set it to UINT64_MAX.

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED uint Tp::Client::ChannelTypeFileTransferInterface::ContentHashType (  )  const [inline]

Getter for the remote object property "ContentHashType".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyContentHashType() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyContentHashType (  )  const [inline]

Asynchronous getter for the remote object property "ContentHashType" of type uint.

The type of the <tp:member-ref>ContentHash</tp:member-ref> property.

This property is optional when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. However, if you wish to include the <tp:member-ref>ContentHash</tp:member-ref> property you MUST also include this property. If you omit this property from a <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method call then its value will be assumed to be File_Hash_Type_None.

For each supported hash type, implementations SHOULD include an entry in <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref> with this property fixed to that hash type. If the protocol supports offering a file without a content hash, implementations SHOULD list this property in Allowed in a requestable channel class, mapping hash types they don't understand to None.

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED QString Tp::Client::ChannelTypeFileTransferInterface::ContentHash (  )  const [inline]

Getter for the remote object property "ContentHash".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyContentHash() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyContentHash (  )  const [inline]

Asynchronous getter for the remote object property "ContentHash" of type QString.

Hash of the contents of the file transfer, of type described in the value of the <tp:member-ref>ContentHashType</tp:member-ref> property.

This property is optional when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. Its value MUST correspond to the appropriate type of the <tp:member-ref>ContentHashType</tp:member-ref> property. If the ContentHashType property is not set, or set to File_Hash_Type_None, then this property will not even be looked at.

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED QString Tp::Client::ChannelTypeFileTransferInterface::Description (  )  const [inline]

Getter for the remote object property "Description".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyDescription() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyDescription (  )  const [inline]

Asynchronous getter for the remote object property "Description" of type QString.

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

This property is optional when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. If this property was not provided by the remote party, connection managers MUST set it to the empty string.

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED qlonglong Tp::Client::ChannelTypeFileTransferInterface::Date (  )  const [inline]

Getter for the remote object property "Date".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyDate() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyDate (  )  const [inline]

Asynchronous getter for the remote object property "Date" of type qlonglong.

The last modification time of the file being transferred. This cannot change once the channel has been created

This property is optional when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method.

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED Tp::SupportedSocketMap Tp::Client::ChannelTypeFileTransferInterface::AvailableSocketTypes (  )  const [inline]

Getter for the remote object property "AvailableSocketTypes".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyAvailableSocketTypes() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyAvailableSocketTypes (  )  const [inline]

Asynchronous getter for the remote object property "AvailableSocketTypes" of type Tp::SupportedSocketMap.

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. Connection Managers MUST support at least Socket_Address_Type_IPv4.

A typical value for a host without IPv6 support:

   {
     Socket_Address_Type_IPv4:
       [Socket_Access_Control_Localhost, Socket_Access_Control_Port,
        Socket_Access_Control_Netmask],
     Socket_Address_Type_Unix:
       [Socket_Access_Control_Localhost, Socket_Access_Control_Credentials]
   }
 
Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED qulonglong Tp::Client::ChannelTypeFileTransferInterface::TransferredBytes (  )  const [inline]

Getter for the remote object property "TransferredBytes".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyTransferredBytes() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyTransferredBytes (  )  const [inline]

Asynchronous getter for the remote object property "TransferredBytes" of type qulonglong.

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

Returns:
A pending variant which will emit finished when the property has been retrieved.
TELEPATHY_QT4_DEPRECATED qulonglong Tp::Client::ChannelTypeFileTransferInterface::InitialOffset (  )  const [inline]

Getter for the remote object property "InitialOffset".

Don't use this: it blocks the main loop. Use the asynchronous requestPropertyInitialOffset() instead.

Returns:
The value of the property, or a default-constructed value if the property is not readable.
Tp::PendingVariant* Tp::Client::ChannelTypeFileTransferInterface::requestPropertyInitialOffset (  )  const [inline]

Asynchronous getter for the remote object property "InitialOffset" of type qulonglong.

The offset in bytes from where the file should be sent. This MUST be respected by both the receiver and the sender after the state becomes Open, but before any data is sent or received. Until the <tp:member-ref>InitialOffsetDefined</tp:member-ref> signal is emitted, this property is undefined.

Before setting the <tp:member-ref>State</tp:member-ref> property to Open, the connection manager MUST set the InitialOffset property, possibly to 0.

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

Returns:
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariantMap* Tp::Client::ChannelTypeFileTransferInterface::requestAllProperties (  )  const [inline]

Request all of the DBus properties on the interface.

Returns:
A pending variant map which will emit finished when the properties have been retrieved.
QDBusPendingReply<QDBusVariant> Tp::Client::ChannelTypeFileTransferInterface::AcceptFile ( uint  addressType,
uint  accessControl,
const QDBusVariant &  accessControlParam,
qulonglong  offset 
) [inline, slot]

Begins a call to the D-Bus method "AcceptFile" on the remote object.

Accept a file transfer that's in the Pending state. The file transfer's state becomes Accepted after this method is called. At this point the client can connect to the socket. CM MUST emit InitialOffsetDefined and change the state to Open before writing to the socket. Then InitialOffset should be respected in case its value differs from the offset that was specified as an argument to AcceptFile.

Parameters:
addressType The type of address the connection manager should listen on.
accessControl The type of access control the connection manager should apply to the socket.
accessControlParam A parameter for the access control type, to be interpreted as specified in the documentation for the Socket_Access_Control enum.
offset The desired offset in bytes where the file transfer should start. The offset is taken from the beginning of the file. Specifying an offset of zero will start the transfer from the beginning of the file. The offset that is actually given in the InitialOffset property can differ from this argument where the requested offset is not supported. (For example, some protocols do not support offsets at all so the InitialOffset property will always be 0.)
Returns:

The address on which the connection manager will listen for connections for this file transfer.

QDBusPendingReply<QDBusVariant> Tp::Client::ChannelTypeFileTransferInterface::ProvideFile ( uint  addressType,
uint  accessControl,
const QDBusVariant &  accessControlParam 
) [inline, slot]

Begins a call to the D-Bus method "ProvideFile" on the remote object.

Provide the file for an outgoing file transfer which has been offered. Opens a socket that the client can use to provide a file to the connection manager. The channel MUST have been requested, and will change state to Open when this method is called if its state was Accepted.

Parameters:
addressType The type of address the connection manager should listen on.
accessControl The type of access control the connection manager should apply to the socket.
accessControlParam A parameter for the access control type, to be interpreted as specified in the documentation for the Socket_Access_Control enum.
Returns:

The address on which the connection manager will listen for connections for this file transfer.

void Tp::Client::ChannelTypeFileTransferInterface::FileTransferStateChanged ( uint  state,
uint  reason 
) [signal]

Represents the signal "FileTransferStateChanged" on the remote object.

Emitted when the state of a file transfer changes.

Parameters:
state The new state of the file transfer; see the File_Transfer_State enumeration.
reason 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 cancelled.
void Tp::Client::ChannelTypeFileTransferInterface::TransferredBytesChanged ( qulonglong  count  )  [signal]

Represents the signal "TransferredBytesChanged" on the remote object.

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.

Parameters:
count The number of already transferred bytes.
void Tp::Client::ChannelTypeFileTransferInterface::InitialOffsetDefined ( qulonglong  initialOffset  )  [signal]

Represents the signal "InitialOffsetDefined" on the remote object.

Emitted when the value of the InitialOffset property has been negotiated. This signal MUST be emitted before the channel becomes Open and clients have to use this offset when transferring the file.

Parameters:
initialOffset The value of the InitialOffset property.
void Tp::Client::ChannelTypeFileTransferInterface::invalidate ( Tp::DBusProxy proxy,
const QString &  error,
const QString &  message 
) [protected, virtual]

Reimplemented from Tp::AbstractInterface.


Property Documentation

uint Tp::Client::ChannelTypeFileTransferInterface::State [read]

Represents property "State" on the remote object.

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

QString Tp::Client::ChannelTypeFileTransferInterface::ContentType [read]

Represents property "ContentType" on the remote object.

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

This property is mandatory when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. Protocols which do not have a content-type property with file transfers should set this value to application/octet-stream.

QString Tp::Client::ChannelTypeFileTransferInterface::Filename [read]

Represents property "Filename" on the remote object.

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.

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 <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. This property cannot be empty and MUST be set to a sensible value.

qulonglong Tp::Client::ChannelTypeFileTransferInterface::Size [read]

Represents property "Size" on the remote object.

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.

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 <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. If this information isn't provided in the protocol, connection managers MUST set it to UINT64_MAX.

uint Tp::Client::ChannelTypeFileTransferInterface::ContentHashType [read]

Represents property "ContentHashType" on the remote object.

The type of the <tp:member-ref>ContentHash</tp:member-ref> property.

This property is optional when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. However, if you wish to include the <tp:member-ref>ContentHash</tp:member-ref> property you MUST also include this property. If you omit this property from a <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method call then its value will be assumed to be File_Hash_Type_None.

For each supported hash type, implementations SHOULD include an entry in <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref> with this property fixed to that hash type. If the protocol supports offering a file without a content hash, implementations SHOULD list this property in Allowed in a requestable channel class, mapping hash types they don't understand to None.

QString Tp::Client::ChannelTypeFileTransferInterface::ContentHash [read]

Represents property "ContentHash" on the remote object.

Hash of the contents of the file transfer, of type described in the value of the <tp:member-ref>ContentHashType</tp:member-ref> property.

This property is optional when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. Its value MUST correspond to the appropriate type of the <tp:member-ref>ContentHashType</tp:member-ref> property. If the ContentHashType property is not set, or set to File_Hash_Type_None, then this property will not even be looked at.

QString Tp::Client::ChannelTypeFileTransferInterface::Description [read]

Represents property "Description" on the remote object.

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

This property is optional when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method. If this property was not provided by the remote party, connection managers MUST set it to the empty string.

qlonglong Tp::Client::ChannelTypeFileTransferInterface::Date [read]

Represents property "Date" on the remote object.

The last modification time of the file being transferred. This cannot change once the channel has been created

This property is optional when requesting the channel with the <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref> method.

Tp::SupportedSocketMap Tp::Client::ChannelTypeFileTransferInterface::AvailableSocketTypes [read]

Represents property "AvailableSocketTypes" on the remote object.

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. Connection Managers MUST support at least Socket_Address_Type_IPv4.

A typical value for a host without IPv6 support:

   {
     Socket_Address_Type_IPv4:
       [Socket_Access_Control_Localhost, Socket_Access_Control_Port,
        Socket_Access_Control_Netmask],
     Socket_Address_Type_Unix:
       [Socket_Access_Control_Localhost, Socket_Access_Control_Credentials]
   }
 
qulonglong Tp::Client::ChannelTypeFileTransferInterface::TransferredBytes [read]

Represents property "TransferredBytes" on the remote object.

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

qulonglong Tp::Client::ChannelTypeFileTransferInterface::InitialOffset [read]

Represents property "InitialOffset" on the remote object.

The offset in bytes from where the file should be sent. This MUST be respected by both the receiver and the sender after the state becomes Open, but before any data is sent or received. Until the <tp:member-ref>InitialOffsetDefined</tp:member-ref> signal is emitted, this property is undefined.

Before setting the <tp:member-ref>State</tp:member-ref> property to Open, the connection manager MUST set the InitialOffset property, possibly to 0.

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


Copyright © 2008-2010 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.4.4