From c8c33200e43f05136eca9fc8ff4942f8def31cc6 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 18 八月 2021 10:45:40 +0800
Subject: [PATCH] 2021-08-18 1.完善Android对接LinphoneSDK 2.完善SIP相关接口对接

---
 HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs |  163 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 122 insertions(+), 41 deletions(-)

diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
index 9a25874..aabc46e 100644
--- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -99,30 +99,59 @@
             if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
                 intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
+                intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
+                intent.PutExtra("uuid", mESVideoInfo.uuid);
+                intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
+                intent.PutExtra("cmtID", mESVideoInfo.cmtID);
+                intent.PutExtra("roomno", mESVideoInfo.roomno);
+                intent.PutExtra("unitno", mESVideoInfo.unitno);
+                intent.PutExtra("HomeID", PirSend.HomeId);
+                intent.PutExtra("callId", mESVideoInfo.callId);
+                intent.PutExtra("Type", 0);
+
+                //=========涔愭==========
+                intent.PutExtra("AccessToken", mESVideoInfo.Lc_AccessToken);
+                intent.PutExtra("DeviceId", mESVideoInfo.Lc_DeviceId);
+                intent.PutExtra("Location", OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�);
+                intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken);
+                intent.PutExtra("Psk", mESVideoInfo.Lc_Psk);
+
+                Shared.Application.Activity.StartActivity(intent);
+            }
+            else if (interphoneType == InterphoneType.FLVI.ToString())
+            {
+
+                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+                intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
+                intent.PutExtra("uuid", mESVideoInfo.uuid);
+                intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
+                intent.PutExtra("cmtID", mESVideoInfo.cmtID);
+                intent.PutExtra("roomno", mESVideoInfo.roomno);
+                intent.PutExtra("unitno", mESVideoInfo.unitno);
+                intent.PutExtra("HomeID", PirSend.HomeId);
+                intent.PutExtra("callId", mESVideoInfo.callId);
+                intent.PutExtra("Type", 0);
+
+                //=========涔愭==========
+                intent.PutExtra("AccessToken", mESVideoInfo.Lc_AccessToken);
+                intent.PutExtra("DeviceId", mESVideoInfo.Lc_DeviceId);
+                intent.PutExtra("Location", OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�);
+                intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken);
+                intent.PutExtra("Psk", mESVideoInfo.Lc_Psk);
+
+                Shared.Application.Activity.StartActivity(intent);
+            }
+            else if (interphoneType == InterphoneType.HDL.ToString())
+            {
+                //HDLLinphone 鐙勮�愬厠
+                HDLLinphone.Current.ShowESVideoMonitor(mESVideoInfo);
             }
             else
             {
-                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+                HDLUtils.WriteLine("鏈鎺ワ紝涓嶆敮鎸佺洃瑙�");
             }
 
-            intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
-            intent.PutExtra("uuid", mESVideoInfo.uuid);
-            intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
-            intent.PutExtra("cmtID", mESVideoInfo.cmtID);
-            intent.PutExtra("roomno", mESVideoInfo.roomno);
-            intent.PutExtra("unitno", mESVideoInfo.unitno);
-            intent.PutExtra("HomeID", PirSend.HomeId);
-            intent.PutExtra("callId", mESVideoInfo.callId);
-            intent.PutExtra("Type", 0);
-
-            //=========涔愭==========
-            intent.PutExtra("AccessToken", mESVideoInfo.Lc_AccessToken);
-            intent.PutExtra("DeviceId", mESVideoInfo.Lc_DeviceId);
-            intent.PutExtra("Location", OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�);
-            intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken);
-            intent.PutExtra("Psk", mESVideoInfo.Lc_Psk);
-
-            Shared.Application.Activity.StartActivity(intent);
+          
 
 #endif
         }
@@ -169,7 +198,13 @@
                 EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
 
             }
-            else
+            else if (interphoneType == InterphoneType.HDL.ToString())
+            {
+                //HDL Linphone 鐙勮�愬厠
+     
+
+            }
+            else if (interphoneType == InterphoneType.FLVI.ToString())
             {
 
                 ESOnIntercomViewController vc = new ESOnIntercomViewController();
@@ -181,14 +216,37 @@
                 mOnESCallDelegate = new OnESCallDelegate(this);
                 vc.MESCallDelegate = mOnESCallDelegate;
                 Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
+            }else{
+                HDLUtils.WriteLine("鏈敮鎸佺殑鍙瀵硅绫诲瀷");
+
             }
 #else
