parent
1ffe5ee721
commit
b07433a8b5
11
debian/changelog
vendored
11
debian/changelog
vendored
@ -1,9 +1,14 @@
|
||||
guh (0.1.3) UNRELEASED; urgency=medium
|
||||
guh (0.1.4) trusty; urgency=medium
|
||||
|
||||
* Add discoveryParams to DeviceClass
|
||||
|
||||
-- Michael Zanetti <micha@noneyet> Mon, 05 May 2014 20:30:49 +0200
|
||||
|
||||
guh (0.1.3) trusty; urgency=medium
|
||||
|
||||
* Added Actions.GetActionType(actionTypeId) to JSONRPC
|
||||
*
|
||||
|
||||
-- Michael Zanetti <micha@noneyet> Mon, 05 May 2014 20:26:49 +0200
|
||||
-- Michael Zanetti <micha@noneyet> Mon, 05 May 2014 20:30:38 +0200
|
||||
|
||||
guh (0.1.2) trusty; urgency=medium
|
||||
|
||||
|
||||
@ -141,6 +141,16 @@ void DeviceClass::setParams(const QList<ParamType> ¶ms)
|
||||
m_params = params;
|
||||
}
|
||||
|
||||
QList<ParamType> DeviceClass::discoveryParams() const
|
||||
{
|
||||
return m_discoveryParams;
|
||||
}
|
||||
|
||||
void DeviceClass::setDiscoveryParams(const QList<ParamType> ¶ms)
|
||||
{
|
||||
m_discoveryParams = params;
|
||||
}
|
||||
|
||||
DeviceClass::CreateMethod DeviceClass::createMethod() const
|
||||
{
|
||||
return m_createMethod;
|
||||
|
||||
@ -66,6 +66,9 @@ public:
|
||||
QList<ParamType> params() const;
|
||||
void setParams(const QList<ParamType> ¶ms);
|
||||
|
||||
QList<ParamType> discoveryParams() const;
|
||||
void setDiscoveryParams(const QList<ParamType> ¶ms);
|
||||
|
||||
CreateMethod createMethod() const;
|
||||
void setCreateMethod(CreateMethod createMethod);
|
||||
SetupMethod setupMethod() const;
|
||||
@ -82,6 +85,7 @@ private:
|
||||
QList<EventType> m_events;
|
||||
QList<ActionType> m_actions;
|
||||
QList<ParamType> m_params;
|
||||
QList<ParamType> m_discoveryParams;
|
||||
CreateMethod m_createMethod;
|
||||
SetupMethod m_setupMethod;
|
||||
};
|
||||
|
||||
@ -325,6 +325,9 @@ QList<DeviceClass> DevicePluginOpenweathermap::supportedDevices() const
|
||||
ParamType locationParam("location", QVariant::String);
|
||||
params.append(locationParam);
|
||||
|
||||
//Location is all we need for discovery.
|
||||
deviceClassOpenweathermap.setDiscoveryParams(params);
|
||||
|
||||
ParamType countryParam("country", QVariant::String);
|
||||
params.append(countryParam);
|
||||
|
||||
|
||||
@ -128,6 +128,7 @@ void JsonTypes::init()
|
||||
s_deviceClass.insert("events", QVariantList() << eventTypeRef());
|
||||
s_deviceClass.insert("actions", QVariantList() << actionTypeRef());
|
||||
s_deviceClass.insert("params", QVariantList() << paramTypeRef());
|
||||
s_deviceClass.insert("discoveryParams", QVariantList() << paramTypeRef());
|
||||
s_deviceClass.insert("setupMethod", setupMethodTypesRef());
|
||||
s_deviceClass.insert("createMethod", createMethodTypesRef());
|
||||
|
||||
@ -319,8 +320,13 @@ QVariantMap JsonTypes::packDeviceClass(const DeviceClass &deviceClass)
|
||||
foreach (const ParamType ¶mType, deviceClass.params()) {
|
||||
paramTypes.append(packParamType(paramType));
|
||||
}
|
||||
QVariantList discoveryParamTypes;
|
||||
foreach (const ParamType ¶mType, deviceClass.discoveryParams()) {
|
||||
discoveryParamTypes.append(packParamType(paramType));
|
||||
}
|
||||
|
||||
variant.insert("params", paramTypes);
|
||||
variant.insert("discoveryParams", discoveryParamTypes);
|
||||
variant.insert("states", stateTypes);
|
||||
variant.insert("events", eventTypes);
|
||||
variant.insert("actions", actionTypes);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
0.1.3
|
||||
0.1.4
|
||||
{
|
||||
"methods": {
|
||||
"Actions.ExecuteAction": {
|
||||
@ -296,6 +296,9 @@
|
||||
"$ref:ActionType"
|
||||
],
|
||||
"createMethod": "$ref:CreateMethodType",
|
||||
"discoveryParams": [
|
||||
"$ref:ParamType"
|
||||
],
|
||||
"events": [
|
||||
"$ref:EventType"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user