add pluginId to DeviceClass -> close #294

This commit is contained in:
Simon Stürz 2016-02-22 16:08:10 +01:00 committed by Michael Zanetti
parent 57df12aec5
commit 8dc8531033
3 changed files with 12 additions and 3 deletions

View File

@ -2,7 +2,7 @@
GUH_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
# define protocol versions
JSON_PROTOCOL_VERSION=35
JSON_PROTOCOL_VERSION=36
REST_API_VERSION=1
DEFINES += GUH_VERSION_STRING=\\\"$${GUH_VERSION_STRING}\\\" \

View File

@ -189,6 +189,7 @@ void JsonTypes::init()
// DeviceClass
s_deviceClass.insert("id", basicTypeToString(Uuid));
s_deviceClass.insert("vendorId", basicTypeToString(Uuid));
s_deviceClass.insert("pluginId", basicTypeToString(Uuid));
s_deviceClass.insert("name", basicTypeToString(String));
s_deviceClass.insert("basicTags", QVariantList() << basicTagRef());
s_deviceClass.insert("stateTypes", QVariantList() << stateTypeRef());
@ -524,6 +525,7 @@ QVariantMap JsonTypes::packDeviceClass(const DeviceClass &deviceClass)
variant.insert("name", deviceClass.name());
variant.insert("id", deviceClass.id());
variant.insert("vendorId", deviceClass.vendorId());
variant.insert("pluginId", deviceClass.pluginId());
QVariantList basicTags;
foreach (const DeviceClass::BasicTag &basicTag, deviceClass.basicTags()) {

View File

@ -1,4 +1,4 @@
35
36
{
"methods": {
"Actions.ExecuteAction": {
@ -577,7 +577,13 @@
"params": [
"$ref:Param"
],
"setupComplete": "Bool"
"setupComplete": "Bool",
"states": [
{
"stateTypeId": "Uuid",
"value": "Variant"
}
]
},
"DeviceClass": {
"actionTypes": [
@ -600,6 +606,7 @@
"paramTypes": [
"$ref:ParamType"
],
"pluginId": "Uuid",
"setupMethod": "$ref:SetupMethod",
"stateTypes": [
"$ref:StateType"