萤石云 iOSSDK,移植跨平台相关工程
Davin
2024-11-20 8bfc1215384797f9b709ee06bc721d472182f15b
feature 萤石摄像头翻转
7个文件已添加
17个文件已修改
458 ■■■■■ 已修改文件
EZDemo/HDLEZDemo/HDLEZDemo/AppDelegate.m 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZDemo/HDLEZDemo/HDLEZDemo/EZMain.storyboard 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZDemo/HDLEZDemo/HDLEZDemo/libEZSDK.a 补丁 | 查看 | 原始文档 | blame | 历史
EZDemo/HDLEZDemo/HDLEZDemo/resources/en.lproj/Localizable.strings 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZDemo/HDLEZDemo/HDLEZDemo/resources/zh-Hans.lproj/Localizable.strings 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/ApiDefinition.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/ApiDefinitions.cs 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/EZSDK.IOS.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/Library/libEZSDK.a 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_list_next@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_list_next@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_answer@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_answer@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_no_answer@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_no_answer@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK.xcodeproj/project.pbxproj 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/Global/EZHttpUtil.h 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/Global/EZHttpUtil.m 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/Global/GlobalKit.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZMirrorFlipView.h 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZMirrorFlipView.m 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZ/UIViewControllers/EZSettingViewController.m 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZSDK.h 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZSDK/EZSDK/EZSDK.m 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EZDemo/HDLEZDemo/HDLEZDemo/AppDelegate.m
@@ -25,10 +25,10 @@
    // 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:@"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiIxODZlNWIxOTlhMzI0NzdhOTg0MTc1NWFiZDgwNjhiYSIsImNvbXBhbnlJZCI6IjAiLCJyb2xlIjoiIiwiaGVhZGVyUHJlZml4IjoiQmVhcmVyICIsInRlbmFudElkIjoiMjAiLCJ1c2VyVHlwZSI6IlVTRVJfQyIsInRva2VuVHlwZSI6ImFjY2Vzc190b2tlbiIsInVzZXJOYW1lIjoi54eV5ZCbIiwidXNlckRhdGFSaWdodCI6IjEiLCJvcGVuQXBwbGljYXRpb25JZCI6IjAiLCJ1c2VySWQiOiIxNjU2OTE3NDUxMjgxNTM0OTc3IiwiZXhwIjoxNzMwODkxMzczLCJuYmYiOjE3MzA4ODQxNzN9.TYaCAGVQ1c427INqyRLTM9hEpBpIdxm6mj6P2e4DlrvQ-jNjfP7sEphx3Bj7ZH7_lUIenwnCrO_crxIwgvzW3xjCv0D3qzeCbzbf5ynT0sYHIT2hWTJl4tdUYAK-BsEhf7Sfj9se0LzSmDEs2Sbmrm6BoUsViIbS8uVXOpZnPyU" refreshToken:@"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiIzYTQ2MDgxZDI4YWY0MjlmYmUzNTAxOWFlZTgwYmM5MCIsImNvbXBhbnlJZCI6IjAiLCJoZWFkZXJQcmVmaXgiOiJCZWFyZXIgIiwidGVuYW50SWQiOiIyMCIsInRva2VuVHlwZSI6InJlZnJlc2hfdG9rZW4iLCJvcGVuQXBwbGljYXRpb25JZCI6IjAiLCJ1c2VySWQiOiIxNjU2OTE3NDUxMjgxNTM0OTc3IiwiZXhwIjoxNzMxNDg4OTczLCJuYmYiOjE3MzA4ODQxNzN9.RDohTRVczdpxb4Pj9kvbEwHd2AUbYK0jps2kQk-WiVUE1HePoq-HjoYdYTwOw9CLvMuIUdDTru4AwQNtYgT9gF5jJEb7ePXrA8tStNvTyxu5FHMxaPGXY74UGg2H29_N4PEctBjb5A7z4NwJ36RajXsNyJweFLpZxX6QKXtrsbY"];
    [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://test-gz.hdlcontrol.com" platform:1 homeId:@"1719997413437546497"];
//    [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://nearest.hdlcontrol.com" platform:1 homeId:@"1546324800135176193"];
    [[EZSDK sharedInstance] setEZAccessToken:@"ra.ag6fktccckc2gxl84mu40e1o417agh8u-231ke8chyz-0vkjf4x-nqw225sxi"];
    [[EZSDK sharedInstance] setEZAccessToken:@"ra.cej51msz2lc9bd85dcjjh6lo3a1nvhd7-64dvf8rolg-1brlg88-nrsym3uwr"];
//    [[EZSDK sharedInstance] setEZAccessToken:@"ra.3hkirwcadrpfmaa89wep99io3wto4yds-7zptb10d20-1wxg4f3-ygiojudee"];
    
EZDemo/HDLEZDemo/HDLEZDemo/EZMain.storyboard
@@ -1,9 +1,9 @@
<?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>
EZDemo/HDLEZDemo/HDLEZDemo/libEZSDK.a
Binary files differ
EZDemo/HDLEZDemo/HDLEZDemo/resources/en.lproj/Localizable.strings
@@ -7,6 +7,9 @@
"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.";
EZDemo/HDLEZDemo/HDLEZDemo/resources/zh-Hans.lproj/Localizable.strings
@@ -7,6 +7,9 @@
"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"="设备列表获取失败";
EZSDK.IOS/EZSDK.IOS/ApiDefinition.cs
@@ -47,6 +47,11 @@
        [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);
EZSDK.IOS/EZSDK.IOS/ApiDefinitions.cs
New file
@@ -0,0 +1,115 @@
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);
    }
}
EZSDK.IOS/EZSDK.IOS/EZSDK.IOS.csproj
@@ -108,6 +108,10 @@
    <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>
