diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-18 10:33:33 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-07-18 10:33:33 +0200 |
| commit | e4b6ead714de4912a5a8d10177843eed6c448a28 (patch) | |
| tree | f1143790174ba17507575291ca481ab14151c49b /src/base/QXmppDataForm.h | |
| parent | 0ed84be38b159a32790cb074dc04760313ba27c2 (diff) | |
| download | qxmpp-e4b6ead714de4912a5a8d10177843eed6c448a28.tar.gz | |
add support for XEP-0221: Data Forms Media Element
Diffstat (limited to 'src/base/QXmppDataForm.h')
| -rw-r--r-- | src/base/QXmppDataForm.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/base/QXmppDataForm.h b/src/base/QXmppDataForm.h index 70095844..ca249bc8 100644 --- a/src/base/QXmppDataForm.h +++ b/src/base/QXmppDataForm.h @@ -35,6 +35,7 @@ class QDomElement; class QXmppDataFormPrivate; class QXmppDataFormFieldPrivate; +class QXmppDataFormMediaPrivate; /// \brief The QXmppDataForm class represents a data form as defined by /// XEP-0004: Data Forms. @@ -43,6 +44,32 @@ class QXmppDataFormFieldPrivate; class QXMPP_EXPORT QXmppDataForm { public: + /// \brief The QXmppDataForm::Media class represents a media field + /// as defined by XEP-0221: Data Forms Media Element. + /// + + class QXMPP_EXPORT Media + { + public: + Media(); + Media(const QXmppDataForm::Media &other); + ~Media(); + + int height() const; + void setHeight(int height); + + int width() const; + void setWidth(int width); + + QList<QPair<QString, QString> > uris() const; + void setUris(const QList<QPair<QString, QString> > &uris); + + bool isNull() const; + + private: + QSharedDataPointer<QXmppDataFormMediaPrivate> d; + }; + /// \brief The QXmppDataForm::Field class represents a data form field /// as defined by XEP-0004: Data Forms. /// @@ -80,6 +107,9 @@ public: QString label() const; void setLabel(const QString &label); + Media media() const; + void setMedia(const Media &media); + QList<QPair<QString, QString> > options() const; void setOptions(const QList<QPair<QString, QString> > &options); |
