EZOpenSDK  4.8.6
 全部  函数 属性
EZOpenSDK.h
1 //
2 // EZOpenSDK.h
3 // EzvizOpenSDK
4 //
5 // Created by DeJohn Dong on 15/9/10.
6 // Copyright (c) 2015年 Ezviz. All rights reserved.
7 //
8 
9 #import <UIKit/UIKit.h>
10 #import "EZConstants.h"
11 
12 @class EZPlayer;
13 @class EZDeviceInfo;
14 @class EZAccessToken;
15 @class EZCameraInfo;
16 @class EZDeviceVersion;
17 @class EZUserInfo;
18 @class EZProbeDeviceInfo;
20 @class EZLeaveMessage;
21 
23 @interface EZOpenSDK : NSObject
24 
33 + (BOOL)initLibWithAppKey:(NSString *)appKey;
34 
41 + (BOOL)destoryLib;
42 
49 + (NSString *)getVersion;
50 
57 + (void)openLoginPage:(void (^)(EZAccessToken *accessToken))block;
58 
65 + (void)setAccessToken:(NSString *)accessToken;
66 
73 + (void)logout:(void (^)(NSError *error))completion;
74 
84 + (NSOperation *)deleteAlarm:(NSArray *)alarmIds
85  completion:(void (^)(NSError *error))completion;
86 
97 + (NSOperation *)setAlarmStatus:(NSArray *)alarmIds
98  alarmStatus:(EZMessageStatus)status
99  completion:(void (^)(NSError *error))completion;
100 
101 
112 + (NSOperation *)deleteDevice:(NSString *)deviceSerial
113  completion:(void (^)(NSError *error))completion;
114 
126 + (BOOL)startConfigWifi:(NSString *)ssid
127  password:(NSString *)password
128  deviceSerial:(NSString *)deviceSerial
129  deviceStatus:(void (^)(EZWifiConfigStatus status))statusBlock;
130 
137 + (BOOL)stopConfigWifi;
138 
152 + (NSOperation *)controlPTZ:(NSString *)deviceSerial
153  cameraNo:(NSInteger)cameraNo
154  command:(EZPTZCommand)command
155  action:(EZPTZAction)action
156  speed:(NSInteger)speed
157  result:(void (^)(NSError *error))resultBlock;
158 
168 + (void)controlVideoFlip:(NSString *)deviceSerial
169  cameraNo:(NSInteger)cameraNo
170  command:(EZDisplayCommand)command
171  result:(void (^)(NSError *error))resultBlock;
172 
182 + (EZPlayer *)createPlayerWithDeviceSerial:(NSString *)deviceSerial
183  cameraNo:(NSInteger)cameraNo;
184 
185 
194 + (EZPlayer *)createPlayerWithUrl:(NSString *)url;
195 
196 
205 + (BOOL)releasePlayer:(EZPlayer *)player;
206 
207 #pragma mark - V3.1 新增加接口
208 
218 + (NSData *)decryptData:(NSData *)data verifyCode:(NSString *)verifyCode;
219 
220 
221 #pragma mark - V3.2 新增加接口
222 
232 + (NSOperation *)getDeviceVersion:(NSString *)deviceSerial
233  completion:(void (^)(EZDeviceVersion *version, NSError *error))completion;
234 
235 
247 + (NSOperation *)setDeviceEncryptStatus:(NSString *)deviceSerial
248  verifyCode:(NSString *)verifyCode
249  encrypt:(BOOL)isEncrypt
250  completion:(void (^)(NSError *error))completion;
251 
262 + (NSOperation *)setDeviceName:(NSString *)deviceName
263  deviceSerial:(NSString *)deviceSerial
264  completion:(void (^)(NSError *error))completion;
265 
274 + (NSOperation *)getUserInfo:(void (^)(EZUserInfo *userInfo, NSError *error))completion;
275 
286 + (NSOperation *)getUnreadMessageCount:(NSString *)deviceSerial
287  messageType:(EZMessageType)type
288  completion:(void (^)(NSInteger count, NSError *error))completion;
289 
303 + (NSOperation *)getLeaveMessageList:(NSString *)deviceSerial
304  pageIndex:(NSInteger)pageIndex
305  pageSize:(NSInteger)pageSize
306  beginTime:(NSDate *)beginTime
307  endTime:(NSDate *)endTime
308  completion:(void (^)(NSArray *leaveMessageList, NSInteger totalCount, NSError *error))completion;
309 
320 + (NSOperation *)setLeaveMessageStatus:(NSArray *)leaveIds
321  messageStatus:(EZMessageStatus)status
322  completion:(void (^)(NSError *error))completion;
323 
333 + (NSOperation *)deleteLeaveMessage:(NSArray *)leaveIds
334  completion:(void (^)(NSError *error))completion;
335 
345 + (NSOperation *)getStorageStatus:(NSString *)deviceSerial
346  completion:(void (^)(NSArray *storageStatus, NSError *error))completion;
347 
358 + (NSOperation *)formatStorage:(NSString *)deviceSerial
359  storageIndex:(NSInteger)storageIndex
360  completion:(void (^)(NSError *error))completion;
372 + (NSOperation *)probeDeviceInfo:(NSString *) deviceSerial
373  deviceType:(NSString *) deviceType
374  completion:(void (^)(EZProbeDeviceInfo *deviceInfo, NSError *error))completion;
375 
385 + (NSOperation *)getDeviceUpgradeStatus:(NSString *)deviceSerial
386  completion:(void (^)(EZDeviceUpgradeStatus *status, NSError *error))completion;
387 
397 + (NSOperation *)upgradeDevice:(NSString *)deviceSerial
398  completion:(void (^)(NSError *error))completion;
399 
400 
409 + (NSOperation *)getLeaveMessageData:(EZLeaveMessage *)message
410  completion:(void (^)(NSData *data, NSInteger resultCode))completion;
411 
418 + (void)openCloudPage:(NSString *)deviceSerial;
419 
420 #pragma mark - V3.3 新增加接口
421 
428 + (void)openChangePasswordPage:(void (^)(NSInteger resultCode))completion;
429 
430 #pragma mark - V4.0 新增加接口
431 
438 + (void)enableP2P:(BOOL)enable;
439 
448 + (BOOL)setDebugLogEnable:(BOOL)enable;
449 
450 #pragma mark - V4.2 新增加接口
451 
462 + (NSOperation *)getDeviceList:(NSInteger)pageIndex
463  pageSize:(NSInteger)pageSize
464  completion:(void (^)(NSArray *deviceList, NSInteger totalCount, NSError *error))completion;
465 
476 + (NSOperation *)getSharedDeviceList:(NSInteger)pageIndex
477  pageSize:(NSInteger)pageSize
478  completion:(void (^)(NSArray *deviceList, NSInteger totalCount, NSError *error))completion;
479 
492 + (NSOperation *)searchRecordFileFromCloud:(NSString *)deviceSerial
493  cameraNo:(NSInteger)cameraNo
494  beginTime:(NSDate *)beginTime
495  endTime:(NSDate *)endTime
496  completion:(void (^)(NSArray *couldRecords, NSError *error))completion;
497 
510 + (NSOperation *)searchRecordFileFromDevice:(NSString *)deviceSerial
511  cameraNo:(NSInteger)cameraNo
512  beginTime:(NSDate *)beginTime
513  endTime:(NSDate *)endTime
514  completion:(void (^)(NSArray *deviceRecords, NSError *error))completion;
515 
529 + (NSOperation *)getAlarmList:(NSString *)deviceSerial
530  pageIndex:(NSInteger)pageIndex
531  pageSize:(NSInteger)pageSize
532  beginTime:(NSDate *)beginTime
533  endTime:(NSDate *)endTime
534  completion:(void (^)(NSArray *alarmList, NSInteger totalCount, NSError *error))completion;
535 
546 + (NSOperation *)addDevice:(NSString *)deviceSerial
547  verifyCode:(NSString *)verifyCode
548  completion:(void (^)(NSError *error))completion;
549 
562 + (NSOperation *)captureCamera:(NSString *)deviceSerial
563  cameraNo:(NSInteger)cameraNo
564  completion:(void (^)(NSString *url, NSError *error))completion;
565 
578 + (NSOperation *)setVideoLevel:(NSString *)deviceSerial
579  cameraNo:(NSInteger)cameraNo
580  videoLevel:(EZVideoLevelType)videoLevel
581  completion:(void (^)(NSError *error))completion;
582 
583 
594 + (NSOperation *)setDefence:(EZDefenceStatus)defence
595  deviceSerial:(NSString *)deviceSerial
596  completion:(void (^)(NSError *error))completion;
597 
598 #pragma mark - V4.3 新增加接口
599 
609 + (NSOperation *)getDeviceInfo:(NSString *)deviceSerial
610  completion:(void (^)(EZDeviceInfo *deviceInfo, NSError *error))completion;
611 
618 + (NSString *) getTerminalId;
619 
620 #pragma mark - V4.4 新增加接口
621 
626 + (void) initPushService;
627 
628 #pragma mark - V4.5 新增加接口
629 
633 + (void) clearStreamInfoCache;
634 
635 #pragma mark - V4.8.2 新增加接口
636 
642 + (BOOL) isLogin;
643 
649 + (NSString *) getAccesstoken;
650 
657 + (BOOL) isEzvizAppInstalledWithType:(EZAppType) appType;
658 
659 
666 + (BOOL) ezvizLoginWithAppType:(EZAppType) appType;
667 
675 + (BOOL) gotoEzvizAppPage:(EZAppPageType) pageType appType:(EZAppType) appType;
676 
685 + (BOOL) handleOpenUrl:(NSURL *) url options:(NSDictionary *) opetions delegate:(id<EZOpenSDKDelegate>) delegate;
686 
694 + (BOOL) handleOpenUrl:(NSURL *) url delegate:(id<EZOpenSDKDelegate>) delegate;
695 
705 + (BOOL) handleOpenUrl:(NSURL *) url
706  sourceApplication:(NSString *) sourceApplication
707  annotation:(id) annotation
708  delegate:(id<EZOpenSDKDelegate>) delegate;
709 
710 #pragma mark - V4.8.3 新增加接口
711 
724 + (BOOL)startConfigWifi:(NSString *) ssid
725  password:(NSString *) password
726  deviceSerial:(NSString *) deviceSerial
727  mode:(NSInteger) mode
728  deviceStatus:(void (^)(EZWifiConfigStatus status,NSString *deviceSerial))statusBlock;
729 
730 #pragma mark - V4.8.4
731 
741 + (BOOL)startAPConfigWifiWithSsid:(NSString *) ssid
742  password:(NSString *) password
743  deviceSerial:(NSString *) deviceSerial
744  verifyCode:(NSString *) verifyCode
745  result:(void (^)(BOOL ret)) callback;
746 
750 + (void)stopAPConfigWifi;
751 
752 @end
Definition: EZConstants.h:12
此类为查询设备信息对象(设备添加前使用)
Definition: EZProbeDeviceInfo.h:12
此类为通道信息对象
Definition: EZCameraInfo.h:12
BOOL destoryLib()
BOOL isLogin()
此类为设备信息对象
Definition: EZDeviceInfo.h:12
NSString * getTerminalId()
此类为EZOpenSDK接口类 特别说明:110001(参数错误)、110002(AccessToken过期)、149999、150000(服务端...
Definition: EZOpenSDK.h:23
此类为萤石播放器类
Definition: EZPlayer.h:104
void initPushService()
NSString * getAccesstoken()
此类为留言消息对象
Definition: EZLeaveMessage.h:12
此类为设备版本信息对象
Definition: EZDeviceVersion.h:12
void stopAPConfigWifi()
void clearStreamInfoCache()
此类为设备升级状态对象
Definition: EZDeviceUpgradeStatus.h:12
此类为萤石开放平台授权登录以后的凭证信息
Definition: EZAccessToken.h:12
此类为用户信息对象
Definition: EZUserInfo.h:12
BOOL stopConfigWifi()
NSString * getVersion()