From 3698c13aba988cd3e41b91b255e1c682c057e565 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期四, 23 三月 2023 11:49:58 +0800 Subject: [PATCH] 1.新增历史记录相关页面及功能 2.修改配网为热点配网 3.设备列表增加过滤门锁功能 4.增加添加设备通知功能 --- EZSDK/EZSDK/EZSDK.m | 96 +++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 86 insertions(+), 10 deletions(-) diff --git a/EZSDK/EZSDK/EZSDK.m b/EZSDK/EZSDK/EZSDK.m index f8d0607..d7c2c54 100644 --- a/EZSDK/EZSDK/EZSDK.m +++ b/EZSDK/EZSDK/EZSDK.m @@ -19,9 +19,8 @@ #import "EZDeviceTableViewController.h" #import "EZHCNetDeviceSDK.h" #import "EZMessagePhotoViewController.h" - - - +#import "HDLEZVisitorRecordViewController.h" +#import "HDLEZDeviceMsgListViewController.h" @implementation EZSDK @@ -45,8 +44,8 @@ */ - (BOOL)initLibWithAppKey:(NSString *)appKey globalAppKey:(NSString *)globalAppKey { - if (!isHavelibInit) { + [EZOPENSDK setDebugLogEnable:YES]; // isHavelibInit=YES; // NSLog(@"绗竴娆″垵濮嬪寲钀ょ煶搴�"); if (!LanguageIsChinese) { @@ -55,13 +54,15 @@ NSLog(@"娴峰鐗坘ey--%@",globalAppKey); }else{ isHavelibInit = [EZOpenSDK initLibWithAppKey:appKey]; + [[GlobalKit shareKit] setHdlAppKey:appKey]; NSLog(@"鍥藉唴鐗坘ey--%@", appKey); } - [EZHCNetDeviceSDK initSDK]; [EZOPENSDK enableP2P:YES]; - [EZOPENSDK setDebugLogEnable:YES]; +// [EZOPENSDK setDebugLogEnable:YES]; NSLog(@"EZOpenSDK Version = %@", [EZOPENSDK getVersion]); +// NSLog(@"EZOpenSDK treamToken= %@", ); + } return isHavelibInit; } @@ -118,16 +119,34 @@ */ -(void)go2EZvizMonitor { - // NSLog(@"go2EZvizMonitor"); +// [GlobalKit shareKit].deviceType=HDLEZDeviceType_Default; +// // NSLog(@"go2EZvizMonitor"); +// //鑾峰彇EZMain鐨剆troyboard鏂囦欢 +// UIStoryboard *ezMainStoryboard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; +// //鑾峰彇EZMain.storyboard鐨勫疄渚媀iewController--鑾峰彇鎽勫儚澶村垪琛� +// EZDeviceTableViewController *instanceVC = [ezMainStoryboard instantiateViewControllerWithIdentifier:@"EZCameraList"]; +// //push鎽勫儚澶村垪琛ㄧ殑viewController +// [[self getCurrentVC] setNavigationBarHidden:NO]; +// // NSLog(@"willpush********"); +// [[self getCurrentVC] pushViewController:instanceVC animated:YES]; +// // NSLog(@"had pushed********"); + [self toEZDeviceListViewWithFilterTypes:@[@""]]; +} + +/** + 鐩存帴璺宠浆鍒拌悿鐭虫憚鍍忓ご鍒楄〃(绛涙帀闂ㄩ攣璁惧) + @param filterTepes 杩囨护鍨嬪彿鏁扮粍 + */ +- (void)toEZDeviceListViewWithFilterTypes:(NSArray*)filterTepes{ + [GlobalKit shareKit].deviceType=HDLEZDeviceType_Default; //鑾峰彇EZMain鐨剆troyboard鏂囦欢 UIStoryboard *ezMainStoryboard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; //鑾峰彇EZMain.storyboard鐨勫疄渚媀iewController--鑾峰彇鎽勫儚澶村垪琛� EZDeviceTableViewController *instanceVC = [ezMainStoryboard instantiateViewControllerWithIdentifier:@"EZCameraList"]; + instanceVC.filterTypes=filterTepes; //push鎽勫儚澶村垪琛ㄧ殑viewController [[self getCurrentVC] setNavigationBarHidden:NO]; - // NSLog(@"willpush********"); [[self getCurrentVC] pushViewController:instanceVC animated:YES]; - // NSLog(@"had pushed********"); } /** @@ -135,17 +154,36 @@ */ -(void)addEzvizMonitor { +// // NSLog(@"娣诲姞鎽勫儚澶�"); +// if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) { +// UIStoryboard *addDeviceStoryBoard = [UIStoryboard storyboardWithName:@"AddDevice" bundle:nil]; +// EZAddByQRCodeViewController *rootViewController = [addDeviceStoryBoard instantiateViewControllerWithIdentifier:@"AddByQRCode"]; +// [[self getCurrentVC] setNavigationBarHidden:NO]; +// [[self getCurrentVC] pushViewController:rootViewController animated:YES]; +// } else { +// // [UIView dd_showMessage:@"iOS 7.0浠ヤ笅鎵爜鍔熻兘璇疯嚜琛屽疄鐜�"]; +// NSLog(@"iOS 7.0浠ヤ笅鎵爜鍔熻兘璇疯嚜琛屽疄鐜�"); +// } + [self addEzvizMonitorWithDeviceType:@""]; +} + +/** + 璺宠浆娣诲姞娣诲姞璁惧 + @param deviceType 璁惧绫诲瀷 + */ +- (void)addEzvizMonitorWithDeviceType:(NSString *)deviceType{ + HDLEZDeviceType type=[deviceType isEqualToString:HDLEZ_DOOR_SPK] ? HDLEZDeviceType_Door : HDLEZDeviceType_Default; // NSLog(@"娣诲姞鎽勫儚澶�"); if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) { UIStoryboard *addDeviceStoryBoard = [UIStoryboard storyboardWithName:@"AddDevice" bundle:nil]; EZAddByQRCodeViewController *rootViewController = [addDeviceStoryBoard instantiateViewControllerWithIdentifier:@"AddByQRCode"]; + rootViewController.deviceType=type; [[self getCurrentVC] setNavigationBarHidden:NO]; [[self getCurrentVC] pushViewController:rootViewController animated:YES]; } else { // [UIView dd_showMessage:@"iOS 7.0浠ヤ笅鎵爜鍔熻兘璇疯嚜琛屽疄鐜�"]; NSLog(@"iOS 7.0浠ヤ笅鎵爜鍔熻兘璇疯嚜琛屽疄鐜�"); } - } /** @@ -153,6 +191,7 @@ */ -(void)Play:(EZDeviceInfo*)deviceInfo { + [GlobalKit shareKit].deviceType=HDLEZDeviceType_Default; UIStoryboard *addDeviceStoryBoard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; EZLivePlayViewController *rootViewController = [addDeviceStoryBoard instantiateViewControllerWithIdentifier:@"EZLivePlayViewController"]; // NSLog(@"play--iphone--rootViewController"); @@ -182,6 +221,22 @@ } /** + 鏍规嵁搴忓垪鍙疯繘鍏ラ棬閿佽棰� + @param deviceSerial 搴忓垪鍙� + @param deviceId 璁惧id + @param deviceType 璁惧spk(鐢ㄤ簬鍖哄垎鏄惁涓洪棬閿�) + */ +-(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString*)deviceId deviceType:(NSString *)deviceType{ + [GlobalKit shareKit].deviceType=[deviceType isEqualToString:HDLEZ_DOOR_SPK] ? HDLEZDeviceType_Door : HDLEZDeviceType_Default; + UIStoryboard *ezMainStoryBoard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; + EZLivePlayViewController *vc = [ezMainStoryBoard instantiateViewControllerWithIdentifier:@"EZLivePlayViewController"]; + vc.deviceId=deviceId; + vc.deviceSerial=deviceSerial; + [[self getCurrentVC] setNavigationBarHidden:NO]; + [[self getCurrentVC] pushViewController:vc animated:YES]; +} + +/** 鎵撳紑鎽勫儚澶磋缃〉闈� */ -(void)setting:(EZDeviceInfo*)deviceInfo @@ -205,6 +260,27 @@ [[self getCurrentVC] pushViewController:playBackVC animated:YES]; } +/**涓存椂瀵嗙爜椤� + @param deviceId 璁惧id + */ +- (void)toTemPassView:(NSString*)deviceId{ + HDLEZVisitorRecordViewController *vc=[[HDLEZVisitorRecordViewController alloc] init]; + vc.deviceId=deviceId; + [[self getCurrentVC] setNavigationBarHidden:YES]; + [[self getCurrentVC] pushViewController:vc animated:YES]; +} + +/**璁惧鍘嗗彶璁板綍椤� + @param deviceId 璁惧id + */ +- (void)toDeviceMsgListView:(NSString*)deviceId{ + HDLEZDeviceMsgListViewController *vc=[[HDLEZDeviceMsgListViewController alloc] init]; + vc.deviceId=deviceId; + [[self getCurrentVC] setNavigationBarHidden:YES]; + [[self getCurrentVC] pushViewController:vc animated:YES]; + +} + //// //-(void)goToEZMessagePhotoVC:(EZAlarmInfo*)alarmInfo{ // UIStoryboard *addDeviceStoryBoard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; -- Gitblit v1.8.0