diff --git a/guh.pri b/guh.pri index eb15dca7..43d00b63 100644 --- a/guh.pri +++ b/guh.pri @@ -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}\\\" \ diff --git a/server/jsonrpc/jsontypes.cpp b/server/jsonrpc/jsontypes.cpp index 77287d7b..ff7d89bd 100644 --- a/server/jsonrpc/jsontypes.cpp +++ b/server/jsonrpc/jsontypes.cpp @@ -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()) { diff --git a/tests/auto/api.json b/tests/auto/api.json index fde4d1bf..8158a38c 100644 --- a/tests/auto/api.json +++ b/tests/auto/api.json @@ -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"