00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef DATAFORM_H__
00015 #define DATAFORM_H__
00016
00017 #include "dataformbase.h"
00018 #include "dataformfield.h"
00019
00020 #include <string>
00021 #include <list>
00022
00023 namespace gloox
00024 {
00025
00026 class Tag;
00027
00034 class GLOOX_EXPORT DataForm : public DataFormBase
00035 {
00036 public:
00040 enum DataFormType
00041 {
00042 FORM_TYPE_FORM,
00044 FORM_TYPE_SUBMIT,
00046 FORM_TYPE_CANCEL,
00048 FORM_TYPE_RESULT,
00050 FORM_TYPE_INVALID
00052 };
00053
00061 DataForm( DataFormType type, const StringList& instructions, const std::string& title = "" );
00062
00067 DataForm( Tag *tag );
00068
00072 virtual ~DataForm();
00073
00079 Tag* tag();
00080
00085 const std::string& title() const { return m_title; };
00086
00092 void setTitle( const std::string& title ) { m_title = title; };
00093
00098 const StringList& instructions() const { return m_instructions; };
00099
00107 void setInstructions( const StringList& instructions ) { m_instructions = instructions; };
00108
00109 private:
00110 StringList m_instructions;
00111
00112 DataFormType m_type;
00113 std::string m_title;
00114 };
00115
00116 }
00117
00118 #endif // DATAFORM_H__