QXmppFileShare Class
| Header: | #include <QXmppFileShare> |
| Since: | QXmpp 1.5 |
Public Types
| enum | Disposition { Inline, Attachment } |
Public Functions
| QXmppFileShare() | |
(since QXmpp 1.16) std::optional<QXmppFileShare::Disposition> | dispositionOpt() const |
| const QVector<QXmppEncryptedFileSource> & | encryptedSources() const |
| const QVector<QXmppHttpFileSource> & | httpSources() const |
(since QXmpp 1.7) const QString & | id() const |
| const QXmppFileMetadata & | metadata() const |
| void | setDisposition(std::optional<QXmppFileShare::Disposition> disp) |
| void | setEncryptedSourecs(const QVector<QXmppEncryptedFileSource> &newEncryptedSources) |
| void | setHttpSources(const QVector<QXmppHttpFileSource> &newHttpSources) |
(since QXmpp 1.7) void | setId(const QString &id) |
| void | setMetadata(const QXmppFileMetadata &metadata) |
Detailed Description
File sharing element from XEP-0447: Stateless file sharing. Contains metadata and source URLs.
Note: jinglepub references are currently missing
Member Type Documentation
enum QXmppFileShare::Disposition
Decides whether to display the file contents (e.g. an image) inline in the chat or as a file.
| Constant | Value | Description |
|---|---|---|
QXmppFileShare::Inline | 0 | The file should be displayed inline in the conversation. |
QXmppFileShare::Attachment | 1 | The file should be offered as a downloadable attachment. |
Member Function Documentation
QXmppFileShare::QXmppFileShare()
Default constructor
[since QXmpp 1.16] std::optional<QXmppFileShare::Disposition> QXmppFileShare::dispositionOpt() const
Returns the disposition setting for this file.
std::nullopt means no disposition attribute was set.
This function was introduced in QXmpp 1.16.
const QVector<QXmppEncryptedFileSource> &QXmppFileShare::encryptedSources() const
Returns the encrypted sources for this file.
const QVector<QXmppHttpFileSource> &QXmppFileShare::httpSources() const
Returns the HTTP sources for this file.
See also setHttpSources().
[since QXmpp 1.7] const QString &QXmppFileShare::id() const
Returns the ID of this file element.
This is useful for attaching sources to one of multiple files in a message.
This function was introduced in QXmpp 1.7.
See also setId().
const QXmppFileMetadata &QXmppFileShare::metadata() const
Returns the metadata of the shared file.
See also setMetadata().
void QXmppFileShare::setDisposition(std::optional<QXmppFileShare::Disposition> disp)
Sets the disposition setting for this file.
disp.
void QXmppFileShare::setEncryptedSourecs(const QVector<QXmppEncryptedFileSource> &newEncryptedSources)
Sets the encrypted sources for this file.
newEncryptedSources.
void QXmppFileShare::setHttpSources(const QVector<QXmppHttpFileSource> &newHttpSources)
Sets the HTTP sources for this file.
newHttpSources.
See also httpSources().
[since QXmpp 1.7] void QXmppFileShare::setId(const QString &id)
Sets the ID of this file element.
This is useful for attaching sources to one of multiple files in a message.
id.
This function was introduced in QXmpp 1.7.
See also id().
void QXmppFileShare::setMetadata(const QXmppFileMetadata &metadata)
Sets the metadata of the shared file.
See also metadata().