gloox
1.0
|
00001 /* 00002 Copyright (c) 2006-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 GPGSIGNED_H__ 00015 #define GPGSIGNED_H__ 00016 00017 #include "gloox.h" 00018 #include "stanzaextension.h" 00019 00020 #include <string> 00021 00022 namespace gloox 00023 { 00024 00025 class Tag; 00026 00038 class GLOOX_API GPGSigned : public StanzaExtension 00039 { 00040 public: 00045 GPGSigned( const std::string& signature ); 00046 00052 GPGSigned( const Tag* tag ); 00053 00057 virtual ~GPGSigned(); 00058 00063 const std::string& signature() const { return m_signature; } 00064 00065 // reimplemented from StanzaExtension 00066 virtual const std::string& filterString() const; 00067 00068 // reimplemented from StanzaExtension 00069 virtual StanzaExtension* newInstance( const Tag* tag ) const 00070 { 00071 return new GPGSigned( tag ); 00072 } 00073 00074 // reimplemented from StanzaExtension 00075 Tag* tag() const; 00076 00077 // reimplemented from StanzaExtension 00078 virtual StanzaExtension* clone() const 00079 { 00080 return new GPGSigned( *this ); 00081 } 00082 00083 private: 00084 std::string m_signature; 00085 bool m_valid; 00086 00087 }; 00088 00089 } 00090 00091 #endif // GPGSIGNED_H__