EZOpenSDK  4.8.6
 全部  函数 属性
EZGlobalSDK.h
1 //
2 // EZGlobalSDK.h
3 // EZGlobalSDK
4 //
5 // Created by DeJohn Dong on 16/7/14.
6 // Copyright © 2016年 Ezviz. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "EZConstants.h"
11 
12 @class EZPlayer;
13 @class EZAccessToken;
14 @class EZDeviceInfo;
15 @class EZCameraInfo;
16 @class EZDeviceVersion;
17 @class EZProbeDeviceInfo;
18 @class EZUserInfo;
20 @class EZLeaveMessage;
21 @class EZHiddnsDeviceInfo;
22 
24 @interface EZGlobalSDK : NSObject
25 
26 
35 + (BOOL)initLibWithAppKey:(NSString *)appKey;
36 
46 + (BOOL)initLibWithAppKey:(NSString *)appKey url:(NSString *)url authUrl:(NSString *)authUrl;
47 
54 + (void)setAccessToken:(NSString *)accessToken;
55 
62 + (BOOL)destoryLib;
63 
70 + (NSString *)getVersion;
71 
78 + (void)enableP2P:(BOOL)enable;
79 
88 + (NSOperation *)getAreaList:(void (^)(NSArray *areaList, NSError *error))completion;
89 
96 + (void)openLoginPage:(NSString *)areaId
97  completion:(void (^)(EZAccessToken *accessToken))block;
98 
105 + (void)logout:(void (^)(NSError *error))completion;
106 
116 + (NSOperation *)deleteAlarm:(NSArray *)alarmIds
117  completion:(void (^)(NSError *error))completion;
118 
129 + (NSOperation *)setAlarmStatus:(NSArray *)alarmIds
130  alarmStatus:(EZMessageStatus)status
131  completion:(void (^)(NSError *error))completion;
132 
133 
144 + (NSOperation *)deleteDevice:(NSString *)deviceSerial
145  completion:(void (^)(NSError *error))completion;
146 
158 + (BOOL)startConfigWifi:(NSString *)ssid
159  password:(NSString *)password
160  deviceSerial:(NSString *)deviceSerial
161  deviceStatus:(void (^)(EZWifiConfigStatus status))statusBlock;
162 
169 + (BOOL)stopConfigWifi;
170 
182 + (NSOperation *)controlPTZ:(NSString *)deviceSerial
183  cameraNo:(NSInteger)cameraNo
184  command:(EZPTZCommand)command
185  action:(EZPTZAction)action
186  speed:(NSInteger)speed
187  result:(void (^)(NSError *error))resultBlock;
188 
198 + (void)controlVideoFlip:(NSString *)deviceSerial
199  cameraNo:(NSInteger)cameraNo
200  command:(EZDisplayCommand)command
201  result:(void (^)(NSError *error))resultBlock;
202 
212 + (EZPlayer *)createPlayerWithDeviceSerial:(NSString *)deviceSerial
213  cameraNo:(NSInteger)cameraNo;
214 
215 
224 + (EZPlayer *)createPlayerWithUrl:(NSString *)url;
225 
226 
235 + (BOOL)releasePlayer:(EZPlayer *)player;
236 
237 #pragma mark - V3.1 新增加接口
238 
248 + (NSData *)decryptData:(NSData *)data verifyCode:(NSString *)verifyCode;
249 
250 
251 #pragma mark - V3.2 新增加接口
252 
262 + (NSOperation *)getDeviceVersion:(NSString *)deviceSerial
263  completion:(void (^)(EZDeviceVersion *version, NSError *error))completion;
264 
265 
277 + (NSOperation *)setDeviceEncryptStatus:(NSString *)deviceSerial
278  verifyCode:(NSString *)verifyCode
279  encrypt:(BOOL)isEncrypt
280  completion:(void (^)(NSError *error))completion;
281 
292 + (NSOperation *)setDeviceName:(NSString *)deviceName
293  deviceSerial:(NSString *)deviceSerial
294  completion:(void (^)(NSError *error))completion;
295 
304 + (NSOperation *)getUserInfo:(void (^)(EZUserInfo *userInfo, NSError *error))completion;
305 
316 + (NSOperation *)getUnreadMessageCount:(NSString *)deviceSerial
317  messageType:(EZMessageType)type
318  completion:(void (^)(NSInteger count, NSError *error))completion;
319 
333 + (NSOperation *)getLeaveMessageList:(NSString *)deviceSerial
334  pageIndex:(NSInteger)pageIndex
335  pageSize:(NSInteger)pageSize
336  beginTime:(NSDate *)beginTime
337  endTime:(NSDate *)endTime
338  completion:(void (^)(NSArray *leaveMessageList, NSInteger totalCount, NSError *error))completion;
339 
350 + (NSOperation *)setLeaveMessageStatus:(NSArray *)leaveIds
351  messageStatus:(EZMessageStatus)status
352  completion:(void (^)(NSError *error))completion;
353 
363 + (NSOperation *)deleteLeaveMessage:(NSArray *)leaveIds
364  completion:(void (^)(NSError *error))completion;
365 
375 + (NSOperation *)getStorageStatus:(NSString *)deviceSerial
376  completion:(void (^)(NSArray *storageStatus, NSError *error))completion;
377 
388 + (NSOperation *)formatStorage:(NSString *)deviceSerial
389  storageIndex:(NSInteger)storageIndex
390  completion:(void (^)(NSError *error))completion;
402 + (NSOperation *)probeDeviceInfo:(NSString *) deviceSerial
403  deviceType:(NSString *) deviceType
404  completion:(void (^)(EZProbeDeviceInfo *deviceInfo, NSError *error))completion;
405 
415 + (NSOperation *)getDeviceUpgradeStatus:(NSString *)deviceSerial
416  completion:(void (^)(EZDeviceUpgradeStatus *status, NSError *error))completion;
417 
427 + (NSOperation *)upgradeDevice:(NSString *)deviceSerial
428  completion:(void (^)(NSError *error))completion;
429 
430 
439 + (NSOperation *)getLeaveMessageData:(EZLeaveMessage *)message
440  completion:(void (^)(NSData *data, NSInteger resultCode))completion;
441 
448 + (void)openCloudPage:(NSString *)deviceSerial;
449 
456 + (void)openChangePasswordPage:(void (^)(NSInteger resultCode))completion;
457 
466 + (BOOL)setDebugLogEnable:(BOOL)enable;
467 
478 + (NSOperation *)getDeviceList:(NSInteger)pageIndex
479  pageSize:(NSInteger)pageSize
480  completion:(void (^)(NSArray *deviceList, NSInteger totalCount, NSError *error))completion;
481 
492 + (NSOperation *)getSharedDeviceList:(NSInteger)pageIndex
493  pageSize:(NSInteger)pageSize
494  completion:(void (^)(NSArray *deviceList, NSInteger totalCount, NSError *error))completion;
495 
508 + (NSOperation *)searchRecordFileFromCloud:(NSString *)deviceSerial
509  cameraNo:(NSInteger)cameraNo
510  beginTime:(NSDate *)beginTime
511  endTime:(NSDate *)endTime
512  completion:(void (^)(NSArray *couldRecords, NSError *error))completion;
513 
526 + (NSOperation *)searchRecordFileFromDevice:(NSString *)deviceSerial
527  cameraNo:(NSInteger)cameraNo
528  beginTime:(NSDate *)beginTime
529  endTime:(NSDate *)endTime
530  completion:(void (^)(NSArray *deviceRecords, NSError *error))completion;
531 
545 + (NSOperation *)getAlarmList:(NSString *)deviceSerial
546  pageIndex:(NSInteger)pageIndex
547  pageSize:(NSInteger)pageSize
548  beginTime:(NSDate *)beginTime
549  endTime:(NSDate *)endTime
550  completion:(void (^)(NSArray *alarmList, NSInteger totalCount, NSError *error))completion;
551 
562 + (NSOperation *)addDevice:(NSString *)deviceSerial
563  verifyCode:(NSString *)verifyCode
564  completion:(void (^)(NSError *error))completion;
565 
578 + (NSOperation *)captureCamera:(NSString *)deviceSerial
579  cameraNo:(NSInteger)cameraNo
580  completion:(void (^)(NSString *url, NSError *error))completion;
581 
594 + (NSOperation *)setVideoLevel:(NSString *)deviceSerial
595  cameraNo:(NSInteger)cameraNo
596  videoLevel:(NSInteger)videoLevel
597  completion:(void (^)(NSError *error))completion;
598 
609 + (NSOperation *)setDefence:(EZDefenceStatus)defence
610  deviceSerial:(NSString *)deviceSerial
611  completion:(void (^)(NSError *error))completion;
612 
613 #pragma mark - V4.3 新增加接口
614 
624 + (NSOperation *)getDeviceInfo:(NSString *)deviceSerial
625  completion:(void (^)(EZDeviceInfo *deviceInfo, NSError *error))completion;
626 
633 + (NSString *) getTerminalId;
634 
635 #pragma mark - V4.4 新增加接口
636 
641 + (void) initPushService;
642 
643 #pragma mark - V4.5 新增加接口
644 
648 + (void) clearStreamInfoCache;
649 
650 
651 #pragma mark - V4.7 新增接口
652 
662 + (NSOperation *)getHiddnsDeviceInfo:(NSString *)deviceSerial
663  domain:(NSString *) domain
664  completion:(void (^)(EZHiddnsDeviceInfo *ddnsDeviceInfo, NSError *error))completion;
665 
675 + (NSOperation *)setHiddnsDomain:(NSString *)deviceSerial
676  domain:(NSString *) domain
677  completion:(void (^)(NSError *error))completion;
678 
687 + (NSOperation *)setHiddnsModeAuto:(NSString *)deviceSerial
688  completion:(void (^)(NSError *error))completion;
689 
700 + (NSOperation *)setHiddnsModeManual:(NSString *)deviceSerial
701  httpPort:(NSInteger) httpPort
702  cmdPort:(NSInteger) cmdPort
703  completion:(void (^)(NSError *error))completion;
704 
714 + (NSOperation *)getHiddnsDeviceList:(NSInteger) pageIndex
715  pageSize:(NSInteger) pageSize
716  completion:(void (^)(NSArray *ddnsDeviceList, NSInteger totalCount, NSError *error))completion;
717 
727 + (NSOperation *)shareHiddnsDevice:(NSString *) deviceSerial
728  account:(NSString *) account
729  completion:(void (^)(NSError *error))completion;
730 
740 + (NSOperation *)getShareHiddnsDeviceList:(NSInteger) pageIndex
741  pageSize:(NSInteger) pageSize
742  completion:(void (^)(NSArray *ddnsDeviceList, NSInteger totalCount, NSError *error))completion;
743 
744 
745 #pragma mark - V4.8.2 新增加接口
746 
752 + (BOOL) isLogin;
753 
759 + (NSString *) getAccesstoken;
760 
767 + (BOOL) isEzvizAppInstalledWithType:(EZAppType) appType;
768 
775 + (BOOL) ezvizLoginWithAppType:(EZAppType) appType;
776 
784 + (BOOL) gotoEzvizAppPage:(EZAppPageType) pageType appType:(EZAppType) appType;
785 
794 + (BOOL) handleOpenUrl:(NSURL *) url options:(NSDictionary *) opetions delegate:(id<EZOpenSDKDelegate>) delegate;
795 
803 + (BOOL) handleOpenUrl:(NSURL *) url delegate:(id<EZOpenSDKDelegate>) delegate;
804 
814 + (BOOL) handleOpenUrl:(NSURL *) url
815  sourceApplication:(NSString *)
816 sourceApplication annotation:(id) annotation
817  delegate:(id<EZOpenSDKDelegate>) delegate;
818 
819 #pragma mark - V4.8.3 新增加接口
820 
833 + (BOOL)startConfigWifi:(NSString *) ssid
834  password:(NSString *) password
835  deviceSerial:(NSString *) deviceSerial
836  mode:(NSInteger) mode
837  deviceStatus:(void (^)(EZWifiConfigStatus status,NSString *deviceSerial))statusBlock;
838 
839 #pragma mark - V4.8.4
840 
850 + (BOOL)startAPConfigWifiWithSsid:(NSString *) ssid
851  password:(NSString *) password
852  deviceSerial:(NSString *) deviceSerial
853  verifyCode:(NSString *) verifyCode
854  result:(void (^)(BOOL ret)) callback;
855 
859 + (void)stopAPConfigWifi;
860 
861 @end
Definition: EZConstants.h:12
NSString * getVersion()
此类为查询设备信息对象(设备添加前使用)
Definition: EZProbeDeviceInfo.h:12
此类为通道信息对象
Definition: EZCameraInfo.h:12
BOOL destoryLib()
此类为设备信息对象
Definition: EZDeviceInfo.h:12
void stopAPConfigWifi()
Definition: EZHiddnsDeviceInfo.h:11
NSString * getTerminalId()
NSString * getAccesstoken()
void clearStreamInfoCache()
此类为萤石播放器类
Definition: EZPlayer.h:104
此类为留言消息对象
Definition: EZLeaveMessage.h:12
此类为设备版本信息对象
Definition: EZDeviceVersion.h:12
BOOL stopConfigWifi()
void initPushService()
此类为设备升级状态对象
Definition: EZDeviceUpgradeStatus.h:12
此类为萤石开放平台授权登录以后的凭证信息
Definition: EZAccessToken.h:12
此类为用户信息对象
Definition: EZUserInfo.h:12
此类为EZGlobalSDK接口类 特别说明:110001(参数错误)、110002(AccessToken过期)、149999、150000(服务...
Definition: EZGlobalSDK.h:24