JLChen
2021-05-18 a869383e163a18cdedcf587383c1eca043129754
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
//
//  Copyright © 2019 dahua. All rights reserved.
//  设备操作相关接口
 
#import <Foundation/Foundation.h>
#import "LCModel.h"
 
NS_ASSUME_NONNULL_BEGIN
 
@interface LCDeviceHandleInterface : NSObject
 
/**
 设备抓图
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param success 成功回调(返回抓图访问地址)
 @param failure 失败回调
 */
+ (void)setDeviceSnapWithDevice:(NSString *)deviceId Channel:(NSString *)channelId success:(void (^)(NSString *picUrlString))success
                        failure:(void (^)(LCError *error))failure;
 
/**
 设备抓图升级版
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param success 成功回调(返回抓图访问地址)
 @param failure 失败回调
 */
+ (void)setDeviceSnapEnhancedWithDevice:(NSString *)deviceId Channel:(NSString *)channelId success:(void (^)(NSString *picUrlString))success
                                failure:(void (^)(LCError *error))failure;
 
/**
 云台控制V2
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param operation 操作行为
 @param duration 持续时间
 @param success 成功回调(返回抓图访问地址)
 @param failure 失败回调
 */
+ (void)controlMovePTZWithDevice:(NSString *)deviceId Channel:(NSString *)channelId Operation:(NSString *)operation Duration:(NSInteger)duration success:(void (^)(NSString *picUrlString))success
                         failure:(void (^)(LCError *error))failure;
 
/**
 获取设备周边WiFi信息
 
 @param deviceId 设备序列号
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)wifiAroundDevice:(NSString *)deviceId success:(void (^)(LCAroundWifiInfo *wifiInfo))success
                 failure:(void (^)(LCError *error))failure;
 
/**
 当前设备连接的WiFi信息
 
 @param deviceId 设备序列号
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)currentDeviceWifiDevice:(NSString *)deviceId success:(void (^)(LCWifiInfo *wifiInfo))success
                        failure:(void (^)(LCError *error))failure;
 
/**
 控制设备连接至某一Wifi
 
 @param deviceId 设备序列号
 @param session WiFi连接信息
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)controlDeviceWifiFor:(NSString *)deviceId ConnestSession:(LCWifiConnectSession *)session success:(void (^)(void))success
                     failure:(void (^)(LCError *error))failure;
 
/**
 获取设备最新版本并升级
 
 @param deviceId 设备序列号
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)upgradeDevice:(NSString *)deviceId success:(void (^)(void))success
              failure:(void (^)(LCError *error))failure;
 
/**
 设置动检开关
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param enable 是否生效
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)modifyDeviceAlarmStatus:(NSString *)deviceId channelId:(NSString *)channelId enable:(BOOL)enable success:(void (^)(void))success
                        failure:(void (^)(LCError *error))failure;
 
/**
 获取动检计划
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)deviceAlarmPlan:(NSString *)deviceId channelId:(NSString *)channelId success:(void (^)(LCAlarmPlan *plan))success
                failure:(void (^)(LCError *error))failure;
 
/**
 配置动检计划
 
 @param deviceId 设备序列号
 @param plan 动检计划
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)modifyDeviceAlarmPlan:(NSString *)deviceId LCAlarmPlan:(LCAlarmPlan *)plan success:(void (^)(void))success
                      failure:(void (^)(LCError *error))failure;
 
/**
 获取呼吸灯状态
 
 @param deviceId 设备序列号
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)breathingLightStatusForDevice:(NSString *)deviceId success:(void (^)(BOOL status))success
                              failure:(void (^)(LCError *error))failure;
 
/**
 设置呼吸灯状态
 
 @param deviceId 设备序列号
 @param open 是否打开呼吸灯
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)modifyBreathingLightForDevice:(NSString *)deviceId Status:(BOOL)open success:(void (^)(void))success
                              failure:(void (^)(LCError *error))failure;
 
/**
 获取设备翻转状态
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)frameReverseStatusForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId success:(void (^)(NSString *direction))success
                            failure:(void (^)(LCError *error))failure;
 
/**
 设定设备翻转状态
 
 @param deviceId 设备序列号
 @param direction 画面方向(normal:正常;reverse:翻转)
 @param channelId 通道号
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)modifyFrameReverseStatusForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId Direction:(NSString *)direction success:(void (^)(void))success
                                  failure:(void (^)(LCError *error))failure;
 
/**
 格式化设备SD卡
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param success 成功回调 ( 1.start-recover:开始初始化(正常情况下)2.no-sdcard:插槽内无SD卡 3.in-recover:正在初始化(有可能别的客户端已经请求初始化)4.sdcard-error:其他SD卡错误)
 @param failure 失败回调
 */
+ (void)recoverSDCardForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId success:(void (^)(NSString *result))success
                       failure:(void (^)(LCError *error))failure;
 
/**
 设置设备的OSD配置
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param open 是否打开OSD设置
 @param osd OSD字符
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)setDeviceOsdForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId enable:(BOOL)open OSD:(NSString *)osd success:(void (^)(void))success
                      failure:(void (^)(LCError *error))failure;
 
/**
 获取设备OSD配置
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)queryDeviceOsdForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId success:(void (^)(BOOL enable, NSString *osd))success
                        failure:(void (^)(LCError *error))failure;
 
/**
 设置设备视频封面
 
 @param deviceId 设备序列号
 @param channelId 通道号
 @param data 图片二进制数据的base64编码字符串
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)uploadDeviceCoverPictureForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId PictureData:(NSData *)data success:(void (^)(NSString *picUrlString))success
                                  failure:(void (^)(LCError *error))failure;
 
/**
 获取设备云台控制接口
 
 @param deviceId 设备ID
 @param channelId 通道ID
 @param success 成功回调(h,v,z)
 @param failure 失败回调
 */
+ (void)devicePTZInfoForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId success:(void (^)(NSString *h, NSString *v, NSString *z))success
                       failure:(void (^)(LCError *error))failure;
 
/**
 设备/通道封面刷新
 
 @param deviceId 设备Id
 @param channelId 通道Id
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)refreshDeviceCoverForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId success:(void (^)(void))success
                            failure:(void (^)(LCError *error))failure;
 
/**
 新增收藏点
 
 @param deviceId 设备ID
 @param channelId 通道ID
 @param name 收藏点名称
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)setCollectionForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId Name:(NSString *)name success:(void (^)(void))success
                       failure:(void (^)(LCError *error))failure;
 
/**
 删除收藏点
 
 @param deviceId 设备ID
 @param channelId 通道ID
 @param nameList 收藏点名称列表
 @param success 成功回调
 @param failure 失败回调
 */
+ (void)deleteCollectionForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId NameList:(NSMutableArray <NSString *> *)nameList success:(void (^)(void))success
                          failure:(void (^)(LCError *error))failure;
 
/**
 获取收藏点信息
 
 @param deviceId 设备ID
 @param channelId 通道ID
 @param success 成功回调(String数组)
 @param failure 失败回调
 */
+ (void)getCollectionForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId success:(void (^)(NSMutableArray <NSString *> *))success
                       failure:(void (^)(LCError *error))failure;
 
+(void)modifyCollectionForDevice:(NSString *)deviceId ChannelId:(NSString *)channelId success:(void (^)(NSMutableArray <NSString *> *))success
failure:(void (^)(LCError *error))failure;
 
@end
 
NS_ASSUME_NONNULL_END