dataform.h

00001 /*
00002   Copyright (c) 2005-2006 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 
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__

Generated on Tue May 1 14:20:20 2007 for gloox by  doxygen 1.5.1