• Main Page
  • Classes
  • Files
  • File List

Swiften/Disco/GetDiscoItemsRequest.h

00001 /*
00002  * Copyright (c) 2010 Kevin Smith
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 <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 }

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