summaryrefslogtreecommitdiffstats
blob: 491f639f1743c50c2a5d55e2fcf232391a360839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) 2010-2016 Isode Limited.
 * All rights reserved.
 * See the COPYING file for more information.
 */

#include <Swiften/Queries/Responders/SoftwareVersionResponder.h>

#include <boost/smart_ptr/make_shared.hpp>

#include <Swiften/Queries/IQRouter.h>

namespace Swift {

SoftwareVersionResponder::SoftwareVersionResponder(IQRouter* router) : GetResponder<SoftwareVersion>(router) {
}

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::make_shared<SoftwareVersion>(client, version, os));
	return true;
}

}