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 
00066       DataForm( Tag *tag );
00067 
00071       virtual ~DataForm();
00072 
00078       const Tag* tag() const;
00079 
00084       const std::string& title() const { return m_title; };
00085 
00091       void setTitle( const std::string& title ) { m_title = title; };
00092 
00097       const StringList& instructions() const { return m_instructions; };
00098 
00106       void setInstructions( const StringList& instructions ) { m_instructions = instructions; };
00107 
00108     private:
00109       StringList m_instructions;
00110 
00111       DataFormType m_type;
00112       std::string m_title;
00113   };
00114 
00115 }
00116 
00117 #endif // DATAFORM_H__

Generated on Sun Sep 24 21:57:31 2006 for gloox by  doxygen 1.4.7