• Main Page
  • Classes
  • Files
  • File List

Swiften/Disco/JIDDiscoInfoResponder.h

00001 /*
00002  * Copyright (c) 2010 Remko Tronçon
00003  * Licensed under the GNU General Public License v3.
00004  * See Documentation/Licenses/GPLv3.txt for more information.
00005  */
00006 
00007 #pragma once
00008 
00009 #include <map>
00010 
00011 #include <Swiften/Base/API.h>
00012 #include <Swiften/Queries/GetResponder.h>
00013 #include <Swiften/Elements/DiscoInfo.h>
00014 #include <Swiften/JID/JID.h>
00015 
00016 namespace Swift {
00017   class IQRouter;
00018 
00019   class SWIFTEN_API JIDDiscoInfoResponder : public GetResponder<DiscoInfo> {
00020     public:
00021       JIDDiscoInfoResponder(IQRouter* router);
00022 
00023       void clearDiscoInfo(const JID& jid);
00024       void setDiscoInfo(const JID& jid, const DiscoInfo& info);
00025       void setDiscoInfo(const JID& jid, const std::string& node, const DiscoInfo& info);
00026 
00027     private:
00028       virtual bool handleGetRequest(const JID& from, const JID& to, const std::string& id, boost::shared_ptr<DiscoInfo> payload);
00029 
00030     private:
00031       struct JIDDiscoInfo {
00032         DiscoInfo discoInfo;
00033         std::map<std::string, DiscoInfo> nodeDiscoInfo;
00034       };
00035       typedef std::map<JID, JIDDiscoInfo> JIDDiscoInfoMap;
00036       JIDDiscoInfoMap info;
00037   };
00038 }

Generated on Fri Oct 12 2012 21:00:19 for Swiften by  doxygen 1.7.1