gloox
1.0
|
00001 /* 00002 Copyright (c) 2008-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 00015 #ifndef SOFTWAREVERSION_H__ 00016 #define SOFTWAREVERSION_H__ 00017 00018 00019 #include "stanzaextension.h" 00020 00021 #include <string> 00022 00023 namespace gloox 00024 { 00025 00026 class Tag; 00027 00034 class GLOOX_API SoftwareVersion : public StanzaExtension 00035 { 00036 00037 public: 00044 SoftwareVersion( const std::string& name, const std::string& version, const std::string& os ); 00045 00050 SoftwareVersion( const Tag* tag = 0 ); 00051 00055 virtual ~SoftwareVersion(); 00056 00061 const std::string& name() const { return m_name; } 00062 00067 const std::string& version() const { return m_version; } 00068 00073 const std::string& os() const { return m_os; } 00074 00075 // reimplemented from StanzaExtension 00076 virtual const std::string& filterString() const; 00077 00078 // reimplemented from StanzaExtension 00079 virtual StanzaExtension* newInstance( const Tag* tag ) const 00080 { 00081 return new SoftwareVersion( tag ); 00082 } 00083 00084 // reimplemented from StanzaExtension 00085 virtual Tag* tag() const; 00086 00087 // reimplemented from StanzaExtension 00088 virtual StanzaExtension* clone() const 00089 { 00090 return new SoftwareVersion( *this ); 00091 } 00092 00093 private: 00094 std::string m_name; 00095 std::string m_version; 00096 std::string m_os; 00097 }; 00098 00099 } 00100 00101 #endif// SOFTWAREVERSION_H__