Home · Modules · All Classes · All Namespaces
Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
Tp::IncomingFileTransferChannel Class Reference

The IncomingFileTransferChannel class represents a Telepathy channel of type FileTransfer for incoming file transfers. More...

#include <TelepathyQt/IncomingFileTransferChannel>

Inherits Tp::FileTransferChannel.

Signals

void uriDefined (const QString &uri)
 
- Signals inherited from Tp::FileTransferChannel
void stateChanged (Tp::FileTransferState state, Tp::FileTransferStateChangeReason reason)
 
void initialOffsetDefined (qulonglong initialOffset)
 
void transferredBytesChanged (qulonglong count)
 
- Signals inherited from Tp::Channel
void groupFlagsChanged (Tp::ChannelGroupFlags flags, Tp::ChannelGroupFlags added, Tp::ChannelGroupFlags removed)
 
void groupCanAddContactsChanged (bool canAddContacts)
 
void groupCanRemoveContactsChanged (bool canRemoveContacts)
 
void groupCanRescindContactsChanged (bool canRescindContacts)
 
void groupMembersChanged (const Tp::Contacts &groupMembersAdded, const Tp::Contacts &groupLocalPendingMembersAdded, const Tp::Contacts &groupRemotePendingMembersAdded, const Tp::Contacts &groupMembersRemoved, const Tp::Channel::GroupMemberChangeDetails &details)
 
void groupHandleOwnersChanged (const Tp::HandleOwnerMap &owners, const Tp::UIntList &added, const Tp::UIntList &removed)
 
void groupSelfContactChanged ()
 
void conferenceChannelMerged (const Tp::ChannelPtr &channel)
 
void conferenceChannelRemoved (const Tp::ChannelPtr &channel, const Tp::Channel::GroupMemberChangeDetails &details)
 
- Signals inherited from Tp::DBusProxy
void invalidated (Tp::DBusProxy *proxy, const QString &errorName, const QString &errorMessage)
 
- Signals inherited from Tp::Object
void propertyChanged (const QString &propertyName)
 

Public Member Functions

virtual ~IncomingFileTransferChannel ()
 
PendingOperationsetUri (const QString &uri)
 
PendingOperationacceptFile (qulonglong offset, QIODevice *output)
 
- Public Member Functions inherited from Tp::FileTransferChannel
virtual ~FileTransferChannel ()
 
FileTransferState state () const
 
FileTransferStateChangeReason stateReason () const
 
QString fileName () const
 
QString contentType () const
 
qulonglong size () const
 
QString uri () const
 
FileHashType contentHashType () const
 
QString contentHash () const
 
QString description () const
 
QDateTime lastModificationTime () const
 
qulonglong initialOffset () const
 
qulonglong transferredBytes () const
 
PendingOperationcancel ()
 
- Public Member Functions inherited from Tp::Channel
virtual ~Channel ()
 
ConnectionPtr connection () const
 
QVariantMap immutableProperties () const
 
QString channelType () const
 
HandleType targetHandleType () const
 
uint targetHandle () const
 
QString targetId () const
 
ContactPtr targetContact () const
 
bool isRequested () const
 
ContactPtr initiatorContact () const
 
PendingOperationrequestClose ()
 
PendingOperationrequestLeave (const QString &message=QString(), ChannelGroupChangeReason reason=ChannelGroupChangeReasonNone)
 
bool isConference () const
 
Contacts conferenceInitialInviteeContacts () const
 
QList< ChannelPtr > conferenceChannels () const
 
QList< ChannelPtr > conferenceInitialChannels () const
 
QHash< uint, ChannelPtr > conferenceOriginalChannels () const
 
bool supportsConferenceMerging () const
 
PendingOperationconferenceMergeChannel (const ChannelPtr &channel)
 
bool supportsConferenceSplitting () const
 
PendingOperationconferenceSplitChannel ()
 
ChannelGroupFlags groupFlags () const
 
bool groupCanAddContacts () const
 
bool groupCanAddContactsWithMessage () const
 
bool groupCanAcceptContactsWithMessage () const
 
PendingOperationgroupAddContacts (const QList< ContactPtr > &contacts, const QString &message=QString())
 
bool groupCanRescindContacts () const
 
bool groupCanRescindContactsWithMessage () const
 
bool groupCanRemoveContacts () const
 
bool groupCanRemoveContactsWithMessage () const
 
bool groupCanRejectContactsWithMessage () const
 
bool groupCanDepartWithMessage () const
 
PendingOperationgroupRemoveContacts (const QList< ContactPtr > &contacts, const QString &message=QString(), ChannelGroupChangeReason reason=ChannelGroupChangeReasonNone)
 
Contacts groupContacts (bool includeSelfContact=true) const
 
Contacts groupLocalPendingContacts (bool includeSelfContact=true) const
 
Contacts groupRemotePendingContacts (bool includeSelfContact=true) const
 
GroupMemberChangeDetails groupLocalPendingContactChangeInfo (const ContactPtr &contact) const
 
GroupMemberChangeDetails groupSelfContactRemoveInfo () const
 
bool groupAreHandleOwnersAvailable () const
 
HandleOwnerMap groupHandleOwners () const
 
bool groupIsSelfContactTracked () const
 
ContactPtr groupSelfContact () const
 
- Public Member Functions inherited from Tp::StatefulDBusProxy
 StatefulDBusProxy (const QDBusConnection &dbusConnection, const QString &busName, const QString &objectPath, const Feature &featureCore)
 
virtual ~StatefulDBusProxy ()
 
- Public Member Functions inherited from Tp::DBusProxy
 DBusProxy (const QDBusConnection &dbusConnection, const QString &busName, const QString &objectPath, const Feature &featureCore)
 
