From 3219e12750f46d693375f682136fc364fa99a92e Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Wed, 17 Mar 2010 10:50:05 +0000 Subject: improve XEP-0004 API --- source/QXmppDataForm.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/QXmppDataForm.h') 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 > 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; -- cgit v1.2.3