Home · All Classes · All Namespaces · Modules · Functions · Files
Public Member Functions
Tp::FileTransferChannelCreationProperties Class Reference

The FileTransferChannelCreationProperties class represents the properties of a file transfer channel request. More...

#include <TelepathyQt/FileTransferChannelCreationProperties>

List of all members.

Public Member Functions

 FileTransferChannelCreationProperties ()
 FileTransferChannelCreationProperties (const QString &suggestedFileName, const QString &contentType, qulonglong size)
 FileTransferChannelCreationProperties (const QString &path, const QString &contentType)
 FileTransferChannelCreationProperties (const FileTransferChannelCreationProperties &other)
 ~FileTransferChannelCreationProperties ()
bool isValid () const
FileTransferChannelCreationPropertiesoperator= (const FileTransferChannelCreationProperties &other)
bool operator== (const FileTransferChannelCreationProperties &other) const
FileTransferChannelCreationPropertiessetContentHash (FileHashType contentHashType, const QString &contentHash)
FileTransferChannelCreationPropertiessetDescription (const QString &description)
FileTransferChannelCreationPropertiessetLastModificationTime (const QDateTime &lastModificationTime)
FileTransferChannelCreationPropertiessetUri (const QString &uri)
QString suggestedFileName () const
QString contentType () const
qulonglong size () const
bool hasContentHash () const
FileHashType contentHashType () const
QString contentHash () const
bool hasDescription () const
QString description () const
bool hasLastModificationTime () const
QDateTime lastModificationTime () const
bool hasUri () const
QString uri () const
QVariantMap createRequest () const
QVariantMap createRequest (const QString &contactIdentifier) const
QVariantMap createRequest (uint handle) const

Detailed Description

The FileTransferChannelCreationProperties class represents the properties of a file transfer channel request.


Constructor & Destructor Documentation

Tp::FileTransferChannelCreationProperties::FileTransferChannelCreationProperties ( const QString &  suggestedFileName,
const QString &  contentType,
qulonglong  size 
)

Create a FileTransferChannelCreationProperties.

If suggestedFileName or contentType are empty or if size is equal to zero, the channel request will fail. suggestedFileName will be cleaned of any path.

Parameters:
suggestedFileNameThe name of the file on the sender's side. This is therefore given as a suggested filename for the receiver.
contentTypeThe content type (MIME) of the file.
sizeThe size of the content of the file.
See also:
setUri()
Tp::FileTransferChannelCreationProperties::FileTransferChannelCreationProperties ( const QString &  path,
const QString &  contentType 
)

Create a FileTransferChannelCreationProperties.

This constructor accepts the path to a local file and sets the properties that can be deducted from the file. If path is not a local file the FileTransferChannelCreationProperties will be invalid.

Parameters:
pathThe path to the local file to be sent.

Copy constructor.

Class destructor.


Member Function Documentation

FileTransferChannelCreationProperties & Tp::FileTransferChannelCreationProperties::operator= ( const FileTransferChannelCreationProperties other)
bool Tp::FileTransferChannelCreationProperties::operator== ( const FileTransferChannelCreationProperties other) const

Set the content hash of the file and its type for the request.

Parameters:
contentHashTypeThe type of content hash.
contentHashThe hash of the file, of type contentHashType.
Returns:
This FileTransferChannelCreationProperties.
See also:
hasContentHash(), contentHash(), contentHashType()

Set a description of the file for the request.

Parameters:
descriptionThe description of the file.
Returns:
This FileTransferChannelCreationProperties.
See also:
hasDescription(), description()

Set the last modification time of the file for the request.

Parameters:
lastModificationTimeThe last modification time of the file.
Returns:
This FileTransferChannelCreationProperties.
See also:
hasLastModificationTime(), lastModificationTime()

Set the URI of the file for the request.

Parameters:
uriThe URI of the file.
Returns:
This FileTransferChannelCreationProperties.
See also:
uri()

Return the suggested file name for the request. If the suggested file name is empty, the channel request will fail.

Returns:
The suggested file name for the request.

Return the content type (MIME) of the file for the request. If the content type is empty, the channel request will fail.

Returns:
The content type of the file.

Return the size of the contents of the file for the request. If size is zero, the channel request will fail.

Returns:
The size of the contents of file.

Return whether the request will have a content hash.

Returns:
true whether it will have a content hash, false otherwise.
See also:
contentHash(), contentHashType(), setContentHash()

Return the type of the content hash for the request.

Returns:
The type of the content hash.
See also:
hasContentHash(), contentHash(), setContentHash()

Return the content hash of the file for the request.

Returns:
The hash of the contents of the file transfer, of type returned by contentHashType().
See also:
hasContentHash(), contentHashType(), setContentHash()

Return whether the request will have a descriprion.

Returns:
true whether it will have description, false otherwise.
See also:
description(), setDescription()

Return the description of the file for the request.

Returns:
The description of the file.
See also:
hasDescription(), setDescription()

Return whether the request will have a last modification time.

Returns:
true whether it will have a last modification time, false otherwise.
See also:
lastModificationTime(), setLastModificationTime()

Return the last modification time of the file for the request.

Returns:
The last modification time of the file.
See also:
hasLastModificationTime(), setLastModificationTime()

Return whether the request will have an URI.

Returns:
true whether it will have URI, false otherwise.
See also:
uri(), setUri()

Return the URI of the file for the request. If the URI property is empty and the file transfer is handled by an handler that is not this process, then it won't be able to initiate the file transfer.

Returns:
The URI of the file.
See also:
setUri()
QVariantMap Tp::FileTransferChannelCreationProperties::createRequest ( const QString &  contactIdentifier) const


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.7