summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Queries')
-rw-r--r--Swiften/Queries/Responders/SoftwareVersionResponder.cpp11
-rw-r--r--Swiften/Queries/Responders/SoftwareVersionResponder.h13
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