• Main Page
  • Classes
  • Files
  • File List

Swiften/Queries/Requests/SetPrivateStorageRequest.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 <Swiften/Base/boost_bsignals.h>
00010 #include <boost/shared_ptr.hpp>
00011 #include <boost/smart_ptr/make_shared.hpp>
00012 
00013 #include <Swiften/Queries/Request.h>
00014 #include <Swiften/Elements/PrivateStorage.h>
00015 #include <Swiften/Elements/ErrorPayload.h>
00016 
00017 namespace Swift {
00018   template<typename PAYLOAD_TYPE>
00019   class SetPrivateStorageRequest : public Request {
00020     public:
00021       typedef boost::shared_ptr<SetPrivateStorageRequest<PAYLOAD_TYPE> > ref;
00022 
00023       static ref create(boost::shared_ptr<PAYLOAD_TYPE> payload, IQRouter* router) {
00024         return ref(new SetPrivateStorageRequest<PAYLOAD_TYPE>(payload, router));
00025       }
00026 
00027     private:
00028       SetPrivateStorageRequest(boost::shared_ptr<PAYLOAD_TYPE> payload, IQRouter* router) : Request(IQ::Set, JID(), boost::make_shared<PrivateStorage>(payload), router) {
00029       }
00030 
00031       virtual void handleResponse(boost::shared_ptr<Payload>, ErrorPayload::ref error) {
00032         onResponse(error);
00033       }
00034 
00035     public:
00036       boost::signal<void (ErrorPayload::ref)> onResponse;
00037   };
00038 }

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