EZSDK.IOS/EZSDK.IOS/Library/libEZSDK.a
Binary files differ
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_list_next@2x.png

EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_list_next@3x.png

EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_answer@2x.png
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_answer@3x.png
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_no_answer@2x.png
EZSDK.IOS/EZSDK.IOS/Resources/hdl_ez_msg_no_answer@3x.png
EZSDK/EZSDK.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
    archiveVersion = 1;
    classes = {
    };
    objectVersion = 52;
    objectVersion = 54;
    objects = {
/* Begin PBXBuildFile section */
@@ -15,6 +15,7 @@
        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 */; };
@@ -209,6 +210,8 @@
        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>"; };
@@ -709,6 +712,8 @@
                83879A872A7DE49900E10A81 /* HDLEZDetectionTypeView.m */,
                83879A892A7DE7FC00E10A81 /* HDLEZDetectionTypeCell.h */,
                83879A8A2A7DE7FC00E10A81 /* HDLEZDetectionTypeCell.m */,
                83DC3D932CDB5AEB00F9DDF7 /* HDLEZMirrorFlipView.h */,
                83DC3D942CDB5AEB00F9DDF7 /* HDLEZMirrorFlipView.m */,
            );
            path = Views;
            sourceTree = "<group>";
@@ -1514,6 +1519,7 @@
                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 */,
EZSDK/EZSDK/EZ/Global/EZHttpUtil.h
@@ -189,6 +189,24 @@
                     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
EZSDK/EZSDK/EZ/Global/EZHttpUtil.m
@@ -35,10 +35,12 @@
#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
@@ -556,6 +558,57 @@
    }];
}
/**
 *  @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 结果
@@ -683,9 +736,17 @@
        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) {
@@ -705,7 +766,7 @@
    }
    //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 = @"";
EZSDK/EZSDK/EZ/Global/GlobalKit.h
@@ -25,6 +25,9 @@
@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;     //设备类型字符串
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZMirrorFlipView.h
New file
@@ -0,0 +1,23 @@
//
//  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
EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZMirrorFlipView.m
New file
@@ -0,0 +1,121 @@
//
//  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
EZSDK/EZSDK/EZ/UIViewControllers/EZSettingViewController.m
@@ -18,6 +18,7 @@
#import <EZOpenSDKFramework/EZStorageInfo.h>
#import "Toast+UIView.h"
#import "HDLEZDetectionTypeViewController.h"
#import "HDLEZMirrorFlipView.h"
//#import "EzvizDeviceManager.h"
@@ -35,12 +36,14 @@
@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
@@ -116,6 +119,26 @@
            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;
@@ -282,6 +305,13 @@
            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) {
@@ -315,6 +345,13 @@
        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) {
@@ -387,7 +424,7 @@
}
- (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 {
@@ -746,6 +783,17 @@
    [self presentViewController:actionSheet animated:YES completion:nil];
}
- (void)mirrorFlipAction {
    [[EZHttpUtil sharedManager] setPtzMiroor:self.deviceInfo.deviceSerial command:self.mirrorFlipCommand completion:^(ResponseData * _Nonnull responseData) {
        NSLog(@"#######设置镜像翻转值返回结果:%@", [responseData yy_modelToJSONString]);
        if (responseData.success) {
            [UIView dd_showMessage:NSLocalizedString(@"api_mirror_flip_success", @"画面翻转成功")];
        } else {
            [UIView dd_showMessage:responseData.message];
        }
    }];
}
#pragma mark - Getter
- (UIButton *)deleteButton {
    if (!_deleteButton) {
@@ -778,4 +826,11 @@
    return _actionRightArrow;
}
- (HDLEZMirrorFlipView *)mirrorFlipView {
    if (!_mirrorFlipView) {
        _mirrorFlipView = [[HDLEZMirrorFlipView alloc] initWithFrame:CGRectMake(0, 0, HDLEZ_APP_SCREEN_WIDTH, 100)];
    }
    return _mirrorFlipView;
}
@end
EZSDK/EZSDK/EZSDK.h
@@ -43,6 +43,13 @@
 设置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
 */
EZSDK/EZSDK/EZSDK.m
@@ -84,6 +84,16 @@
    [[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
 */