bump api and fix some tests

This commit is contained in:
Simon Stürz 2016-04-01 18:56:26 +02:00 committed by Michael Zanetti
parent 12a2d8009d
commit 5c334c2521
2 changed files with 49 additions and 8 deletions

View File

@ -1,4 +1,4 @@
38 39
{ {
"methods": { "methods": {
"Actions.ExecuteAction": { "Actions.ExecuteAction": {
@ -334,15 +334,15 @@
], ],
"name": "String", "name": "String",
"o:enabled": "Bool", "o:enabled": "Bool",
"o:eventDescriptor": "$ref:EventDescriptor", "o:eventDescriptors": [
"o:eventDescriptorList": [
"$ref:EventDescriptor" "$ref:EventDescriptor"
], ],
"o:executable": "Bool", "o:executable": "Bool",
"o:exitActions": [ "o:exitActions": [
"$ref:RuleAction" "$ref:RuleAction"
], ],
"o:stateEvaluator": "$ref:StateEvaluator" "o:stateEvaluator": "$ref:StateEvaluator",
"o:timeDescriptor": "$ref:TimeDescriptor"
}, },
"returns": { "returns": {
"o:ruleId": "Uuid", "o:ruleId": "Uuid",
@ -366,8 +366,7 @@
], ],
"name": "String", "name": "String",
"o:enabled": "Bool", "o:enabled": "Bool",
"o:eventDescriptor": "$ref:EventDescriptor", "o:eventDescriptors": [
"o:eventDescriptorList": [
"$ref:EventDescriptor" "$ref:EventDescriptor"
], ],
"o:executable": "Bool", "o:executable": "Bool",
@ -375,6 +374,7 @@
"$ref:RuleAction" "$ref:RuleAction"
], ],
"o:stateEvaluator": "$ref:StateEvaluator", "o:stateEvaluator": "$ref:StateEvaluator",
"o:timeDescriptor": "$ref:TimeDescriptor",
"ruleId": "Uuid" "ruleId": "Uuid"
}, },
"returns": { "returns": {
@ -574,8 +574,15 @@
"Bool", "Bool",
"Variant", "Variant",
"Color", "Color",
"Time",
"Object" "Object"
], ],
"CalendarItem": {
"duration": "UInt",
"o:datetime": "UInt",
"o:repeating": "$ref:RepeatingOption",
"o:startTime": "Time"
},
"CreateMethod": [ "CreateMethod": [
"CreateMethodUser", "CreateMethodUser",
"CreateMethodAuto", "CreateMethodAuto",
@ -792,6 +799,22 @@
"RemovePolicyCascade", "RemovePolicyCascade",
"RemovePolicyUpdate" "RemovePolicyUpdate"
], ],
"RepeatingMode": [
"RepeatingModeNone",
"RepeatingModeHourly",
"RepeatingModeDaily",
"RepeatingModeWeekly",
"RepeatingModeMonthly"
],
"RepeatingOption": {
"mode": "$ref:RepeatingMode",
"o:monthDays": [
"Int"
],
"o:weekDays": [
"Int"
]
},
"Rule": { "Rule": {
"actions": [ "actions": [
"$ref:RuleAction" "$ref:RuleAction"
@ -807,7 +830,8 @@
], ],
"id": "Uuid", "id": "Uuid",
"name": "String", "name": "String",
"stateEvaluator": "$ref:StateEvaluator" "stateEvaluator": "$ref:StateEvaluator",
"timeDescriptor": "$ref:TimeDescriptor"
}, },
"RuleAction": { "RuleAction": {
"actionTypeId": "Uuid", "actionTypeId": "Uuid",
@ -844,6 +868,10 @@
"RuleErrorInvalidStateEvaluatorValue", "RuleErrorInvalidStateEvaluatorValue",
"RuleErrorTypesNotMatching", "RuleErrorTypesNotMatching",
"RuleErrorNotExecutable", "RuleErrorNotExecutable",
"RuleErrorInvalidTimeDescriptor",
"RuleErrorInvalidRepeatingOption",
"RuleErrorInvalidCalendarItem",
"RuleErrorInvalidTimeEventItem",
"RuleErrorContainsEventBasesAction", "RuleErrorContainsEventBasesAction",
"RuleErrorNoExitActions" "RuleErrorNoExitActions"
], ],
@ -887,6 +915,19 @@
"o:unit": "$ref:Unit", "o:unit": "$ref:Unit",
"type": "$ref:BasicType" "type": "$ref:BasicType"
}, },
"TimeDescriptor": {
"o:calendarItems": [
"$ref:CalendarItem"
],
"o:timeEventItems": [
"$ref:TimeEventItem"
]
},
"TimeEventItem": {
"o:datetime": "UInt",
"o:repeating": "$ref:RepeatingOption",
"o:time": "Time"
},
"Unit": [ "Unit": [
"UnitNone", "UnitNone",
"UnitSeconds", "UnitSeconds",

View File

@ -278,7 +278,7 @@ void TestJSONRPC::ruleAddedRemovedNotifications()
QVariantMap params; QVariantMap params;
params.insert("name", "Test Rule notifications"); params.insert("name", "Test Rule notifications");
params.insert("actions", QVariantList() << actionNoParams); params.insert("actions", QVariantList() << actionNoParams);
params.insert("eventDescriptor", eventDescriptor); params.insert("eventDescriptors", QVariantList() << eventDescriptor);
params.insert("stateEvaluator", stateEvaluator); params.insert("stateEvaluator", stateEvaluator);
QVariant response = injectAndWait("Rules.AddRule", params); QVariant response = injectAndWait("Rules.AddRule", params);