dataform.h

00001 /*
00002   Copyright (c) 2005 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
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__

Generated on Mon Jan 16 16:19:54 2006 for gloox by  doxygen 1.4.6