| Home · All Classes · All Namespaces · Modules · Functions · Files

Public Member Functions | List of all members
Tp::FileTransferChannelCreationProperties Class Reference
Channel proxies

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

`#include <TelepathyQt/FileTransferChannelCreationProperties>`

## 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
FileTransferChannelCreationProperties & | operator= (const FileTransferChannelCreationProperties &other)
bool | operator== (const FileTransferChannelCreationProperties &other) const
FileTransferChannelCreationProperties & | setContentHash (FileHashType contentHashType, const QString &contentHash)
FileTransferChannelCreationProperties & | setDescription (const QString &description)
FileTransferChannelCreationProperties & | setLastModificationTime (const QDateTime &lastModificationTime)
FileTransferChannelCreationProperties & | setUri (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

## Detailed Description

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

## Constructor & Destructor Documentation

Tp::FileTransferChannelCreationProperties::FileTransferChannelCreationProperties | ( |  | ) |

Create an invalid FileTransferChannelCreationProperties.

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

  suggestedFileName | The name of the file on the sender's side. This is therefore given as a suggested filename for the receiver.
  contentType | The content type (MIME) of the file.
  size | The 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

  path | The path to the local file to be sent.

Tp::FileTransferChannelCreationProperties::FileTransferChannelCreationProperties | ( | const FileTransferChannelCreationProperties & | other | ) |

Copy constructor.

Tp::FileTransferChannelCreationProperties::~FileTransferChannelCreationProperties | ( |  | ) |

Class destructor.

## Member Function Documentation

bool Tp::FileTransferChannelCreationProperties::isValid | ( |  | ) | const

inline

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

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

FileTransferChannelCreationProperties & Tp::FileTransferChannelCreationProperties::setContentHash | ( | FileHashType | contentHashType,
|  | const QString & | contentHash
| ) |  |

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

Parameters

  contentHashType | The type of content hash.
  contentHash | The hash of the file, of type contentHashType.

Returns
  This FileTransferChannelCreationProperties.

See Also
  hasContentHash(), contentHash(), contentHashType()

FileTransferChannelCreationProperties & Tp::FileTransferChannelCreationProperties::setDescription | ( | const QString & | description | ) |

Set a description of the file for the request.

Parameters

  description | The description of the file.

Returns
  This FileTransferChannelCreationProperties.

See Also
  hasDescription(), description()

FileTransferChannelCreationProperties & Tp::FileTransferChannelCreationProperties::setLastModificationTime | ( | const QDateTime & | lastModificationTime | ) |

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

Parameters

  lastModificationTime | The last modification time of the file.

Returns
  This FileTransferChannelCreationProperties.

See Also
  hasLastModificationTime(), lastModificationTime()

FileTransferChannelCreationProperties & Tp::FileTransferChannelCreationProperties::setUri | ( | const QString & | uri | ) |

Set the URI of the file for the request.

Parameters

  uri | The URI of the file.

Returns
  This FileTransferChannelCreationProperties.

See Also
  uri()

QString Tp::FileTransferChannelCreationProperties::suggestedFileName | ( |  | ) | const

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.

QString Tp::FileTransferChannelCreationProperties::contentType | ( |  | ) | const

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.

qulonglong Tp::FileTransferChannelCreationProperties::size | ( |  | ) | const

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.

bool Tp::FileTransferChannelCreationProperties::hasContentHash | ( |  | ) | const

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()

FileHashType Tp::FileTransferChannelCreationProperties::contentHashType | ( |  | ) | const

Return the type of the content hash for the request.

Returns
  The type of the content hash.

See Also
  hasContentHash(), contentHash(), setContentHash()

QString Tp::FileTransferChannelCreationProperties::contentHash | ( |  | ) | const

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()

bool Tp::FileTransferChannelCreationProperties::hasDescription | ( |  | ) | const

Return whether the request will have a descriprion.

Returns
  `true` whether it will have description, `false` otherwise.

See Also
  description(), setDescription()

QString Tp::FileTransferChannelCreationProperties::description | ( |  | ) | const

Return the description of the file for the request.

Returns
  The description of the file.

See Also
  hasDescription(), setDescription()

bool Tp::FileTransferChannelCreationProperties::hasLastModificationTime | ( |  | ) | const

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()

QDateTime Tp::FileTransferChannelCreationProperties::lastModificationTime | ( |  | ) | const

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

Returns
  The last modification time of the file.

See Also
  hasLastModificationTime(), setLastModificationTime()

bool Tp::FileTransferChannelCreationProperties::hasUri | ( |  | ) | const

Return whether the request will have an URI.

Returns
  `true` whether it will have URI, `false` otherwise.

See Also
  uri(), setUri()

QString Tp::FileTransferChannelCreationProperties::uri | ( |  | ) | const

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()