gloox
1.0
|
00001 /* 00002 Copyright (c) 2007-2009 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 FEATURENEG_H__ 00015 #define FEATURENEG_H__ 00016 00017 #include "stanzaextension.h" 00018 00019 #include <string> 00020 00021 namespace gloox 00022 { 00023 00024 class DataForm; 00025 class Tag; 00026 00035 class GLOOX_API FeatureNeg : public StanzaExtension 00036 { 00037 public: 00042 FeatureNeg( DataForm* form ); 00043 00048 FeatureNeg( const Tag* tag = 0 ); 00049 00053 virtual ~FeatureNeg(); 00054 00059 const DataForm* form() const { return m_form; } 00060 00061 // reimplemented from StanzaExtension 00062 virtual const std::string& filterString() const; 00063 00064 // reimplemented from StanzaExtension 00065 virtual StanzaExtension* newInstance( const Tag* tag ) const 00066 { 00067 return new FeatureNeg( tag ); 00068 } 00069 00070 // reimplemented from StanzaExtension 00071 virtual Tag* tag() const; 00072 00073 // reimplemented from StanzaExtension 00074 virtual StanzaExtension* clone() const 00075 { 00076 return new FeatureNeg( m_form ); 00077 } 00078 00079 private: 00080 DataForm* m_form; 00081 00082 }; 00083 00084 } 00085 00086 #endif // FEATURENEG_H__