From f46be160caed45c67e8980173d29ed48d525a4d3 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 28 三月 2023 14:49:52 +0800
Subject: [PATCH] 2023年03月28日14:49:50

---
 HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs |  159 ++++++++++++++++++++++++++--------------------------
 1 files changed, 80 insertions(+), 79 deletions(-)

diff --git a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
index d7f4105..8466190 100644
--- a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -15,7 +15,7 @@
 #else
 using Foundation;
 using UIKit;
-using Shared.IOS.HDLLinphoneSDK;
+//using Shared.IOS.HDLLinphoneSDK;
 #endif
 
 namespace Shared
@@ -92,13 +92,13 @@
 
 #if __IOS__
 
-            Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().InitalLinPhone();
-            //璁剧疆鏀跺埌鏉ョ數鍚庛�佹槸鍚﹂渶鑷姩璺宠浆鍛煎彨椤甸潰鏂规
-            Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().IsAutoJumpCallView = IsAutoJumpCallView;
-            //璁剧疆Listener鐩戝惉
-            mOnHDLLinphoneCallDelegate = new OnHDLLinphoneCallDelegate(this);
-            Console.WriteLine(UserInfo.Current.ID);
-            Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().HdlLinphoneCallDelegate = mOnHDLLinphoneCallDelegate;
+            //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().InitalLinPhone();
+            ////璁剧疆鏀跺埌鏉ョ數鍚庛�佹槸鍚﹂渶鑷姩璺宠浆鍛煎彨椤甸潰鏂规
+            //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().IsAutoJumpCallView = IsAutoJumpCallView;
+            ////璁剧疆Listener鐩戝惉
+            //mOnHDLLinphoneCallDelegate = new OnHDLLinphoneCallDelegate(this);
+            //Console.WriteLine(UserInfo.Current.ID);
+            //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().HdlLinphoneCallDelegate = mOnHDLLinphoneCallDelegate;
 #else
             HDLLinphoneKit.Instance.InitLinphone(Application.Activity);
             //璁剧疆鏀跺埌鏉ョ數鍚庛�佹槸鍚﹂渶鑷姩璺宠浆鍛煎彨椤甸潰鏂规
@@ -127,7 +127,7 @@
 #if __IOS__
             //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login("1003", "123456", "192.168.31.194:5060");
             //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login("6666", "85521566", "116.62.26.215:5060");
-            Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm);
+            //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm);
 #else
             if (mInterphoneType == InterphoneType.FREEVIEW.ToString())
             {
@@ -163,7 +163,7 @@
             this.mHDLCallVideoInfo = null;
 #if __IOS__
 
-            HDLLinPhoneSDK.Instance().LogoutAllLinphoneUser();
+            //HDLLinPhoneSDK.Instance().LogoutAllLinphoneUser();
 #else
             HDLLinphoneKit.Instance.Logout();
 #endif
@@ -176,7 +176,7 @@
         {
 #if __IOS__
 
-            HDLLinPhoneSDK.Instance().ClearAllConfigs();
+            //HDLLinPhoneSDK.Instance().ClearAllConfigs();
 #else
             HDLLinphoneKit.Instance.ClearProxyConfig();
 #endif
@@ -427,7 +427,7 @@
 
 #if __IOS__
 
-            HDLLinPhoneSDK.Instance().CallWithUserName(mHDLCallVideoInfo.DeviceSipAccount, mHDLCallVideoInfo.DeviceName);
+            //HDLLinPhoneSDK.Instance().CallWithUserName(mHDLCallVideoInfo.DeviceSipAccount, mHDLCallVideoInfo.DeviceName);
 
 #else
             //1.鍏堝懠鍙澶�
@@ -495,7 +495,7 @@
             {
 #if __IOS__
                 //鑷爺鍙瀵硅
-                HDLLinPhoneSDK.Instance().GotoHDLSRLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName,mHDLCallVideoInfo.DeviceSipAccount);
+                //HDLLinPhoneSDK.Instance().GotoHDLSRLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName,mHDLCallVideoInfo.DeviceSipAccount);
 #else
                 var intent = new Intent(Shared.Application.Activity, typeof(Com.Hdl.Hdllinphonesdk.Activity.HDLLinphoneReverseCallActivity));  
                 if (mHDLCallVideoInfo != null)
@@ -535,7 +535,8 @@
         /// <returns></returns>
         bool IsIncomingReceivedCallState() {
 #if __IOS__
-             return HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState;
+            //return HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState;
+            return true;
 #else
             return HDLLinphoneKit.Instance.IsIncomingReceivedCallState;
 #endif
@@ -548,7 +549,7 @@
 
 #if __IOS__
 
-            HDLLinPhoneSDK.Instance().GotoHDLLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName);
+            //HDLLinPhoneSDK.Instance().GotoHDLLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName);
 
 #else
             var intent = new Intent(Shared.Application.Activity, typeof(Com.Hdl.Hdllinphonesdk.Activity.HDLLinphoneIntercomActivity));
@@ -754,81 +755,81 @@
 #if __IOS__
 
 #region OnHDLLinphoneCallDelegate
-        /// <summary>
-        /// 
-        /// </summary>
-        OnHDLLinphoneCallDelegate mOnHDLLinphoneCallDelegate;
+        ///// <summary>
+        ///// 
+        ///// </summary>
+        //OnHDLLinphoneCallDelegate mOnHDLLinphoneCallDelegate;
      
-        /// <summary>
-        /// 
-        /// </summary>
-        public class OnHDLLinphoneCallDelegate : HDLLinphoneCallDelegate
-        { 
-            [Weak] HDLLinphone hdlLinphone;
+        ///// <summary>
+        ///// 
+        ///// </summary>
+        //public class OnHDLLinphoneCallDelegate : HDLLinphoneCallDelegate
+        //{ 
+        //    [Weak] HDLLinphone hdlLinphone;
 
-            public OnHDLLinphoneCallDelegate(HDLLinphone mHDLLinphone)
-            {
-                this.hdlLinphone = mHDLLinphone;
-            }
+        //    public OnHDLLinphoneCallDelegate(HDLLinphone mHDLLinphone)
+        //    {
+        //        this.hdlLinphone = mHDLLinphone;
+        //    }
 
-            /// <summary>
-            /// 鎺ュ惉
-            /// </summary>
-            public override void OnAnswerAction()
-            {
-                hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL);
-            }
+        //    /// <summary>
+        //    /// 鎺ュ惉
+        //    /// </summary>
+        //    public override void OnAnswerAction()
+        //    {
+        //        hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL);
+        //    }
 
-            /// <summary>
-            /// 鎸傛柇
-            /// </summary>
-            /// <param name="callDuration"></param>
-            public override void OnHangUpAction(int callDuration)
-            {
-                hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL, callDuration);
-            }
+        //    /// <summary>
+        //    /// 鎸傛柇
+        //    /// </summary>
+        //    /// <param name="callDuration"></param>
+        //    public override void OnHangUpAction(int callDuration)
+        //    {
+        //        hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL, callDuration);
+        //    }
 
-            /// <summary>
-            /// 鎷掓帴
-            /// </summary>
-            public override void OnRejectCallAction()
-            {
-                hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL);
-            }
+        //    /// <summary>
+        //    /// 鎷掓帴
+        //    /// </summary>
+        //    public override void OnRejectCallAction()
+        //    {
+        //        hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL);
+        //    }
 
