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
00019 #include <string>
00020 #include <list>
00021
00022 namespace gloox
00023 {
00024
00025 class Tag;
00026
00033 class GLOOX_API DataForm : public DataFormBase
00034 {
00035 public:
00039 enum DataFormType
00040 {
00041 FORM_TYPE_FORM,
00043 FORM_TYPE_SUBMIT,
00045 FORM_TYPE_CANCEL,
00047 FORM_TYPE_RESULT,
00049 FORM_TYPE_INVALID
00051 };
00052
00060 DataForm( DataFormType type, const StringList& instructions, const std::string& title = "" );
00061
00067 DataForm( DataFormType type );
00068
00073 DataForm( Tag *tag );
00074
00078 virtual ~DataForm();
00079
00086 Tag* tag() const;
00087
00092 const std::string& title() const { return m_title; };
00093
00099 void setTitle( const std::string& title ) { m_title = title; };
00100
00105 const StringList& instructions() const { return m_instructions; };
00106
00114 void setInstructions( const StringList& instructions ) { m_instructions = instructions; };
00115
00116 private:
00117 StringList m_instructions;
00118
00119 DataFormType m_type;
00120 std::string m_title;
00121 };
00122
00123 }
00124
00125 #endif // DATAFORM_H__