| | |
| | | #import "EZHCNetDeviceSDK.h" |
| | | #import "EZMessagePhotoViewController.h" |
| | | #import "HDLEZVisitorRecordViewController.h" |
| | | |
| | | |
| | | #import "HDLEZDeviceMsgListViewController.h" |
| | | |
| | | @implementation EZSDK |
| | | |
| | |
| | | */ |
| | | -(void)go2EZvizMonitor |
| | | { |
| | | // NSLog(@"go2EZvizMonitor"); |
| | | // [GlobalKit shareKit].deviceType=HDLEZDeviceType_Default; |
| | | // // NSLog(@"go2EZvizMonitor"); |
| | | // //获取EZMain的stroyboard文件 |
| | | // UIStoryboard *ezMainStoryboard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; |
| | | // //获取EZMain.storyboard的实例ViewController--获取摄像头列表 |
| | | // 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的stroyboard文件 |
| | | UIStoryboard *ezMainStoryboard = [UIStoryboard storyboardWithName:@"EZMain" bundle:nil]; |
| | | //获取EZMain.storyboard的实例ViewController--获取摄像头列表 |
| | | 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********"); |
| | | } |
| | | |
| | | /** |
| | |
| | | // // [UIView dd_showMessage:@"iOS 7.0以下扫码功能请自行实现"]; |
| | | // NSLog(@"iOS 7.0以下扫码功能请自行实现"); |
| | | // } |
| | | [self addEzvizMonitorWithDeviceType:HDLEZDeviceType_Default]; |
| | | [self addEzvizMonitorWithDeviceType:@""]; |
| | | } |
| | | |
| | | /** |
| | | 跳转添加添加设备 |
| | | @param deviceType 设备类型 |
| | | */ |
| | | - (void)addEzvizMonitorWithDeviceType:(HDLEZDeviceType)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=deviceType; |
| | | rootViewController.deviceType=type; |
| | | [[self getCurrentVC] setNavigationBarHidden:NO]; |
| | | [[self getCurrentVC] pushViewController:rootViewController animated:YES]; |
| | | } else { |
| | |
| | | */ |
| | | -(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"); |
| | |
| | | [self Play:deviceInfo]; |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | /** |
| | | 根据序列号进入门锁视频 |
| | | @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]; |
| | | } |
| | | |
| | | /** |
| | |
| | | [[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]; |