| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using Foundation; |
| | | using HDLSceneSiri; |
| | | using ObjCRuntime; |
| | |
| | | { |
| | | if (Server.HttpServerRequest.Ins.DataManager.IsLgoin) |
| | | { |
| | | var result = Server.HttpServerRequest.Ins.ExecuteScene(intent.SceneId); |
| | | var result = "-1"; |
| | | if (intent.ControlType == "1") |
| | | { |
| | | result = Server.HttpServerRequest.Ins.ExecuteScene(intent.ControlId); |
| | | } |
| | | else |
| | | { |
| | | |
| | | var security = Newtonsoft.Json.JsonConvert.DeserializeObject<SecurityState>(intent.ControlJSONStr); |
| | | var sendObj = new List<SecurityState>() { new SecurityState() { |
| | | gatewayId =security.gatewayId,sid = security.sid, status = security.status, userSecurityId = security.userSecurityId |
| | | } }; |
| | | result = Server.HttpServerRequest.Ins.SetSecurityStatus(sendObj); |
| | | } |
| | | if (result == "0") |
| | | { |
| | | var rsp = new HDLRunSceneIntentResponse(HDLRunSceneIntentResponseCode.Success, null); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 安防状态配置 |
| | | /// </summary> |
| | | public class SecurityState |
| | | { |
| | | /// <summary> |
| | | /// 安防云端id |
| | | /// </summary> |
| | | public string userSecurityId; |
| | | /// <summary> |
| | | /// 网关id 网关id 如果传的是sid该字段需要传 |
| | | /// </summary> |
| | | public string gatewayId; |
| | | /// <summary> |
| | | /// 安防sid |
| | | /// </summary> |
| | | public string sid; |
| | | /// <summary> |
| | | /// 状态 enable布防、disable撒防 |
| | | /// </summary> |
| | | public string status; |
| | | } |
| | | |
| | | } |