diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-03-17 10:50:05 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-03-17 10:50:05 +0000 |
| commit | 3219e12750f46d693375f682136fc364fa99a92e (patch) | |
| tree | e70ee6adf357984f8259a1330760fce58e3525cd /source/QXmppDataForm.h | |
| parent | ba0c25c412c88c829075e56b498edb898480b80e (diff) | |
| download | qxmpp-3219e12750f46d693375f682136fc364fa99a92e.tar.gz | |
improve XEP-0004 API
Diffstat (limited to 'source/QXmppDataForm.h')
| -rw-r--r-- | source/QXmppDataForm.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/QXmppDataForm.h b/source/QXmppDataForm.h index 91b8ca7a..c33520eb 100644 --- a/source/QXmppDataForm.h +++ b/source/QXmppDataForm.h @@ -56,8 +56,8 @@ public: QString description() const; void setDescription(const QString &description); - QString id() const; - void setId(const QString &id); + QString key() const; + void setKey(const QString &key); QString label() const; void setLabel(const QString &label); @@ -75,8 +75,8 @@ public: void setValue(const QVariant &value); private: - QString m_id; QString m_description; + QString m_key; QString m_label; QList<QPair<QString, QString> > m_options; bool m_required; @@ -86,13 +86,14 @@ public: enum Type { + None, Form, Submit, Cancel, Result, }; - QXmppDataForm(QXmppDataForm::Type type = QXmppDataForm::Form); + QXmppDataForm(QXmppDataForm::Type type = QXmppDataForm::None); QString instructions() const; void setInstructions(const QString &instructions); @@ -107,6 +108,8 @@ public: QXmppDataForm::Type type() const; void setType(QXmppDataForm::Type type); + bool isNull() const; + void parse(const QDomElement &element); void toXml(QXmlStreamWriter *writer) const; |
