00001 /* 00002 Copyright (c) 2006-2008 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 STANZAEXTENSION_H__ 00015 #define STANZAEXTENSION_H__ 00016 00017 #include "macros.h" 00018 00019 namespace gloox 00020 { 00021 00022 class Tag; 00023 00027 enum StanzaExtensionType 00028 { 00029 ExtNone = 1, 00030 ExtVCardUpdate = 2, 00032 ExtOOB = 4, 00034 ExtGPGSigned = 8, 00035 ExtGPGEncrypted = 16, 00036 ExtXDelay = 32, 00037 ExtDelay = 64 00038 }; 00039 00049 class GLOOX_API StanzaExtension 00050 { 00051 public: 00055 StanzaExtension( StanzaExtensionType type ) : m_type( type ) {} 00056 00060 virtual ~StanzaExtension() {} 00061 00066 StanzaExtensionType type() const { return m_type; } 00067 00072 virtual Tag* tag() const = 0; 00073 00074 private: 00075 StanzaExtensionType m_type; 00076 00077 }; 00078 00079 } 00080 00081 #endif // STANZAEXTENSION_H__