aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppDataForm.h
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2012-07-18 10:33:33 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2012-07-18 10:33:33 +0200
commite4b6ead714de4912a5a8d10177843eed6c448a28 (patch)
treef1143790174ba17507575291ca481ab14151c49b /src/base/QXmppDataForm.h
parent0ed84be38b159a32790cb074dc04760313ba27c2 (diff)
downloadqxmpp-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.h30
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);