/* * Copyright (c) 2010 Remko Tronçon * Licensed under the GNU General Public License v3. * 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 #include #include "Swiften/Base/String.h" #include "Swiften/JID/JID.h" namespace Swift { class FormField { public: typedef boost::shared_ptr ref; virtual ~FormField() {} struct Option { Option(const String& label, const String& value) : label(label), value(value) {} String label; String value; }; void setName(const String& name) { this->name = name; } const String& getName() const { return name; } void setLabel(const String& label) { this->label = label; } const String& getLabel() const { return label; } void setDescription(const String& description) { this->description = description; } const String& getDescription() const { return description; } void setRequired(bool required) { this->required = required; } bool getRequired() const { return required; } void addOption(const Option& option) { options.push_back(option); } const std::vector