Home · All Classes · All Namespaces · Modules · Functions · Files |
The IncomingFileTransferChannel class represents a Telepathy channel of type FileTransfer for incoming file transfers. More...
#include <TelepathyQt4/IncomingFileTransferChannel>
Inherits Tp::FileTransferChannel.
The IncomingFileTransferChannel class represents a Telepathy channel of type FileTransfer for incoming file transfers.
For more details, please refer to Telepathy specification.
See Asynchronous Object Model, Shared Pointer Usage
Tp::IncomingFileTransferChannel::~IncomingFileTransferChannel | ( | ) | [virtual] |
Class destructor.
Tp::IncomingFileTransferChannel::IncomingFileTransferChannel | ( | const ConnectionPtr & | connection, | |
const QString & | objectPath, | |||
const QVariantMap & | immutableProperties, | |||
const Feature & | coreFeature = IncomingFileTransferChannel::FeatureCore |
|||
) | [protected] |
Construct a new IncomingFileTransferChannel object.
connection | Connection owning this channel, and specifying the service. | |
objectPath | The channel object path. | |
immutableProperties | The channel immutable properties. | |
coreFeature | The core feature of the channel type, if any. The corresponding introspectable should depend on IncomingFileTransferChannel::FeatureCore. |
IncomingFileTransferChannelPtr Tp::IncomingFileTransferChannel::create | ( | const ConnectionPtr & | connection, | |
const QString & | objectPath, | |||
const QVariantMap & | immutableProperties | |||
) | [static] |
Create a new IncomingFileTransferChannel object.
connection | Connection owning this channel, and specifying the service. | |
objectPath | The channel object path. | |
immutableProperties | The channel immutable properties. |
Reimplemented from Tp::FileTransferChannel.
PendingOperation * Tp::IncomingFileTransferChannel::setUri | ( | const QString & | uri | ) |
Set the URI where the file will be saved.
This property may be set by the channel handler before calling AcceptFile to inform observers where the incoming file will be saved. When the URI property is set, the signal uriDefined() is emitted.
This method requires IncomingFileTransferChannel::FeatureCore to be ready.
uri | The URI where the file will be saved. |
PendingOperation * Tp::IncomingFileTransferChannel::acceptFile | ( | qulonglong | offset, | |
QIODevice * | output | |||
) |
Accept a file transfer that's in the FileTransferStatePending state().
The state will change to FileTransferStateOpen as soon as the transfer starts. The given output device should not be closed/destroyed until the state() changes to FileTransferStateCompleted or FileTransferStateCancelled.
Only the primary handler of a file transfer channel may call this method.
This method requires IncomingFileTransferChannel::FeatureCore to be ready.
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() method 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() will always be 0.). | |
output | A QIODevice object where the data will be written to. The device should be ready to use when the state() changes to FileTransferStateCompleted. If the transfer is cancelled, state() becomes FileTransferStateCancelled, the data in output should be ignored |
void Tp::IncomingFileTransferChannel::uriDefined | ( | const QString & | uri | ) | [signal] |
Emitted when the value of uri() changes.
uri | The new URI of this file transfer channel. |
const Feature Tp::IncomingFileTransferChannel::FeatureCore [static] |
Feature representing the core that needs to become ready to make the IncomingFileTransferChannel object usable.
This is currently the same as FileTransferChannel::FeatureCore, but may change to include more.
When calling isReady(), becomeReady(), this feature is implicitly added to the requested features.
Reimplemented from Tp::FileTransferChannel.
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation |
Telepathy-Qt4 0.6.5
|