summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHanzZ <hanzz.k@gmail.com>2011-09-30 11:38:49 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-09-30 17:11:45 (GMT)
commita98f648f5cfbf474c566bd63193047e5381e7d5e (patch)
treec9930886d46da6c423a8c71a9e0ffc55598fdb92
parent78ae057c543f4e272332430981eecd06850fbd96 (diff)
downloadswift-contrib-a98f648f5cfbf474c566bd63193047e5381e7d5e.zip
swift-contrib-a98f648f5cfbf474c566bd63193047e5381e7d5e.tar.bz2
Added way to set from in BytestreamsRequest and StreamInitiationRequest
Copyright (c) 2011 Jan Kaluza Licensed under the Simplified BSD license. See Documentation/Licenses/BSD-simplified.txt for more information.
-rw-r--r--Swiften/FileTransfer/BytestreamsRequest.h7
-rw-r--r--Swiften/FileTransfer/StreamInitiationRequest.h7
2 files changed, 14 insertions, 0 deletions
diff --git a/Swiften/FileTransfer/BytestreamsRequest.h b/Swiften/FileTransfer/BytestreamsRequest.h
index 0e97b5c..fee09ee 100644
--- a/Swiften/FileTransfer/BytestreamsRequest.h
+++ b/Swiften/FileTransfer/BytestreamsRequest.h
@@ -20,8 +20,15 @@ namespace Swift {
return ref(new BytestreamsRequest(jid, payload, router));
}
+ static ref create(const JID& from, const JID& to, boost::shared_ptr<Bytestreams> payload, IQRouter* router) {
+ return ref(new BytestreamsRequest(from, to, payload, router));
+ }
+
private:
BytestreamsRequest(const JID& jid, boost::shared_ptr<Bytestreams> payload, IQRouter* router) : GenericRequest<Bytestreams>(IQ::Set, jid, payload, router) {
}
+
+ BytestreamsRequest(const JID& from, const JID& to, boost::shared_ptr<Bytestreams> payload, IQRouter* router) : GenericRequest<Bytestreams>(IQ::Set, from, to, payload, router) {
+ }
};
}
diff --git a/Swiften/FileTransfer/StreamInitiationRequest.h b/Swiften/FileTransfer/StreamInitiationRequest.h
index 40e38be..658a8a9 100644
--- a/Swiften/FileTransfer/StreamInitiationRequest.h
+++ b/Swiften/FileTransfer/StreamInitiationRequest.h
@@ -19,8 +19,15 @@ namespace Swift {
return ref(new StreamInitiationRequest(jid, payload, router));
}
+ static ref create(const JID& from, const JID& to, boost::shared_ptr<StreamInitiation> payload, IQRouter* router) {
+ return ref(new StreamInitiationRequest(from, to, payload, router));
+ }
+
private:
StreamInitiationRequest(const JID& jid, boost::shared_ptr<StreamInitiation> payload, IQRouter* router) : GenericRequest<StreamInitiation>(IQ::Set, jid, payload, router) {
}
+
+ StreamInitiationRequest(const JID& from, const JID& to, boost::shared_ptr<StreamInitiation> payload, IQRouter* router) : GenericRequest<StreamInitiation>(IQ::Set, from, to, payload, router) {
+ }
};
}