virtual ~DBusProxy ()
 
QDBusConnection dbusConnection () const
 
QString busName () const
 
QString objectPath () const
 
bool isValid () const
 
QString invalidationReason () const
 
QString invalidationMessage () const
 
- Public Member Functions inherited from Tp::Object
virtual ~Object ()
 
- Public Member Functions inherited from Tp::RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 
- Public Member Functions inherited from Tp::ReadyObject
 ReadyObject (RefCounted *object, const Feature &featureCore)
 
 ReadyObject (DBusProxy *proxy, const Feature &featureCore)
 
virtual ~ReadyObject ()
 
virtual bool isReady (const Features &features=Features()) const
 
virtual PendingReadybecomeReady (const Features &requestedFeatures=Features())
 
virtual Features requestedFeatures () const
 
virtual Features actualFeatures () const
 
virtual Features missingFeatures () const
 
- Public Member Functions inherited from Tp::OptionalInterfaceFactory< Channel >
 OptionalInterfaceFactory (Channel *this_)
 
 ~OptionalInterfaceFactory ()
 
QStringList interfaces () const
 
bool hasInterface (const QString &name) const
 
Interface * optionalInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
 
Interface * interface () const
 

Static Public Member Functions

static IncomingFileTransferChannelPtr create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
 
- Static Public Member Functions inherited from Tp::FileTransferChannel
static FileTransferChannelPtr create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
 
- Static Public Member Functions inherited from Tp::Channel
static ChannelPtr create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
 
- Static Public Member Functions inherited from Tp::StatefulDBusProxy
static QString uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique)
 
static QString uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique, QString &error, QString &message)
 

Static Public Attributes

static const Feature FeatureCore
 
- Static Public Attributes inherited from Tp::FileTransferChannel
static const Feature FeatureCore
 
- Static Public Attributes inherited from Tp::Channel
static const Feature FeatureCore
 
static const Feature FeatureConferenceInitialInviteeContacts
 

Protected Member Functions

 IncomingFileTransferChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature=IncomingFileTransferChannel::FeatureCore)
 
- Protected Member Functions inherited from Tp::FileTransferChannel
 FileTransferChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature=FileTransferChannel::FeatureCore)
 
SupportedSocketMap availableSocketTypes () const
 
bool isConnected () const
 
void setConnected ()
 
bool isFinished () const
 
- Protected Member Functions inherited from Tp::Channel
 Channel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature)
 
Client::ChannelInterfacebaseInterface () const
 
bool groupSelfHandleIsLocalPending () const
 
- Protected Member Functions inherited from Tp::DBusProxy
void setBusName (const QString &busName)
 
void invalidate (const QString &reason, const QString &message)
 
void invalidate (const QDBusError &error)
 
- Protected Member Functions inherited from Tp::Object
 Object ()
 
void notify (const char *propertyName)
 
- Protected Member Functions inherited from Tp::ReadyObject
ReadinessHelperreadinessHelper () const
 
- Protected Member Functions inherited from Tp::OptionalInterfaceFactory< Channel >
void setInterfaces (const QStringList &interfaces)
 

Additional Inherited Members

- Public Types inherited from Tp::OptionalInterfaceFactory< Channel >
enum  InterfaceSupportedChecking
 
- Protected Slots inherited from Tp::FileTransferChannel
void onUriDefined (const QString &uri)
 
- Protected Slots inherited from Tp::Channel
PendingOperationgroupAddSelfHandle ()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ~IncomingFileTransferChannel()

Tp::IncomingFileTransferChannel::~IncomingFileTransferChannel ( )
virtual

Class destructor.

◆ IncomingFileTransferChannel()

Tp::IncomingFileTransferChannel::IncomingFileTransferChannel ( const ConnectionPtr &  connection,
const QString &  objectPath,
const QVariantMap &  immutableProperties,
const Feature coreFeature = IncomingFileTransferChannel::FeatureCore 
)
protected

Construct a new IncomingFileTransferChannel object.

Parameters
connectionConnection owning this channel, and specifying the service.
objectPathThe channel object path.
immutablePropertiesThe channel immutable properties.
coreFeatureThe core feature of the channel type, if any. The corresponding introspectable should depend on IncomingFileTransferChannel::FeatureCore.

Member Function Documentation

◆ create()

IncomingFileTransferChannelPtr Tp::IncomingFileTransferChannel::create ( const ConnectionPtr &  connection,
const QString &  objectPath,
const QVariantMap &  immutableProperties 
)
static

Create a new IncomingFileTransferChannel object.

Parameters
connectionConnection owning this channel, and specifying the service.
objectPathThe channel object path.
immutablePropertiesThe channel immutable properties.
Returns
A IncomingFileTransferChannelPtr object pointing to the newly created IncomingFileTransfer object.

◆ setUri()

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.

Parameters
uriThe URI where the file will be saved.
Returns
A PendingOperation object which will emit PendingOperation::finished when the call has finished.
See also
FileTransferChannel::uri(), uriDefined()

◆ acceptFile()

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.

Parameters
offsetThe 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.).
outputA 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
Returns
A PendingOperation object which will emit PendingOperation::finished when the call has finished.
See also
FileTransferChannel::stateChanged(), FileTransferChannel::state(), FileTransferChannel::stateReason(), FileTransferChannel::initialOffset()

◆ uriDefined

void Tp::IncomingFileTransferChannel::uriDefined ( const QString &  uri)
signal

Emitted when the value of uri() changes.

Parameters
uriThe new URI of this file transfer channel.
See also
FileTransferChannel::uri(), setUri()

Member Data Documentation

◆ FeatureCore

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.