diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-10-10 13:38:19 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-10-10 13:38:19 (GMT) |
commit | 5fcadd4e60d2e8bd8866bddef6bcefa59a18adf8 (patch) | |
tree | 198eafdec1dce1b7dc6ce21fbbd86bebbd4098cb /Swiften/Queries | |
parent | 29e4e51e21b8902c82456cc85af46fa5f5889f04 (diff) | |
download | swift-contrib-5fcadd4e60d2e8bd8866bddef6bcefa59a18adf8.zip swift-contrib-5fcadd4e60d2e8bd8866bddef6bcefa59a18adf8.tar.bz2 |
Move SoftwareVersionResponder constructor arguments to setter.
Diffstat (limited to 'Swiften/Queries')
-rw-r--r-- | Swiften/Queries/Responders/SoftwareVersionResponder.cpp | 11 | ||||
-rw-r--r-- | Swiften/Queries/Responders/SoftwareVersionResponder.h | 13 |
2 files changed, 13 insertions, 11 deletions
diff --git a/Swiften/Queries/Responders/SoftwareVersionResponder.cpp b/Swiften/Queries/Responders/SoftwareVersionResponder.cpp index a900ecb..b2e7273 100644 --- a/Swiften/Queries/Responders/SoftwareVersionResponder.cpp +++ b/Swiften/Queries/Responders/SoftwareVersionResponder.cpp @@ -9,13 +9,16 @@ namespace Swift { -SoftwareVersionResponder::SoftwareVersionResponder( - const String& client, const String& version, IQRouter* router) : - GetResponder<SoftwareVersion>(router), client_(client), version_(version) { +SoftwareVersionResponder::SoftwareVersionResponder(IQRouter* router) : GetResponder<SoftwareVersion>(router) { +} + +void SoftwareVersionResponder::setVersion(const String& client, const String& version) { + this->client = client; + this->version = version; } bool SoftwareVersionResponder::handleGetRequest(const JID& from, const String& id, boost::shared_ptr<SoftwareVersion>) { - sendResponse(from, id, boost::shared_ptr<SoftwareVersion>(new SoftwareVersion(client_, version_))); + sendResponse(from, id, boost::shared_ptr<SoftwareVersion>(new SoftwareVersion(client, version))); return true; } diff --git a/Swiften/Queries/Responders/SoftwareVersionResponder.h b/Swiften/Queries/Responders/SoftwareVersionResponder.h index b877b0c..7242b4b 100644 --- a/Swiften/Queries/Responders/SoftwareVersionResponder.h +++ b/Swiften/Queries/Responders/SoftwareVersionResponder.h @@ -4,8 +4,7 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ -#ifndef SWIFTEN_SoftwareVersionResponder_H -#define SWIFTEN_SoftwareVersionResponder_H +#pragma once #include "Swiften/Queries/GetResponder.h" #include "Swiften/Elements/SoftwareVersion.h" @@ -15,15 +14,15 @@ namespace Swift { class SoftwareVersionResponder : public GetResponder<SoftwareVersion> { public: - SoftwareVersionResponder(const String& client, const String& version, IQRouter* router); + SoftwareVersionResponder(IQRouter* router); + + void setVersion(const String& client, const String& version); private: virtual bool handleGetRequest(const JID& from, const String& id, boost::shared_ptr<SoftwareVersion> payload); private: - String client_; - String version_; + String client; + String version; }; } - -#endif |