00001
00002
00003
00004
00005
00006
00007 #pragma once
00008
00009 #include <boost/smart_ptr/make_shared.hpp>
00010
00011 #include <Swiften/Queries/GenericRequest.h>
00012 #include <Swiften/Elements/DiscoItems.h>
00013
00014 namespace Swift {
00015 class GetDiscoItemsRequest : public GenericRequest<DiscoItems> {
00016 public:
00017 typedef boost::shared_ptr<GetDiscoItemsRequest> ref;
00018
00019 static ref create(const JID& jid, IQRouter* router) {
00020 return ref(new GetDiscoItemsRequest(jid, router));
00021 }
00022
00023 static ref create(const JID& jid, const std::string& node, IQRouter* router) {
00024 return ref(new GetDiscoItemsRequest(jid, node, router));
00025 }
00026
00027 private:
00028 GetDiscoItemsRequest(const JID& jid, IQRouter* router) :
00029 GenericRequest<DiscoItems>(IQ::Get, jid, boost::make_shared<DiscoItems>(), router) {
00030 }
00031
00032 GetDiscoItemsRequest(const JID& jid, const std::string& node, IQRouter* router) :
00033 GenericRequest<DiscoItems>(IQ::Get, jid, boost::make_shared<DiscoItems>(), router) {
00034 getPayloadGeneric()->setNode(node);
00035 }
00036 };
00037 }