Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

stanzaextension.h

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 #include <string>
00020 
00021 namespace gloox
00022 {
00023 
00024   class Tag;
00025 
00029   enum StanzaExtensionType
00030   {
00031     ExtNone,                        
00032     ExtVCardUpdate,                 
00034     ExtOOB,                         
00036     ExtGPGSigned,                   
00038     ExtGPGEncrypted,                
00040     ExtReceipt,                     
00042     ExtDelay,                       
00044     ExtAMP,                         
00046     ExtError,                       
00047     ExtCaps,                        
00049     ExtChatState,                   
00050     ExtMessageEvent,                
00051     ExtDataForm,                    
00052     ExtNickname,                    
00053     ExtResourceBind,                
00054     ExtSessionCreation,             
00055     ExtVersion,                     
00057     ExtXHtmlIM,                     
00059     ExtDiscoInfo,                   
00060     ExtDiscoItems,                  
00061     ExtAdhocCommand,                
00062     ExtPrivateXML,                  
00063     ExtRoster,                      
00064     ExtFeatureNeg,                  
00066     ExtIBB,                         
00067     ExtNonSaslAuth,                 
00068     ExtMUCOwner,                    
00069     ExtMUCAdmin,                    
00070     ExtMUCUser,                     
00071     ExtMUCUnique,                   
00072     ExtPing,                        
00073     ExtSearch,                      
00074     ExtRegistration,                
00075     ExtJingle,                      
00076     ExtVCard,                       
00077     ExtPrivacy,                     
00078     ExtLastActivity,                
00079     ExtFlexOffline,                 
00080     ExtSI,                          
00081     ExtS5BQuery,                    
00082     ExtPubSub,                      
00083     ExtPubSubOwner,                 
00084     ExtPubSubEvent,                 
00086     ExtUser                         
00089   };
00090 
00174   class GLOOX_API StanzaExtension
00175   {
00176     public:
00182       StanzaExtension( int type ) : m_valid( false ), m_extensionType( type ) {}
00183 
00187       virtual ~StanzaExtension() {}
00188 
00195       virtual const std::string& filterString() const = 0;
00196 
00208       virtual StanzaExtension* newInstance( const Tag* tag ) const = 0;
00209 
00214       virtual Tag* tag() const = 0;
00215 
00220       int extensionType() const { return m_extensionType; }
00221 
00222     protected:
00223       bool m_valid;
00224 
00225     private:
00226       int m_extensionType;
00227 
00228   };
00229 
00230 }
00231 
00232 #endif // STANZAEXTENSION_H__

Generated on Mon Oct 13 10:45:12 2008 for gloox by  doxygen 1.4.1