Merge remote branch 'erijo/get-controller-value'. This closes #202.

Conflicts:
	telldus-core/client/telldus-core.cpp
This commit is contained in:
Micke Prag 2012-03-30 16:49:29 +02:00
commit f57eebad74
2 changed files with 6 additions and 2 deletions

View file

@ -1198,8 +1198,8 @@ int WINAPI tdController(int *controllerId, int *controllerType, char *name, int
}
/**
* This function gets a parameter on a controller. Valid parameters are: @c
* serial and @c firmware
* This function gets a parameter on a controller.
* Valid parameters are: \c serial, \c name, \c available and \c firmware
*
* @param[in] controllerId
* The controller to change.

View file

@ -278,6 +278,10 @@ std::wstring ControllerManager::getControllerValue(int id, const std::wstring &n
}
if (name == L"serial") {
return it->second.serial;
} else if (name == L"name") {
return it->second.name;
} else if (name == L"available") {
return it->second.controller ? L"1" : L"0";
} else if (name == L"firmware") {
if (!it->second.controller) {
return L"-1";