00001
00002
00003
00004
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
00015 namespace Swift {
00016 class IQRouter;
00017
00018 class SWIFTEN_API DiscoInfoResponder : public GetResponder<DiscoInfo> {
00019 public:
00020 DiscoInfoResponder(IQRouter* router);
00021
00022 void clearDiscoInfo();
00023 void setDiscoInfo(const DiscoInfo& info);
00024 void setDiscoInfo(const std::string& node, const DiscoInfo& info);
00025
00026 private:
00027 virtual bool handleGetRequest(const JID& from, const JID& to, const std::string& id, boost::shared_ptr<DiscoInfo> payload);
00028
00029 private:
00030 DiscoInfo info_;
00031 std::map<std::string, DiscoInfo> nodeInfo_;
00032 };
00033 }