-            #region
+            #region Android 澶勭悊
 
             Intent intent = null;
             if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
             {
+                //寰呭垹鍑忎笉蹇呰鍙傛暟
                 intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
+                intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
+                intent.PutExtra("uuid", mESVideoInfo.uuid);
+                intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
+                intent.PutExtra("cmtID", mESVideoInfo.cmtID);
+                intent.PutExtra("roomno", mESVideoInfo.roomno);
+                intent.PutExtra("unitno", mESVideoInfo.unitno);
+                intent.PutExtra("HomeID", PirSend.HomeId);
+                intent.PutExtra("callId", mESVideoInfo.callId);
+                intent.PutExtra("Type", 1);
+
+                //=========涔愭==========
+                intent.PutExtra("AccessToken", mESVideoInfo.Lc_AccessToken);
+                intent.PutExtra("DeviceId", mESVideoInfo.Lc_DeviceId);
+                intent.PutExtra("Location", OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�);
+                intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken);
+                intent.PutExtra("Psk", mESVideoInfo.Lc_Psk);
+
+                Shared.Application.Activity.StartActivity(intent);
+
             }
             else if (interphoneType == InterphoneType.EZVIZ.ToString())
             {
@@ -213,29 +271,45 @@
                 });
                 return;
             }
+            else if (interphoneType == InterphoneType.HDL.ToString())
+            {
+                //HDL Linphone 鐙勮�愬厠
+           
+
+            }
+            else if (interphoneType == InterphoneType.FLVI.ToString())
+            {
+                //寰呭垹鍑忎笉蹇呰鍙傛暟
+                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+                intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
+                intent.PutExtra("uuid", mESVideoInfo.uuid);
+                intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
+                intent.PutExtra("cmtID", mESVideoInfo.cmtID);
+                intent.PutExtra("roomno", mESVideoInfo.roomno);
+                intent.PutExtra("unitno", mESVideoInfo.unitno);
+                intent.PutExtra("HomeID", PirSend.HomeId);
+                intent.PutExtra("callId", mESVideoInfo.callId);
+                intent.PutExtra("Type", 1);
+
+                //=========涔愭==========
+                intent.PutExtra("AccessToken", mESVideoInfo.Lc_AccessToken);
+                intent.PutExtra("DeviceId", mESVideoInfo.Lc_DeviceId);
+                intent.PutExtra("Location", OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�);
+                intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken);
+                intent.PutExtra("Psk", mESVideoInfo.Lc_Psk);
+
+
+                Shared.Application.Activity.StartActivity(intent);
+            }
             else
             {
-                intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity));
+                HDLUtils.WriteLine("鏈敮鎸佺殑鍙瀵硅绫诲瀷");
+
             }
 
-            intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID);
-            intent.PutExtra("uuid", mESVideoInfo.uuid);
-            intent.PutExtra("DeviceName", mESVideoInfo.DeviceName);
-            intent.PutExtra("cmtID", mESVideoInfo.cmtID);
-            intent.PutExtra("roomno", mESVideoInfo.roomno);
-            intent.PutExtra("unitno", mESVideoInfo.unitno);
-            intent.PutExtra("HomeID", PirSend.HomeId);
-            intent.PutExtra("callId", mESVideoInfo.callId);
-            intent.PutExtra("Type", 1);
+         
 
-            //=========涔愭==========
-            intent.PutExtra("AccessToken", mESVideoInfo.Lc_AccessToken);
-            intent.PutExtra("DeviceId", mESVideoInfo.Lc_DeviceId);
-            intent.PutExtra("Location", OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1);//濡傛灉鍩熷悕鍖呭惈china锛屽垯鏄浗鍐呰处鍙�);
-            intent.PutExtra("PlayToken", mESVideoInfo.Lc_PlayToken);
-            intent.PutExtra("Psk", mESVideoInfo.Lc_Psk);
-
-            Shared.Application.Activity.StartActivity(intent);
+         
 
             #endregion
 #endif
@@ -743,8 +817,11 @@
         /// 璁惧搴忓垪鍙�
         /// </summary>
         public string DeviceSerial = string.Empty;
-
-
+        //========================HDL SIP==========================
+        /// <summary>
+        /// 璁惧sip璐﹀彿 interphoneType鏄疕DL鏃舵墠浼氭湁鍊�
+        /// </summary>
+        public string deviceSipAccount;
     }
 
 
@@ -784,6 +861,10 @@
         /// 钀ょ煶鐚溂鍛煎彨
         /// </summary>
         EZVIZ,
+        /// <summary>
+        /// 鐙勮�愬厠 HDL Linphone
+        /// </summary>
+        HDL,
 
 
     }

--
Gitblit v1.8.0