| | |
| | | // Override point for customization after application launch. |
| | | [[EZSDK sharedInstance] initLibWithAppKey:@"1aa98a90489b4838b966b57018b4b04b" globalAppKey:@"1aa98a90489b4838b966b57018b4b04b"]; |
| | | // [[EZSDK sharedInstance] initLibWithAppKey:@"941b1b72b6294998acfd36c14931b675" globalAppKey:@"941b1b72b6294998acfd36c14931b675"]; |
| | | [[EZSDK sharedInstance] setHDlAccessToken:@"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI3ZWRmMWFkMTQzN2Y0NjI0YTQxMWRiMDRmODVjNTRiZSIsImNvbXBhbnlJZCI6IjAiLCJyb2xlIjoiIiwiaGVhZGVyUHJlZml4IjoiQmVhcmVyICIsInRlbmFudElkIjoiMjAiLCJ1c2VyVHlwZSI6IlVTRVJfQyIsInRva2VuVHlwZSI6ImFjY2Vzc190b2tlbiIsInVzZXJOYW1lIjoiS2FlZGUiLCJ1c2VyRGF0YVJpZ2h0IjoiMSIsIm9wZW5BcHBsaWNhdGlvbklkIjoiMCIsInVzZXJJZCI6IjEzNTAyODA5OTU5OTg4NjMzNjEiLCJleHAiOjE3MDU1NTQ5NjMsIm5iZiI6MTcwNTU0Nzc2M30.bkW07D2YnCMFw4MBvsDc0OqZJbB-w-NV9zVLJGyjBEU9ixp3TueFj76fPPUDn1XfMzigzXb74oPcFq9lIDkNkIBvSCM6YQttN9X4Y3O5JWcdMD5VQZBrxgLfzDdCjFZ2nwR5SlaixwEgYASFh_9jaBUqjyXyJ1pKFlCEwB2jVU0" refreshToken:@"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiJmNzA3OGQ0NTdlYmI0OWQ3YWJmZWIwMzZlNWYzMWQwMSIsImNvbXBhbnlJZCI6IjAiLCJoZWFkZXJQcmVmaXgiOiJCZWFyZXIgIiwidGVuYW50SWQiOiIyMCIsInRva2VuVHlwZSI6InJlZnJlc2hfdG9rZW4iLCJvcGVuQXBwbGljYXRpb25JZCI6IjAiLCJ1c2VySWQiOiIxMzUwMjgwOTk1OTk4ODYzMzYxIiwiZXhwIjoxNzA2MTUyNTYzLCJuYmYiOjE3MDU1NDc3NjN9.j7QjPk7vtsESSUHLq9t7FBUpCxfb63rMihs3yGF4Bx38iEqzSTzRRrJuZdFQC_oyJeBqbzXR5Wp7NFLdwhAIu_MHVJFDcm_I7e9NFKtdqMKdVXy_XgB8xe5Nr8jny2XtYBN4XfIhvCXLj8_O9_l498_lZm0ucfJOfS58oiGTjxo"]; |
| | | [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://test-gz.hdlcontrol.com" platform:1 homeId:@"1674604669353717761"]; |
| | | [[EZSDK sharedInstance] setHDlAccessToken:@"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI3NTg3ZTRhNDI4YzA0NjZhOWI1MmE5ZjM0NzA1MWZkNSIsImNvbXBhbnlJZCI6IjAiLCJyb2xlIjoiIiwiaGVhZGVyUHJlZml4IjoiQmVhcmVyICIsInVzZXJBY2NvdW50IjoiMTU3NTc4NzA5OTciLCJ0ZW5hbnRJZCI6IjIwIiwidXNlclR5cGUiOiJVU0VSX0MiLCJ0b2tlblR5cGUiOiJhY2Nlc3NfdG9rZW4iLCJ1c2VyTmFtZSI6IuaMquWogeeahOajruael-S4jeaEv-aEj-mAj-mcsuWnk-WQjeeahOeUqOaItyIsInVzZXJEYXRhUmlnaHQiOiIxIiwib3BlbkFwcGxpY2F0aW9uSWQiOiIwIiwidXNlcklkIjoiMTQwODI0MzI3MTc0MjM4NjE3NyIsImV4cCI6MTczNDQ5NDg2MCwibmJmIjoxNzM0NDg3NjYwfQ.ZJgdJmRy3ZQPiyj26LI7gf-ggbWLnslmWyyeKd-Y8LK1jqNtzmRYTNJttmXYMeO5mPkHRI07XXiCGwR7Tk86myMs-EpxvcHhLPBVtjwGP4xzC97ccEUzplWFIjOCTH0wLE2nE6Zh33-vbdGbizLSabYMAjiZmT39ml9tVowjDTI" refreshToken:@"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiJmNmYxYzU1Y2VhNjg0YTgxYmViYzFkMzdiZTdkZTFiOSIsImNvbXBhbnlJZCI6IjAiLCJoZWFkZXJQcmVmaXgiOiJCZWFyZXIgIiwidGVuYW50SWQiOiIyMCIsInRva2VuVHlwZSI6InJlZnJlc2hfdG9rZW4iLCJvcGVuQXBwbGljYXRpb25JZCI6IjAiLCJ1c2VySWQiOiIxNDA4MjQzMjcxNzQyMzg2MTc3IiwiZXhwIjoxNzM1MDkyNDYwLCJuYmYiOjE3MzQ0ODc2NjB9.W_9dzh8Do8Oi38KpxrlM5B9EJlGHK8_AuJDeK_ES_Mtb0mFjqh4jl63rKtnAjMy9HX45g3xv0bx9FwLOHk4F5kVT1LmU3Wd2TcZEYl-DzLzdAHz7N9FRmoO9kCwTmXmohf7lWnR1-P7IHFVKqzAzvzVaDtUPUKngjxrTnDOvyRw"]; |
| | | [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://test-gz.hdlcontrol.com" platform:1 homeId:@"1641265620778082306"]; |
| | | // [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://nearest.hdlcontrol.com" platform:1 homeId:@"1546324800135176193"]; |
| | | [[EZSDK sharedInstance] setEZAccessToken:@"ra.ag6fktccckc2gxl84mu40e1o417agh8u-231ke8chyz-0vkjf4x-nqw225sxi"]; |
| | | [[EZSDK sharedInstance] setEZAccessToken:@"at.3q2ijwy72ne0d6nq0qwwxie5bvn4q3mh-83a3uo2h6v-010ytzk-9tezv7rzn"]; |
| | | // [[EZSDK sharedInstance] setEZAccessToken:@"ra.3hkirwcadrpfmaa89wep99io3wto4yds-7zptb10d20-1wxg4f3-ygiojudee"]; |
| | | |
| | | |
| | |
| | | _locationmanager.delegate = self; |
| | | [_locationmanager requestWhenInUseAuthorization]; |
| | | [_locationmanager startUpdatingLocation]; |
| | | |
| | | NSLog(@"#######-EZhdlAccessToken:%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"EZhdlAccessToken"]); |
| | | NSLog(@"#######-EZhdlRefreshToken:%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"EZhdlRefreshToken"]); |
| | | |
| | | return YES; |
| | | } |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="tPl-Go-Tmu"> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="tPl-Go-Tmu"> |
| | | <device id="retina4_7" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment version="4352" identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/> |
| | | <capability name="System colors in document resources" minToolsVersion="11.0"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | | </dependencies> |
| | |
| | | "complete"="Completed"; |
| | | "push_slider_msg"="Handle the notification by yourself."; |
| | | |
| | | "api_mirror_flip"="Mirror flip"; |
| | | "api_mirror_flip_trip"="The video screen will flip, suitable for inversion scenes"; |
| | | "api_mirror_flip_success"="Mirror flip successful"; |
| | | "api_mirror_test"="Image Flipping API Test"; |
| | | "api_getting_device_list"="Getting the device list..."; |
| | | "api_get_device_list_fail"="Getting device list failed."; |
| | |
| | | "complete"="完成"; |
| | | "push_slider_msg"="你需自行处理滑动进入的推送消息"; |
| | | |
| | | "api_mirror_flip"="画面翻转"; |
| | | "api_mirror_flip_trip"="点击后视频画面会翻转展示,适合倒装的场景"; |
| | | "api_mirror_flip_success"="画面翻转成功"; |
| | | "api_mirror_test"="镜像翻转接口测试"; |
| | | "api_getting_device_list"="正在获取用户设备列表..."; |
| | | "api_get_device_list_fail"="设备列表获取失败"; |
| | |
| | | [Export ("setHDlAccessToken:refreshToken:")] |
| | | void SetHDlAccessToken (string accessToken, string refreshToken); |
| | | |
| | | // -(void)setRequestHttpsHostAndPlatform:(NSString *)requestHttpsHost platform:(int)platform homeId:(NSString *)homeId; |
| | | [Export ("setRequestHttpsHostAndPlatform:platform:homeId:")] |
| | | |
| | | // -(void)configHDLServerAppKey:(NSString *)appKey appSecret:(NSString *)appSecret; |
| | | [Export("configHDLServerAppKey:appSecret:")] |
| | | void ConfigHDLServerAppKey(string appKey, string appSecret); |
| | | |
| | | // -(void)setRequestHttpsHostAndPlatform:(NSString *)requestHttpsHost platform:(int)platform homeId:(NSString *)homeId; |
| | | [Export ("setRequestHttpsHostAndPlatform:platform:homeId:")] |
| | | void SetRequestHttpsHostAndPlatform (string requestHttpsHost, int platform, string homeId); |
| | | |
| | | // -(void)go2EZvizMonitor; |
New file |
| | |
| | | using Foundation; |
| | | using ObjCRuntime; |
| | | |
| | | namespace EZSDK.IOS |
| | | { |
| | | // @protocol EZSDKDelegate <NSObject> |
| | | [Protocol, Model (AutoGeneratedName = true)] |
| | | [BaseType (typeof(NSObject))] |
| | | interface EZSDKDelegate |
| | | { |
| | | // @required -(void)addDeviceSuccessed:(NSString *)deviceSerial; |
| | | [Abstract] |
| | | [Export ("addDeviceSuccessed:")] |
| | | void AddDeviceSuccessed (string deviceSerial); |
| | | } |
| | | |
| | | // @interface EZSDK : NSObject |
| | | [BaseType (typeof(NSObject))] |
| | | interface EZSDK |
| | | { |
| | | [Wrap ("WeakDelegate")] |
| | | EZSDKDelegate Delegate { get; set; } |
| | | |
| | | // @property (nonatomic, weak) id<EZSDKDelegate> delegate; |
| | | [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] |
| | | NSObject WeakDelegate { get; set; } |
| | | |
| | | // @property (nonatomic, strong) NSArray * connectTipModels; |
| | | [Export ("connectTipModels", ArgumentSemantic.Strong)] |
| | | [Verify (StronglyTypedNSArray)] |
| | | NSObject[] ConnectTipModels { get; set; } |
| | | |
| | | // +(instancetype)sharedInstance; |
| | | [Static] |
| | | [Export ("sharedInstance")] |
| | | EZSDK SharedInstance (); |
| | | |
| | | // -(BOOL)initLibWithAppKey:(NSString *)appKey globalAppKey:(NSString *)globalAppKey; |
| | | [Export ("initLibWithAppKey:globalAppKey:")] |
| | | bool InitLibWithAppKey (string appKey, string globalAppKey); |
| | | |
| | | // -(void)setEZAccessToken:(NSString *)accessToken; |
| | | [Export ("setEZAccessToken:")] |
| | | void SetEZAccessToken (string accessToken); |
| | | |
| | | // -(void)setHDlAccessToken:(NSString *)accessToken refreshToken:(NSString *)refreshToken; |
| | | [Export ("setHDlAccessToken:refreshToken:")] |
| | | void SetHDlAccessToken (string accessToken, string refreshToken); |
| | | |
| | | // -(void)configHDLServerAppKey:(NSString *)appKey appSecret:(NSString *)appSecret; |
| | | [Export ("configHDLServerAppKey:appSecret:")] |
| | | void ConfigHDLServerAppKey (string appKey, string appSecret); |
| | | |
| | | // -(void)setRequestHttpsHostAndPlatform:(NSString *)requestHttpsHost platform:(int)platform homeId:(NSString *)homeId; |
| | | [Export ("setRequestHttpsHostAndPlatform:platform:homeId:")] |
| | | void SetRequestHttpsHostAndPlatform (string requestHttpsHost, int platform, string homeId); |
| | | |
| | | // -(void)go2EZvizMonitor; |
| | | [Export ("go2EZvizMonitor")] |
| | | void Go2EZvizMonitor (); |
| | | |
| | | // -(void)toEZDeviceListViewWithFilterTypes:(NSArray *)filterTepes; |
| | | [Export ("toEZDeviceListViewWithFilterTypes:")] |
| | | [Verify (StronglyTypedNSArray)] |
| | | void ToEZDeviceListViewWithFilterTypes (NSObject[] filterTepes); |
| | | |
| | | // -(void)addEzvizMonitor; |
| | | [Export ("addEzvizMonitor")] |
| | | void AddEzvizMonitor (); |
| | | |
| | | // -(void)addEzvizMonitorWithDeviceType:(NSString *)deviceType; |
| | | [Export ("addEzvizMonitorWithDeviceType:")] |
| | | void AddEzvizMonitorWithDeviceType (string deviceType); |
| | | |
| | | // -(void)Play:(id)deviceInfo; |
| | | [Export ("Play:")] |
| | | void Play (NSObject deviceInfo); |
| | | |
| | | // -(void)Play:(id)deviceInfo messageId:(NSString *)msgId showCallout:(BOOL)isShow; |
| | | [Export ("Play:messageId:showCallout:")] |
| | | void Play (NSObject deviceInfo, string msgId, bool isShow); |
| | | |
| | | // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial; |
| | | [Export ("PlayWithDeviceSerial:")] |
| | | void PlayWithDeviceSerial (string deviceSerial); |
| | | |
| | | // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial msgId:(NSString *)msgId; |
| | | [Export ("PlayWithDeviceSerial:msgId:")] |
| | | void PlayWithDeviceSerial (string deviceSerial, string msgId); |
| | | |
| | | // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString *)deviceId deviceType:(NSString *)deviceType; |
| | | [Export ("PlayWithDeviceSerial:deviceId:deviceType:")] |
| | | void PlayWithDeviceSerial (string deviceSerial, string deviceId, string deviceType); |
| | | |
| | | // -(void)PlayWithDeviceSerial:(NSString *)deviceSerial deviceId:(NSString *)deviceId deviceType:(NSString *)deviceType msgId:(NSString *)msgId; |
| | | [Export ("PlayWithDeviceSerial:deviceId:deviceType:msgId:")] |
| | | void PlayWithDeviceSerial (string deviceSerial, string deviceId, string deviceType, string msgId); |
| | | |
| | | // -(void)setting:(id)deviceInfo; |
| | | [Export ("setting:")] |
| | | void Setting (NSObject deviceInfo); |
| | | |
| | | // -(void)playBackVideo:(id)deviceInfo; |
| | | [Export ("playBackVideo:")] |
| | | void PlayBackVideo (NSObject deviceInfo); |
| | | |
| | | // -(void)toTemPassView:(NSString *)deviceId; |
| | | [Export ("toTemPassView:")] |
| | | void ToTemPassView (string deviceId); |
| | | |
| | | // -(void)toDeviceMsgListView:(NSString *)deviceId; |
| | | [Export ("toDeviceMsgListView:")] |
| | | void ToDeviceMsgListView (string deviceId); |
| | | } |
| | | } |
| | |
| | | <BundleResource Include="Resources\hdl_ez_cat_eyes_answer%403x.png" /> |
| | | <BundleResource Include="Resources\hdl_ez_msg_placeholder%402x.png" /> |
| | | <BundleResource Include="Resources\hdl_ez_msg_placeholder%403x.png" /> |
| | | <BundleResource Include="Resources\hdl_ez_msg_no_answer%403x.png" /> |
| | | <BundleResource Include="Resources\hdl_ez_msg_no_answer%402x.png" /> |
| | | <BundleResource Include="Resources\hdl_ez_msg_answer%403x.png" /> |
| | | <BundleResource Include="Resources\hdl_ez_msg_answer%402x.png" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" /> |
| | | </Project> |
| | |
| | | archiveVersion = 1; |
| | | classes = { |
| | | }; |
| | | objectVersion = 52; |
| | | objectVersion = 54; |
| | | objects = { |
| | | |
| | | /* Begin PBXBuildFile section */ |
| | | 830957C32A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 830957C22A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m */; }; |
| | | 8318A0DA2A8A591D0012B894 /* FCFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8318A0D92A8A591D0012B894 /* FCFileManager.m */; }; |
| | | 83336F022D1199E2000FE662 /* HDLESDetectionTypeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83336F012D1199E2000FE662 /* HDLESDetectionTypeHeaderView.m */; }; |
| | | 8357F1DE2A42DEC000936D2E /* HDLEZVideoDoorToolView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357F1DD2A42DEC000936D2E /* HDLEZVideoDoorToolView.m */; }; |
| | | 83879A852A7DE42900E10A81 /* HDLEZDetectionTypeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83879A842A7DE42900E10A81 /* HDLEZDetectionTypeViewController.m */; }; |
| | | 83879A882A7DE49900E10A81 /* HDLEZDetectionTypeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83879A872A7DE49900E10A81 /* HDLEZDetectionTypeView.m */; }; |
| | | 83879A8B2A7DE7FC00E10A81 /* HDLEZDetectionTypeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83879A8A2A7DE7FC00E10A81 /* HDLEZDetectionTypeCell.m */; }; |
| | | 83879A8E2A7DEEC500E10A81 /* HDLEZDetectionTypeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 83879A8D2A7DEEC500E10A81 /* HDLEZDetectionTypeModel.m */; }; |
| | | 83D69FFA2A47D32A00871258 /* HDLEZVideoQualityBoxView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83D69FF92A47D32A00871258 /* HDLEZVideoQualityBoxView.m */; }; |
| | | 83DC3D952CDB5AEB00F9DDF7 /* HDLEZMirrorFlipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83DC3D942CDB5AEB00F9DDF7 /* HDLEZMirrorFlipView.m */; }; |
| | | 83EE503D2A41C9BA0006435D /* HDLEZOPButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 83EE503C2A41C9BA0006435D /* HDLEZOPButton.m */; }; |
| | | AE31FE1F29CC2D2200678568 /* EZOpenSDKFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE31FE1E29CC2D2200678568 /* EZOpenSDKFramework.framework */; platformFilter = ios; }; |
| | | AE5068D829B9DB5E009EA09A /* HDLEZTemInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = AE5068D729B9DB5E009EA09A /* HDLEZTemInfoModel.m */; }; |
| | |
| | | 830957C22A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZVideoDoorMsgCell.m; sourceTree = "<group>"; }; |
| | | 8318A0D82A8A591D0012B894 /* FCFileManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FCFileManager.h; sourceTree = "<group>"; }; |
| | | 8318A0D92A8A591D0012B894 /* FCFileManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FCFileManager.m; sourceTree = "<group>"; }; |
| | | 83336F002D1199E2000FE662 /* HDLESDetectionTypeHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLESDetectionTypeHeaderView.h; sourceTree = "<group>"; }; |
| | | 83336F012D1199E2000FE662 /* HDLESDetectionTypeHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLESDetectionTypeHeaderView.m; sourceTree = "<group>"; }; |
| | | 8357F1DC2A42DEC000936D2E /* HDLEZVideoDoorToolView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZVideoDoorToolView.h; sourceTree = "<group>"; }; |
| | | 8357F1DD2A42DEC000936D2E /* HDLEZVideoDoorToolView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZVideoDoorToolView.m; sourceTree = "<group>"; }; |
| | | 83879A832A7DE42900E10A81 /* HDLEZDetectionTypeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZDetectionTypeViewController.h; sourceTree = "<group>"; }; |
| | |
| | | 83879A8D2A7DEEC500E10A81 /* HDLEZDetectionTypeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZDetectionTypeModel.m; sourceTree = "<group>"; }; |
| | | 83D69FF82A47D32A00871258 /* HDLEZVideoQualityBoxView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZVideoQualityBoxView.h; sourceTree = "<group>"; }; |
| | | 83D69FF92A47D32A00871258 /* HDLEZVideoQualityBoxView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZVideoQualityBoxView.m; sourceTree = "<group>"; }; |
| | | 83DC3D932CDB5AEB00F9DDF7 /* HDLEZMirrorFlipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZMirrorFlipView.h; sourceTree = "<group>"; }; |
| | | 83DC3D942CDB5AEB00F9DDF7 /* HDLEZMirrorFlipView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZMirrorFlipView.m; sourceTree = "<group>"; }; |
| | | 83EE503B2A41C9BA0006435D /* HDLEZOPButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZOPButton.h; sourceTree = "<group>"; }; |
| | | 83EE503C2A41C9BA0006435D /* HDLEZOPButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZOPButton.m; sourceTree = "<group>"; }; |
| | | AE31FE1E29CC2D2200678568 /* EZOpenSDKFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = EZOpenSDKFramework.framework; sourceTree = "<group>"; }; |
| | |
| | | 83D69FF92A47D32A00871258 /* HDLEZVideoQualityBoxView.m */, |
| | | 83879A862A7DE49900E10A81 /* HDLEZDetectionTypeView.h */, |
| | | 83879A872A7DE49900E10A81 /* HDLEZDetectionTypeView.m */, |
| | | 83336F002D1199E2000FE662 /* HDLESDetectionTypeHeaderView.h */, |
| | | 83336F012D1199E2000FE662 /* HDLESDetectionTypeHeaderView.m */, |
| | | 83879A892A7DE7FC00E10A81 /* HDLEZDetectionTypeCell.h */, |
| | | 83879A8A2A7DE7FC00E10A81 /* HDLEZDetectionTypeCell.m */, |
| | | 83DC3D932CDB5AEB00F9DDF7 /* HDLEZMirrorFlipView.h */, |
| | | 83DC3D942CDB5AEB00F9DDF7 /* HDLEZMirrorFlipView.m */, |
| | | ); |
| | | path = Views; |
| | | sourceTree = "<group>"; |
| | |
| | | B9BC99F825C0FFBD00C024FE /* EZCustomTableView.m in Sources */, |
| | | B9BC9A2625C0FFBD00C024FE /* EZEditViewController.m in Sources */, |
| | | AEC306D529B9F2DB000B3861 /* HDLEZVisitorRecordCell.m in Sources */, |
| | | 83336F022D1199E2000FE662 /* HDLESDetectionTypeHeaderView.m in Sources */, |
| | | AEDBFBA529C3072D005F6512 /* HDLEZDeviceMsgCell.m in Sources */, |
| | | B9BC9A2525C0FFBD00C024FE /* EZOnlineCameraCell.m in Sources */, |
| | | B9BC999B25C0FFBD00C024FE /* UITableView+FDTemplateLayoutCell.m in Sources */, |
| | |
| | | B9BC9A2325C0FFBD00C024FE /* EZMessageListViewController.m in Sources */, |
| | | B9BC99B725C0FFBD00C024FE /* MWZoomingScrollView.m in Sources */, |
| | | B9EA4E8A25C7E806000FFDA2 /* MJRefreshBackGifFooter.m in Sources */, |
| | | 83DC3D952CDB5AEB00F9DDF7 /* HDLEZMirrorFlipView.m in Sources */, |
| | | B9BC99B625C0FFBD00C024FE /* MWCaptionView.m in Sources */, |
| | | 83879A852A7DE42900E10A81 /* HDLEZDetectionTypeViewController.m in Sources */, |
| | | B9BC9A0B25C0FFBD00C024FE /* EZDeviceUpgradeViewController.m in Sources */, |
| | |
| | | code:(NSString *)code |
| | | completion:(void (^)(ResponseData *responseData))completion; |
| | | |
| | | /** |
| | | * @since 获取设备能力集 |
| | | * @param deviceSerial 设备序列号 |
| | | * @param completion 回调block,error为空时表示成功 |
| | | */ |
| | | - (void)getDeviceCapacity:(NSString *)deviceSerial |
| | | completion:(void (^)(ResponseData *responseData))completion; |
| | | |
| | | /** |
| | | * @since 设置设备云台镜像 |
| | | * @param deviceSerial 设备序列号 |
| | | * @param command 命令 0-上下;1-左右;2-中心 |
| | | * @param completion 回调block,error为空时表示成功 |
| | | */ |
| | | - (void)setPtzMiroor:(NSString *)deviceSerial |
| | | command:(NSString *)command |
| | | completion:(void (^)(ResponseData *responseData))completion; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
| | |
| | | #define AOI_POST_EZ_UpdateAnswerStatus @"/home-wisdom/platform/yingshi/lock/updateAnswerStatus" // 更改门铃通话状态(接听和未接) |
| | | #define API_POST_EZ_GetAiSupportList @"/home-wisdom/platform/yingshi/getAiSupportList"//获取摄像头智能算法列表和状态 |
| | | #define API_POST_EZ_SetAiSupport @"/home-wisdom/platform/yingshi/setAiSupport"//设置摄像头智能算法 |
| | | #define API_POST_EZ_GetDeviceCapacity @"/home-wisdom/platform/yingshi/getDeviceCapacity"//获取设备能力集(获取摄像头反转能力) |
| | | #define API_POST_EZ_SetPtzMiroor @"/home-wisdom/platform/yingshi/setPtzMiroor"//设置设备云台镜像(设置摄像头反转能力) |
| | | |
| | | #pragma mark APP_KEY |
| | | #define APP_KEY @"QWERREWQ" |
| | | #define SECRET_KEY @"CPBUCTRLCPBUABCD" |
| | | #define APP_KEY @"HDL-HOME-APP-TEST" |
| | | #define SECRET_KEY @"WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss" |
| | | |
| | | |
| | | #define TIME_OUT 30.0f |
| | |
| | | }]; |
| | | } |
| | | |
| | | /** |
| | | * @since 获取设备能力集 |
| | | * @param deviceSerial 设备序列号 |
| | | * @param completion 回调block,error为空时表示成功 |
| | | */ |
| | | - (void)getDeviceCapacity:(NSString *)deviceSerial |
| | | completion:(void (^)(ResponseData *responseData))completion { |
| | | //设置请求参数 |
| | | NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; |
| | | [parameters setValue:deviceSerial forKey:@"deviceSerial"]; |
| | | [parameters setValue:@(1) forKey:@"platform"]; |
| | | [parameters setValue:[GlobalKit shareKit].hdlHomeId forKey:@"homeId"]; |
| | | |
| | | parameters = [self GetSignRequestDictionary:parameters]; |
| | | |
| | | NSLog(@"获取设备能力集参数:%@",parameters); |
| | | |
| | | [self requestHttpsPost:API_POST_EZ_GetDeviceCapacity parameters:parameters completion:^(ResponseData *responseData) { |
| | | if (completion) { |
| | | completion (responseData); |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | /** |
| | | * @since 设置设备云台镜像 |
| | | * @param deviceSerial 设备序列号 |
| | | * @param command 命令 0-上下;1-左右;2-中心 |
| | | * @param completion 回调block,error为空时表示成功 |
| | | */ |
| | | - (void)setPtzMiroor:(NSString *)deviceSerial |
| | | command:(NSString *)command |
| | | completion:(void (^)(ResponseData *responseData))completion { |
| | | //设置请求参数 |
| | | NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; |
| | | [parameters setValue:deviceSerial forKey:@"deviceSerial"]; |
| | | [parameters setValue:@(1) forKey:@"platform"]; |
| | | [parameters setValue:[GlobalKit shareKit].hdlHomeId forKey:@"homeId"]; |
| | | [parameters setValue:command forKey:@"command"]; |
| | | |
| | | parameters = [self GetSignRequestDictionary:parameters]; |
| | | |
| | | NSLog(@"设置设备云台镜像参数:%@",parameters); |
| | | |
| | | [self requestHttpsPost:API_POST_EZ_SetPtzMiroor parameters:parameters completion:^(ResponseData *responseData) { |
| | | if (completion) { |
| | | completion (responseData); |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | |
| | | /// 刷新token |
| | | /// @param block 结果 |
| | |
| | | params =[NSMutableDictionary dictionary]; |
| | | } |
| | | UInt64 recordTime = [[NSDate date] timeIntervalSince1970]*1000; |
| | | [params setValue:APP_KEY forKey:@"appKey"]; |
| | | NSString *hdlServerAppKey = [GlobalKit shareKit].hdlServerAppKey; |
| | | if (!hdlServerAppKey || hdlServerAppKey.length == 0) { |
| | | hdlServerAppKey = APP_KEY; |
| | | } |
| | | NSString *hdlServerAppSecret = [GlobalKit shareKit].hdlServerAppSecret; |
| | | if (!hdlServerAppSecret || hdlServerAppSecret.length == 0) { |
| | | hdlServerAppSecret = SECRET_KEY; |
| | | } |
| | | [params setValue:hdlServerAppKey forKey:@"appKey"]; |
| | | [params setValue:[NSString stringWithFormat:@"%llu",recordTime] forKey:@"timestamp"]; |
| | | NSLog(@"##########APPKEY:%@, SECRET_KEY:%@", APP_KEY, SECRET_KEY); |
| | | NSLog(@"##########APPKEY:%@, SECRETKEY:%@", hdlServerAppKey, hdlServerAppSecret); |
| | | //1.对KEY升序 |
| | | NSArray *keyArray = [params allKeys]; |
| | | NSArray *sortKeyArray = [keyArray sortedArrayUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { |
| | |
| | | } |
| | | //2.3 拼接SECRET_KEY |
| | | newString = [newString substringToIndex:[newString length] - 1]; |
| | | newString = [newString stringByAppendingString: SECRET_KEY]; |
| | | newString = [newString stringByAppendingString: hdlServerAppSecret]; |
| | | //2.4 MD5转换+转小写 |
| | | if([self stringIsNullOrEmpty:newString]){ |
| | | newString = @""; |
| | |
| | | @property (nonatomic, copy) NSString *hdlHomeId; |
| | | @property (nonatomic, copy) NSString *hdlAppKey; |
| | | |
| | | @property (nonatomic, copy) NSString *hdlServerAppKey; |
| | | @property (nonatomic, copy) NSString *hdlServerAppSecret; |
| | | |
| | | @property (nonatomic, copy) NSString *accessToken; |
| | | @property (nonatomic, copy) NSString *deviceSerialNo; //设备序列号 |
| | | @property (nonatomic, copy) NSString *deviceModel; //设备类型字符串 |
| | |
| | | // |
| | | |
| | | #import "HDLEZDetectionTypeViewController.h" |
| | | #import "HDLESDetectionTypeHeaderView.h" |
| | | #import "HDLEZDetectionTypeView.h" |
| | | #import "MJRefreshNormalHeader.h" |
| | | |
| | | @interface HDLEZDetectionTypeViewController () |
| | | |
| | | @property (nonatomic, strong) HDLESDetectionTypeHeaderView *detectionTypeHeaderView; |
| | | |
| | | @property (nonatomic, strong) HDLEZDetectionTypeView *detectionTypeView; |
| | | |
| | |
| | | self.view.backgroundColor = HDLEZHEXCOLOR(0xF2F3F7, 1.); |
| | | |
| | | self.selectedCode = @""; |
| | | [self.view addSubview:self.detectionTypeHeaderView]; |
| | | [self.view addSubview:self.detectionTypeView]; |
| | | [self.view addSubview:self.sureButton]; |
| | | |
| | | [self.detectionTypeView mas_makeConstraints:^(MASConstraintMaker *make) { |
| | | [self.detectionTypeHeaderView mas_makeConstraints:^(MASConstraintMaker *make) { |
| | | make.top.equalTo(self.view).offset(HDLEZ_APP_TOP_BAR_HEIGHT); |
| | | make.left.right.equalTo(self.view); |
| | | make.height.mas_equalTo(60); |
| | | }]; |
| | | |
| | | [self.detectionTypeView mas_makeConstraints:^(MASConstraintMaker *make) { |
| | | make.top.equalTo(self.view).offset(HDLEZ_APP_TOP_BAR_HEIGHT + 70); |
| | | make.left.right.equalTo(self.view); |
| | | }]; |
| | | |
| | |
| | | // self.detectionTypeView.detectionTypeList = mArray; |
| | | |
| | | __weak __typeof(self)weakSelf = self; |
| | | BOOL isDefence = (self.deviceInfo.defence != 0); |
| | | [self updateDetectionView:isDefence]; |
| | | |
| | | [self.detectionTypeHeaderView configSelected:isDefence switchResult:^(BOOL isSelected) { |
| | | __weak MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; |
| | | hud.labelText = NSLocalizedString(@"setting_switching", @"正在切换,请稍候..."); |
| | | /** |
| | | * 注意;该demo只处理了IPC设备的布撤防,所有只有YES/NO,关于A系列设备请判断设备后修改枚举值再处理 |
| | | */ |
| | | [EZOPENSDK setDefence:isSelected |
| | | deviceSerial:weakSelf.deviceInfo.deviceSerial |
| | | completion:^(NSError *error) { |
| | | |
| | | [hud hide:YES]; |
| | | if (error) { |
| | | [weakSelf.view makeToast:NSLocalizedString(@"setting_opration_fail", @"操作失败") duration:2.0 position:@"center"]; |
| | | [weakSelf.detectionTypeHeaderView configSelected:!isSelected]; |
| | | } |
| | | else{ |
| | | weakSelf.deviceInfo.defence = isSelected; |
| | | } |
| | | BOOL isDefence = (weakSelf.deviceInfo.defence != 0); |
| | | [weakSelf updateDetectionView:isDefence]; |
| | | }]; |
| | | }]; |
| | | |
| | | [self.detectionTypeView didSelectedDetectionType:^(NSString * _Nonnull code) { |
| | | weakSelf.selectedCode = code; |
| | | }]; |
| | |
| | | [_header beginRefreshing]; |
| | | |
| | | [self.sureButton addTarget:self action:@selector(sureAction) forControlEvents:UIControlEventTouchUpInside]; |
| | | } |
| | | |
| | | - (void)updateDetectionView:(BOOL)isDefence { |
| | | self.detectionTypeView.hidden = !isDefence; |
| | | self.sureButton.hidden = !isDefence; |
| | | } |
| | | |
| | | |
| | |
| | | - (void)sureAction { |
| | | if (self.selectedCode && self.selectedCode.length > 0) { |
| | | __weak __typeof(self)weakSelf = self; |
| | | __weak MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; |
| | | hud.labelText = NSLocalizedString(@"setting_switching", @"正在切换,请稍候..."); |
| | | [[EZHttpUtil sharedManager] setAiSupportDetection:self.deviceInfo.deviceSerial code:self.selectedCode completion:^(ResponseData * _Nonnull responseData) { |
| | | [hud hide:YES]; |
| | | if (responseData.success) { |
| | | [weakSelf.view makeToast:HDLEZLocallizedString(@"setting_opration_success") |
| | | duration:1.5 |
| | |
| | | } |
| | | |
| | | #pragma mark - Getter |
| | | - (HDLESDetectionTypeHeaderView *)detectionTypeHeaderView { |
| | | if (!_detectionTypeHeaderView) { |
| | | _detectionTypeHeaderView = [[HDLESDetectionTypeHeaderView alloc] init]; |
| | | _detectionTypeHeaderView.backgroundColor = [UIColor whiteColor]; |
| | | } |
| | | return _detectionTypeHeaderView; |
| | | } |
| | | |
| | | - (HDLEZDetectionTypeView *)detectionTypeView { |
| | | if (!_detectionTypeView) { |
| | | _detectionTypeView = [[HDLEZDetectionTypeView alloc] init]; |
New file |
| | |
| | | // |
| | | // HDLESDetectionTypeHeaderView.h |
| | | // EZSDK |
| | | // |
| | | // Created by Davin on 2024/12/17. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface HDLESDetectionTypeHeaderView : UIView |
| | | |
| | | - (void)configSelected:(BOOL)isSelected; |
| | | |
| | | - (void)configSelected:(BOOL)isSelected switchResult:(void(^)(BOOL isSelected))result; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // HDLESDetectionTypeHeaderView.m |
| | | // EZSDK |
| | | // |
| | | // Created by Davin on 2024/12/17. |
| | | // |
| | | |
| | | #import "HDLESDetectionTypeHeaderView.h" |
| | | |
| | | @interface HDLESDetectionTypeHeaderView () |
| | | |
| | | @property (nonatomic, strong) UILabel *titleLabel; |
| | | @property (nonatomic, strong) UISwitch *detectionSwitch; |
| | | |
| | | @property (nonatomic, copy)void(^switchBlock)(BOOL isSelected); |
| | | |
| | | @end |
| | | |
| | | @implementation HDLESDetectionTypeHeaderView |
| | | |
| | | - (instancetype)initWithFrame:(CGRect)frame { |
| | | if (self = [super initWithFrame:frame]) { |
| | | [self createSubviews]; |
| | | } |
| | | return self; |
| | | } |
| | | |
| | | - (void)createSubviews { |
| | | [self addSubview:self.titleLabel]; |
| | | [self addSubview:self.detectionSwitch]; |
| | | |
| | | [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| | | make.left.mas_equalTo(self.mas_left).offset(16); |
| | | make.centerY.mas_equalTo(self.mas_centerY); |
| | | }]; |
| | | |
| | | [self.detectionSwitch mas_makeConstraints:^(MASConstraintMaker *make) { |
| | | make.left.mas_greaterThanOrEqualTo(self.titleLabel.mas_right).offset(16); |
| | | make.right.mas_equalTo(self.mas_right); |
| | | make.centerY.mas_equalTo(self.titleLabel.mas_centerY); |
| | | make.width.mas_equalTo(70); |
| | | make.height.mas_equalTo(28); |
| | | }]; |
| | | |
| | | [self.detectionSwitch addTarget:self action:@selector(detectionSwitchAction:) forControlEvents:UIControlEventValueChanged]; |
| | | } |
| | | |
| | | #pragma mark - PublishMethod |
| | | - (void)configSelected:(BOOL)isSelected { |
| | | [self.detectionSwitch setOn:isSelected]; |
| | | } |
| | | |
| | | /// 检测信息设置 |
| | | /// - Parameters: |
| | | /// - detectionType: 检测类型 |
| | | /// - isSelected: 是否选中 |
| | | - (void)configSelected:(BOOL)isSelected switchResult:(void(^)(BOOL isSelected))result { |
| | | self.switchBlock = result; |
| | | [self.detectionSwitch setOn:isSelected]; |
| | | } |
| | | |
| | | |
| | | #pragma mark - PrivateMethod |
| | | - (void)detectionSwitchAction:(UISwitch *)sender { |
| | | if (self.switchBlock) { |
| | | self.switchBlock(sender.isOn); |
| | | } |
| | | } |
| | | |
| | | #pragma mark - Getter |
| | | - (UILabel *)titleLabel { |
| | | if (!_titleLabel) { |
| | | _titleLabel=[[UILabel alloc] init]; |
| | | _titleLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14); |
| | | _titleLabel.textColor=HDLEZ_COLOR_TITLE_BLACK; |
| | | _titleLabel.text = NSLocalizedString(@"setting_action_detect", @"活动检测提醒"); |
| | | } |
| | | return _titleLabel; |
| | | } |
| | | |
| | | - (UISwitch *)detectionSwitch { |
| | | if (!_detectionSwitch) { |
| | | _detectionSwitch = [[UISwitch alloc] initWithFrame:CGRectZero]; |
| | | _detectionSwitch.on = NO; |
| | | |
| | | } |
| | | return _detectionSwitch; |
| | | } |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // HDLEZMirrorFlipView.h |
| | | // EZSDK |
| | | // |
| | | // Created by Davin on 2024/11/6. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface HDLEZMirrorFlipView : UIView |
| | | |
| | | /// 配置镜像翻转信息 |
| | | /// - Parameters: |
| | | /// - title: 标题 |
| | | /// - subTitle: 子标题 |
| | | /// - clickResult: 点击回调 |
| | | - (void)configTitle:(NSString *)title subTitle:(NSString *)subTitle click:(void(^)(void))clickResult; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // HDLEZMirrorFlipView.m |
| | | // EZSDK |
| | | // |
| | | // Created by Davin on 2024/11/6. |
| | | // |
| | | |
| | | #import "HDLEZMirrorFlipView.h" |
| | | |
| | | @interface HDLEZMirrorFlipView () |
| | | |
| | | @property (nonatomic, strong) UIView *baseView; |
| | | @property (nonatomic, strong) UILabel *titleLabel; |
| | | @property (nonatomic, strong) UIImageView *rightIcon; |
| | | @property (nonatomic, strong) UILabel *subTitleLabel; |
| | | |
| | | @property (nonatomic, copy) void(^clickBlock)(void); |
| | | |
| | | @end |
| | | |
| | | @implementation HDLEZMirrorFlipView |
| | | |
| | | - (instancetype)initWithFrame:(CGRect)frame { |
| | | if (self = [super initWithFrame:frame]) { |
| | | [self createSubviews]; |
| | | } |
| | | return self; |
| | | } |
| | | |
| | | - (void)createSubviews { |
| | | self.backgroundColor = [UIColor clearColor]; |
| | | [self addSubview:self.baseView]; |
| | | [self addSubview:self.titleLabel]; |
| | | [self addSubview:self.rightIcon]; |
| | | [self addSubview:self.subTitleLabel]; |
| | | |
| | | [self.baseView mas_makeConstraints:^(MASConstraintMaker *make) { |
| | | make.top.mas_equalTo(self.mas_top); |
| | | make.left.mas_equalTo(self.mas_left); |
| | | make.right.mas_equalTo(self.mas_right); |
| | | make.height.mas_equalTo(50.); |
| | | }]; |
| | | |
| | | [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| | | make.left.mas_equalTo(self.baseView.mas_left).offset(16.); |
| | | make.centerY.mas_equalTo(self.baseView.mas_centerY); |
| | | }]; |
| | | |
| | | [self.rightIcon mas_makeConstraints:^(MASConstraintMaker *make) { |
| | | make.right.mas_equalTo(self.mas_right).offset(-16.); |
| | | make.centerY.mas_equalTo(self.baseView.mas_centerY); |
| | | make.width.mas_equalTo(16); |
| | | make.height.mas_equalTo(16); |
| | | }]; |
| | | |
| | | [self.subTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| | | make.top.mas_equalTo(self.baseView.mas_bottom); |
| | | make.left.mas_equalTo(self.titleLabel.mas_left); |
| | | make.height.mas_equalTo(50.); |
| | | }]; |
| | | |
| | | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(mirrorFlipAction)]; |
| | | [self.baseView addGestureRecognizer:tapGesture]; |
| | | } |
| | | |
| | | #pragma mark - PublishMethod |
| | | /// 配置镜像翻转信息 |
| | | /// - Parameters: |
| | | /// - title: 标题 |
| | | /// - subTitle: 子标题 |
| | | /// - clickResult: 点击回调 |
| | | - (void)configTitle:(NSString *)title subTitle:(NSString *)subTitle click:(void(^)(void))clickResult { |
| | | self.titleLabel.text = title; |
| | | self.subTitleLabel.text = subTitle; |
| | | self.clickBlock = clickResult; |
| | | } |
| | | |
| | | #pragma mark - PrivateMethod |
| | | - (void)mirrorFlipAction { |
| | | if (self.clickBlock) { |
| | | self.clickBlock(); |
| | | } |
| | | } |
| | | |
| | | #pragma mark - Getter |
| | | - (UIView *)baseView { |
| | | if (!_baseView) { |
| | | _baseView = [[UIView alloc] init]; |
| | | _baseView.backgroundColor = HDLEZ_COLOR_VIEW_FOREGROUND; |
| | | } |
| | | return _baseView; |
| | | } |
| | | |
| | | - (UILabel *)titleLabel { |
| | | if (!_titleLabel) { |
| | | _titleLabel=[[UILabel alloc] init]; |
| | | _titleLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_16); |
| | | _titleLabel.textColor=HDLEZHEXCOLOR(0x1B2D4D, 1.0);; |
| | | } |
| | | return _titleLabel; |
| | | } |
| | | |
| | | - (UIImageView *)rightIcon { |
| | | if (!_rightIcon) { |
| | | _rightIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hdl_ez_list_next"]]; |
| | | _rightIcon.contentMode = UIViewContentModeScaleAspectFill; |
| | | _rightIcon.backgroundColor = UIColor.clearColor; |
| | | } |
| | | return _rightIcon; |
| | | } |
| | | |
| | | - (UILabel *)subTitleLabel { |
| | | if (!_subTitleLabel) { |
| | | _subTitleLabel=[[UILabel alloc] init]; |
| | | _subTitleLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14); |
| | | _subTitleLabel.textColor=HDLEZ_COLOR_TEXT_GRAY; |
| | | } |
| | | return _subTitleLabel; |
| | | } |
| | | |
| | | @end |
| | |
| | | #import <EZOpenSDKFramework/EZStorageInfo.h> |
| | | #import "Toast+UIView.h" |
| | | #import "HDLEZDetectionTypeViewController.h" |
| | | #import "HDLEZMirrorFlipView.h" |
| | | |
| | | //#import "EzvizDeviceManager.h" |
| | | |
| | |
| | | @property (nonatomic, weak) IBOutlet UILabel *currentVersionLabel; |
| | | @property (nonatomic, weak) IBOutlet UILabel *nVersionLabel; |
| | | @property (nonatomic, weak) IBOutlet UIImageView *updateImageView; |
| | | @property (nonatomic, strong) HDLEZMirrorFlipView *mirrorFlipView; |
| | | @property (nonatomic, strong) UIButton *deleteButton; |
| | | @property (nonatomic, strong) UIButton *privacyMaskButton; // 隐私遮蔽执行过程提醒按钮 |
| | | @property (nonatomic, strong) EZDeviceVersion *deviceVersion; |
| | | @property (nonatomic, strong) NSTimer *timer; |
| | | @property (nonatomic, assign) BOOL isCatEye; // 是否为猫眼 |
| | | @property (nonatomic, assign) BOOL privacyMasking; // 隐私遮蔽设置中 |
| | | @property (nonatomic, copy) NSString *mirrorFlipCommand; // 镜像翻转命令 |
| | | |
| | | @end |
| | | |
| | |
| | | weakSelf.nVersionLabel.text = version.currentVersion; |
| | | } |
| | | }]; |
| | | [[EZHttpUtil sharedManager] getDeviceCapacity:self.deviceInfo.deviceSerial completion:^(ResponseData * _Nonnull responseData) { |
| | | NSLog(@"#######镜像翻转值返回结果:%@", [responseData yy_modelToJSONString]); |
| | | if (responseData.success && responseData.data) { |
| | | NSLog(@"#######镜像翻转值为:%@", responseData.data); |
| | | BOOL ptzCenterMirror = [[responseData.data objectForKey:@"ptzCenterMirror"] boolValue]; |
| | | BOOL ptzLeftRightMirror = [[responseData.data objectForKey:@"ptzLeftRightMirror"] boolValue]; |
| | | BOOL ptzTopBottomMirror = [[responseData.data objectForKey:@"ptzTopBottomMirror"] boolValue]; |
| | | if (ptzTopBottomMirror) { |
| | | weakSelf.mirrorFlipCommand = @"0"; |
| | | } |
| | | if (ptzLeftRightMirror) { |
| | | weakSelf.mirrorFlipCommand = @"1"; |
| | | } |
| | | if (ptzCenterMirror) { |
| | | weakSelf.mirrorFlipCommand = @"2"; |
| | | } |
| | | [weakSelf.tableView reloadData]; |
| | | } |
| | | }]; |
| | | |
| | | [self.privacyMaskSwitch setOn:NO]; |
| | | [self getPrivacyMaskSwitchStatus]; |
| | | self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
| | |
| | | cell.backgroundColor = [UIColor clearColor]; |
| | | cell.contentView.backgroundColor = [UIColor clearColor]; |
| | | cell.textLabel.text = @""; |
| | | if (self.mirrorFlipCommand && self.mirrorFlipCommand.length > 0) { |
| | | [cell.contentView addSubview:self.mirrorFlipView]; |
| | | __weak __typeof(self)weakSelf = self; |
| | | [self.mirrorFlipView configTitle:NSLocalizedString(@"api_mirror_flip", @"画面翻转") subTitle:NSLocalizedString(@"api_mirror_flip_trip", @"点击后视频画面会翻转展示,适合倒装的场景") click:^{ |
| | | [weakSelf mirrorFlipAction]; |
| | | }]; |
| | | } |
| | | [cell.contentView addSubview:self.deleteButton]; |
| | | [self.deleteButton addTarget:self action:@selector(deleteAction) forControlEvents:UIControlEventTouchUpInside]; |
| | | [self.deleteButton mas_remakeConstraints:^(MASConstraintMaker *make) { |
| | |
| | | cell.backgroundColor = [UIColor clearColor]; |
| | | cell.contentView.backgroundColor = [UIColor clearColor]; |
| | | cell.textLabel.text = @""; |
| | | if (self.mirrorFlipCommand && self.mirrorFlipCommand.length > 0) { |
| | | [cell.contentView addSubview:self.mirrorFlipView]; |
| | | __weak __typeof(self)weakSelf = self; |
| | | [self.mirrorFlipView configTitle:NSLocalizedString(@"api_mirror_flip", @"画面翻转") subTitle:NSLocalizedString(@"api_mirror_flip_trip", @"点击后视频画面会翻转展示,适合倒装的场景") click:^{ |
| | | [weakSelf mirrorFlipAction]; |
| | | }]; |
| | | } |
| | | [cell.contentView addSubview:self.deleteButton]; |
| | | [self.deleteButton addTarget:self action:@selector(deleteAction) forControlEvents:UIControlEventTouchUpInside]; |
| | | [self.deleteButton mas_remakeConstraints:^(MASConstraintMaker *make) { |
| | |
| | | } |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { |
| | | return ((!self.isCatEye && indexPath.section == 8) || (self.isCatEye && indexPath.section == 6)) ? 92 : 50.; |
| | | return ((!self.isCatEye && indexPath.section == 8) || (self.isCatEye && indexPath.section == 6)) ? (self.mirrorFlipCommand && self.mirrorFlipCommand.length > 0 ? 192 : 92) : 50.; |
| | | } |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { |
| | |
| | | [self presentViewController:actionSheet animated:YES completion:nil]; |
| | | } |
| | | |
| | | - (void)mirrorFlipAction { |
| | | __weak MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; |
| | | __weak __typeof(self)weakSelf = self; |
| | | [[EZHttpUtil sharedManager] setPtzMiroor:self.deviceInfo.deviceSerial command:self.mirrorFlipCommand completion:^(ResponseData * _Nonnull responseData) { |
| | | NSLog(@"#######设置镜像翻转值返回结果:%@", [responseData yy_modelToJSONString]); |
| | | [hud hide:YES]; |
| | | if (responseData.success) { |
| | | [UIView dd_showMessage:NSLocalizedString(@"api_mirror_flip_success", @"画面翻转成功")]; |
| | | } else { |
| | | [UIView dd_showMessage:responseData.message]; |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | #pragma mark - Getter |
| | | - (UIButton *)deleteButton { |
| | | if (!_deleteButton) { |
| | |
| | | return _actionRightArrow; |
| | | } |
| | | |
| | | - (HDLEZMirrorFlipView *)mirrorFlipView { |
| | | if (!_mirrorFlipView) { |
| | | _mirrorFlipView = [[HDLEZMirrorFlipView alloc] initWithFrame:CGRectMake(0, 0, HDLEZ_APP_SCREEN_WIDTH, 100)]; |
| | | } |
| | | return _mirrorFlipView; |
| | | } |
| | | |
| | | @end |
| | |
| | | 设置HDLSDK的accessToken |
| | | */ |
| | | - (void)setHDlAccessToken:(NSString *)accessToken refreshToken:(NSString *) refreshToken; |
| | | |
| | | /** |
| | | 配置平台appkey和appSecret |
| | | 传入appKey和appSecret |
| | | */ |
| | | - (void)configHDLServerAppKey:(NSString *)appKey appSecret:(NSString *)appSecret; |
| | | |
| | | /** |
| | | 设置SDK的河东接口的requestHttpsHost和平台 标识,1.on+(默认) 2.evoyo |
| | | */ |
| | |
| | | [[GlobalKit shareKit] setHdlAccessToken:accessToken]; |
| | | [[GlobalKit shareKit] setHdlRefreshToken:refreshToken]; |
| | | } |
| | | |
| | | /** |
| | | 配置平台appkey和appSecret |
| | | 传入appKey和appSecret |
| | | */ |
| | | - (void)configHDLServerAppKey:(NSString *)appKey appSecret:(NSString *)appSecret { |
| | | [[GlobalKit shareKit] setHdlServerAppKey:appKey]; |
| | | [[GlobalKit shareKit] setHdlServerAppSecret:appSecret]; |
| | | } |
| | | |
| | | /** |
| | | 设置SDK的河东接口的requestHttpsHost和平台 标识,1.on+(默认) 2.evoyo |
| | | */ |