summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements/Form.h')
-rw-r--r--Swiften/Elements/Form.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/Swiften/Elements/Form.h b/Swiften/Elements/Form.h
index 2c6f963..16cef98 100644
--- a/Swiften/Elements/Form.h
+++ b/Swiften/Elements/Form.h
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2010 Kevin Smith
+ * Copyright (c) 2010-2014 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -10,4 +10,5 @@
#include <string>
+#include <Swiften/Base/API.h>
#include <Swiften/Elements/Payload.h>
#include <Swiften/Elements/FormField.h>
@@ -20,5 +21,5 @@ namespace Swift {
* the strange multi-value instead of newline thing by transforming them.
*/
- class Form : public Payload {
+ class SWIFTEN_API Form : public Payload {
public:
typedef boost::shared_ptr<Form> ref;
@@ -35,4 +36,5 @@ namespace Swift {
void addField(boost::shared_ptr<FormField> field) {assert(field); fields_.push_back(field); }
const std::vector<boost::shared_ptr<FormField> >& getFields() const { return fields_; }
+ void clearFields() { fields_.clear(); }
void setTitle(const std::string& title) { title_ = title; }
const std::string& getTitle() const { return title_; }
@@ -50,7 +52,12 @@ namespace Swift {
void addReportedField(FormField::ref field);
const std::vector<FormField::ref>& getReportedFields() const;
+ void clearReportedFields() { reportedFields_.clear(); }
void addItem(const FormItem& item);
const std::vector<FormItem>& getItems() const;
+ void clearItems() { items_.clear(); }
+
+ void clearEmptyTextFields();
+
private:
std::vector<boost::shared_ptr<FormField> > fields_;