00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ADHOC_H__
00016 #define ADHOC_H__
00017
00018 #include "adhoccommandprovider.h"
00019 #include "disconodehandler.h"
00020 #include "iqhandler.h"
00021
00022 #include <string>
00023 #include <list>
00024 #include <map>
00025
00026 namespace gloox
00027 {
00028
00029 class ClientBase;
00030 class Disco;
00031 class Stanza;
00032
00072 class GLOOX_API Adhoc : public DiscoNodeHandler, IqHandler
00073 {
00074 public:
00081 Adhoc( ClientBase *parent, Disco *disco );
00082
00086 virtual ~Adhoc();
00087
00088
00089 virtual StringList handleDiscoNodeFeatures( const std::string& node );
00090
00091
00092 virtual StringMap handleDiscoNodeIdentities( const std::string& node, std::string& name );
00093
00094
00095 virtual StringMap handleDiscoNodeItems( const std::string& node );
00096
00097
00098 virtual bool handleIq( Stanza *stanza );
00099
00100
00101 virtual bool handleIqID( Stanza *stanza, int context );
00102
00110 void registerAdhocCommandProvider( AdhocCommandProvider *acp, const std::string& command,
00111 const std::string& name );
00112
00113 private:
00114 typedef std::map<const std::string, AdhocCommandProvider*> AdhocCommandProviderMap;
00115
00116 ClientBase *m_parent;
00117 Disco *m_disco;
00118
00119 AdhocCommandProviderMap m_adhocCommandProviders;
00120 StringMap m_items;
00121
00122 };
00123
00124 }
00125
00126 #endif // ADHOC_H__