summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2012-01-06 22:18:25 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-01-23 14:51:26 (GMT)
commit83afa3d4bf18e4feb8a33d084ed181508084fc64 (patch)
treeb81a0c6eaaedbad3f3e607ea52a69acf98f95eff /Swiften/Elements/Form.h
parent093d499945d779cfed92b45e413644834004b0d9 (diff)
downloadswift-contrib-83afa3d4bf18e4feb8a33d084ed181508084fc64.zip
swift-contrib-83afa3d4bf18e4feb8a33d084ed181508084fc64.tar.bz2
XEP-0004 form support for user search.
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swiften/Elements/Form.h')
-rw-r--r--Swiften/Elements/Form.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Swiften/Elements/Form.h b/Swiften/Elements/Form.h
index 0d1ed63..2c6f963 100644
--- a/Swiften/Elements/Form.h
+++ b/Swiften/Elements/Form.h
@@ -22,6 +22,7 @@ namespace Swift {
class Form : public Payload {
public:
typedef boost::shared_ptr<Form> ref;
+ typedef std::vector<FormField::ref> FormItem;
enum Type { FormType, SubmitType, CancelType, ResultType };
@@ -46,8 +47,15 @@ namespace Swift {
FormField::ref getField(const std::string& name) const;
+ void addReportedField(FormField::ref field);
+ const std::vector<FormField::ref>& getReportedFields() const;
+
+ void addItem(const FormItem& item);
+ const std::vector<FormItem>& getItems() const;
private:
std::vector<boost::shared_ptr<FormField> > fields_;
+ std::vector<boost::shared_ptr<FormField> > reportedFields_;
+ std::vector<FormItem> items_;
std::string title_;
std::string instructions_;
Type type_;