summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-04 15:40:40 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-04 15:40:40 (GMT)
commitbf5b66e7a8252fd1d9db26f5822c393e24ad091a (patch)
treea3dfe81e4bacd9d45fef5183da38b28854e62b0b /Swiften
parentbbf8a5fcb47d649bdcee1b2122eaa76f2c914ef7 (diff)
downloadswift-contrib-bf5b66e7a8252fd1d9db26f5822c393e24ad091a.zip
swift-contrib-bf5b66e7a8252fd1d9db26f5822c393e24ad091a.tar.bz2
Document custom requests & responders, and components.
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Queries/Request.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/Swiften/Queries/Request.h b/Swiften/Queries/Request.h
index 625c147..5ed518d 100644
--- a/Swiften/Queries/Request.h
+++ b/Swiften/Queries/Request.h
@@ -19,30 +19,40 @@
#include "Swiften/JID/JID.h"
namespace Swift {
+ /**
+ * An IQ get/set request query.
+ */
class Request : public IQHandler, public boost::enable_shared_from_this<Request> {
public:
void send();
protected:
+ /**
+ * Constructs a request of a certain type to a specific receiver, and attaches the given
+ * payload.
+ */
Request(
IQ::Type type,
const JID& receiver,
boost::shared_ptr<Payload> payload,
IQRouter* router);
+ /**
+ * Constructs a request of a certain type to a specific receiver.
+ */
Request(
IQ::Type type,
const JID& receiver,
IQRouter* router);
- virtual void setPayload(boost::shared_ptr<Payload> p) {
- payload_ = p;
+ virtual void setPayload(Payload::ref payload) {
+ payload_ = payload;
}
- boost::shared_ptr<Payload> getPayload() const {
+ Payload::ref getPayload() const {
return payload_;
}
- virtual void handleResponse(boost::shared_ptr<Payload>, ErrorPayload::ref) = 0;
+ virtual void handleResponse(Payload::ref, ErrorPayload::ref) = 0;
private:
bool handleIQ(boost::shared_ptr<IQ>);