-            /// <summary>
-            /// 鎴浘鎴愬姛
-            /// </summary>
-            /// <param name="image"></param>
-            //public override void OnScreenshotSuccessfulAction(UIImage image)
-            //{
-                ////NSData imageData = UIImagePNGRepresentation(image); UIImage
-                //NSData imageData = image.AsPNG();
-                //byte[] dataBytes = new byte[imageData.Length];
-                //System.Runtime.InteropServices.Marshal.Copy(imageData.Bytes, dataBytes, 0, Convert.ToInt32(imageData.Length));
-                ////image.g
-                ////hdlLinphone.ScreenshotSuccessfulAction(dataBytes);
-            //}
+        //    /// <summary>
+        //    /// 鎴浘鎴愬姛
+        //    /// </summary>
+        //    /// <param name="image"></param>
+        //    //public override void OnScreenshotSuccessfulAction(UIImage image)
+        //    //{
+        //        ////NSData imageData = UIImagePNGRepresentation(image); UIImage
+        //        //NSData imageData = image.AsPNG();
+        //        //byte[] dataBytes = new byte[imageData.Length];
+        //        //System.Runtime.InteropServices.Marshal.Copy(imageData.Bytes, dataBytes, 0, Convert.ToInt32(imageData.Length));
+        //        ////image.g
+        //        ////hdlLinphone.ScreenshotSuccessfulAction(dataBytes);
+        //    //}
 
-            /// <summary>
-            /// 寮�閿佹垚鍔�
-            /// </summary>
-            public override void OnUnlockAction()
-            {
-                hdlLinphone.HDLUnlockAction();
-            }
+        //    /// <summary>
+        //    /// 寮�閿佹垚鍔�
+        //    /// </summary>
+        //    public override void OnUnlockAction()
+        //    {
+        //        hdlLinphone.HDLUnlockAction();
+        //    }
 
-            /// <summary>
-            /// 鏉ョ數涓�...
-            /// </summary>
-            public override void OnIncomingCall(string userName)
-            {
-                Utlis.WriteLine("OnIncomingCall :" + userName);
-            }
+        //    /// <summary>
+        //    /// 鏉ョ數涓�...
+        //    /// </summary>
+        //    public override void OnIncomingCall(string userName)
+        //    {
+        //        Utlis.WriteLine("OnIncomingCall :" + userName);
+        //    }
             
 
 
-        }
+        //}
 
 #endregion
 #endif

--
Gitblit v1.8.0