diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-24 21:50:17 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-24 21:50:17 (GMT) |
commit | 5698df1c136ebfbf943139b27732bf271e007875 (patch) | |
tree | 86dc522849dde483828d73f0b31c593bb2eb605d /Swiften/Queries/Responders | |
parent | 90d6b45adf84976d99911feb3fb09b27cb6a8d1e (diff) | |
download | swift-5698df1c136ebfbf943139b27732bf271e007875.zip swift-5698df1c136ebfbf943139b27732bf271e007875.tar.bz2 |
Added Sluift client test script and the necessary infrastructure.
Diffstat (limited to 'Swiften/Queries/Responders')
-rw-r--r-- | Swiften/Queries/Responders/SoftwareVersionResponder.cpp | 5 | ||||
-rw-r--r-- | Swiften/Queries/Responders/SoftwareVersionResponder.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Swiften/Queries/Responders/SoftwareVersionResponder.cpp b/Swiften/Queries/Responders/SoftwareVersionResponder.cpp index 0b8362c..445dcc7 100644 --- a/Swiften/Queries/Responders/SoftwareVersionResponder.cpp +++ b/Swiften/Queries/Responders/SoftwareVersionResponder.cpp @@ -12,13 +12,14 @@ namespace Swift { SoftwareVersionResponder::SoftwareVersionResponder(IQRouter* router) : GetResponder<SoftwareVersion>(router) { } -void SoftwareVersionResponder::setVersion(const std::string& client, const std::string& version) { +void SoftwareVersionResponder::setVersion(const std::string& client, const std::string& version, const std::string& os) { this->client = client; this->version = version; + this->os = os; } bool SoftwareVersionResponder::handleGetRequest(const JID& from, const JID&, const std::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, os))); return true; } diff --git a/Swiften/Queries/Responders/SoftwareVersionResponder.h b/Swiften/Queries/Responders/SoftwareVersionResponder.h index f6a3d52..cbda54c 100644 --- a/Swiften/Queries/Responders/SoftwareVersionResponder.h +++ b/Swiften/Queries/Responders/SoftwareVersionResponder.h @@ -16,7 +16,7 @@ namespace Swift { public: SoftwareVersionResponder(IQRouter* router); - void setVersion(const std::string& client, const std::string& version); + void setVersion(const std::string& client, const std::string& version, const std::string& os = ""); private: virtual bool handleGetRequest(const JID& from, const JID& to, const std::string& id, boost::shared_ptr<SoftwareVersion> payload); @@ -24,5 +24,6 @@ namespace Swift { private: std::string client; std::string version; + std::string os; }; } |