summaryrefslogtreecommitdiffstats
blob: cc581149fb7c8e98e3554eb663cc56395932d65c (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
/*
 * Copyright (c) 2010 Remko Tronçon
 * Licensed under the GNU General Public License v3.
 * See Documentation/Licenses/GPLv3.txt for more information.
 */

#include "Swiften/Queries/Responders/SoftwareVersionResponder.h"
#include "Swiften/Queries/IQRouter.h"

namespace Swift {

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 JID&, const String& id, boost::shared_ptr<SoftwareVersion>) {
	sendResponse(from, id, boost::shared_ptr<SoftwareVersion>(new SoftwareVersion(client, version)));
	return true;
}

}