diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-09-14 16:17:30 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-09-14 19:48:53 (GMT) |
commit | ef5a4dc3a5b0224628a225ef0dccc679287478be (patch) | |
tree | 126d8f752f18d3d5891cd32cacf2a21734ab0b92 /Swiften/Elements/FormField.h | |
parent | 9ecba612d790c1f613dc959888f62e5d3575faae (diff) | |
download | swift-contrib-ef5a4dc3a5b0224628a225ef0dccc679287478be.zip swift-contrib-ef5a4dc3a5b0224628a225ef0dccc679287478be.tar.bz2 |
Add extended disco support to caps verifier.
Diffstat (limited to 'Swiften/Elements/FormField.h')
-rw-r--r-- | Swiften/Elements/FormField.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Swiften/Elements/FormField.h b/Swiften/Elements/FormField.h index 732203a..a0240e1 100644 --- a/Swiften/Elements/FormField.h +++ b/Swiften/Elements/FormField.h @@ -4,6 +4,9 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ +// FIXME: We currently keep 2 values: the raw values, and the actual value. +// We should only store the raw values, and deduce the actual values from this + #pragma once #include <vector> @@ -45,6 +48,14 @@ namespace Swift { return options; } + const std::vector<String> getRawValues() const { + return rawValues; + } + + void addRawValue(const String& value) { + rawValues.push_back(value); + } + protected: FormField() : required(false) {} @@ -54,6 +65,7 @@ namespace Swift { String description; bool required; std::vector<Option> options; + std::vector<String> rawValues; }; template<typename T> class GenericFormField : public FormField { @@ -99,4 +111,5 @@ namespace Swift { SWIFTEN_DECLARE_FORM_FIELD(JIDSingle, JID); SWIFTEN_DECLARE_FORM_FIELD(JIDMulti, std::vector<JID>); SWIFTEN_DECLARE_FORM_FIELD(ListMulti, std::vector<String>); + SWIFTEN_DECLARE_FORM_FIELD(Untyped, std::vector<String>); } |