summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-10 22:02:28 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-10 22:33:58 (GMT)
commit2fec654b2345ba974b843a0868d580f9c12fdfea (patch)
treeaee0bf059eaf66864c56e31316921fb428dad114 /Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h
parent896e2a121d58931740ea8becc0544e10e629c6c5 (diff)
downloadswift-contrib-2fec654b2345ba974b843a0868d580f9c12fdfea.zip
swift-contrib-2fec654b2345ba974b843a0868d580f9c12fdfea.tar.bz2
Added InBandRegistration classes.
Diffstat (limited to 'Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h')
-rw-r--r--Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h b/Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h
new file mode 100644
index 0000000..3ed14bb
--- /dev/null
+++ b/Swiften/Queries/Requests/SubmitInBandRegistrationFormRequest.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2010 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include "Swiften/Base/boost_bsignals.h"
+#include <boost/shared_ptr.hpp>
+
+#include "Swiften/Queries/Request.h"
+#include "Swiften/Elements/InBandRegistrationPayload.h"
+
+
+namespace Swift {
+ class SetInBandRegistrationRequest : public Request {
+ public:
+ typedef boost::shared_ptr<SetInBandRegistrationRequest> ref;
+
+ static ref create(InBandRegistrationPayload::ref payload, IQRouter* router) {
+ return ref(new SetInBandRegistrationRequest(payload, router));
+ }
+
+ private:
+ SetInBandRegistrationRequest(InBandRegistrationPayload::ref payload, IQRouter* router) : Request(IQ::Set, JID(), InBandRegistrationPayload::ref(payload), router) {
+ }
+
+ virtual void handleResponse(Payload::ref payload, boost::optional<ErrorPayload> error) {
+ onResponse(payload, error);
+ }
+
+ public:
+ boost::signal<void (Payload::ref, const boost::optional<ErrorPayload>&)> onResponse;
+ };
+}