/* * Copyright (c) 2010 Kevin Smith * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #pragma once #include #include #include #include namespace Swift { class SetRosterRequest : public Request { public: typedef boost::shared_ptr ref; static ref create(RosterPayload::ref payload, IQRouter* router) { return ref(new SetRosterRequest(JID(), payload, router)); } static ref create(RosterPayload::ref payload, const JID& to, IQRouter* router) { return ref(new SetRosterRequest(to, payload, router)); } private: SetRosterRequest(const JID& to, boost::shared_ptr payload, IQRouter* router) : Request(IQ::Set, to, boost::shared_ptr(payload), router) { } virtual void handleResponse(boost::shared_ptr /*payload*/, ErrorPayload::ref error) { onResponse(error); } public: boost::signal onResponse; }; }