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

capabilities.h

00001 /*
00002   Copyright (c) 2007-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 CAPABILITIES_H__
00015 #define CAPABILITIES_H__
00016 
00017 #include "disconodehandler.h"
00018 #include "stanzaextension.h"
00019 #include "tag.h"
00020 
00021 #include <string>
00022 
00023 namespace gloox
00024 {
00025 
00026   class Disco;
00027   class Tag;
00028 
00036   class GLOOX_API Capabilities : public StanzaExtension, public DiscoNodeHandler
00037   {
00038 
00039     public:
00044       Capabilities( Disco* disco );
00045 
00050       Capabilities( const Tag* tag );
00051 
00055       virtual ~Capabilities();
00056 
00061       const std::string& node() const { return m_node; }
00062 
00067       void setNode( const std::string& node ) { m_node = node; }
00068 
00073       const std::string ver() const;
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 Capabilities( tag );
00082       }
00083 
00084       // reimplemented from StanzaExtension
00085       virtual Tag* tag() const;
00086 
00087       // reimplemented from DiscoNodeHandler
00088       virtual StringList handleDiscoNodeFeatures( const JID& from, const std::string& node );
00089 
00090       // reimplemented from DiscoNodeHandler
00091       virtual Disco::IdentityList handleDiscoNodeIdentities( const JID& from,
00092                                                              const std::string& node );
00093 
00094       // reimplemented from DiscoNodeHandler
00095       virtual Disco::ItemList handleDiscoNodeItems( const JID& from,
00096                                                     const std::string& node = EmptyString );
00097 
00098     private:
00099       Disco* m_disco;
00100       std::string m_node;
00101       std::string m_ver;
00102       bool m_valid;
00103   };
00104 
00105 }
00106 
00107 #endif // CAPABILITIES_H__

Generated on Mon Sep 1 09:25:09 2008 for gloox by  doxygen 1.4.1