| | |
| | | #else |
| | | using Foundation; |
| | | using UIKit; |
| | | //using Shared.IOS.HDLLinphoneSDK; |
| | | using Shared.IOS.HDLLinphoneSDK; |
| | | #endif |
| | | |
| | | namespace Shared |
| | |
| | | { |
| | | [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); |
| | | //} |
| | | /// <param name = "image" ></ param > |
| | | public 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> |
| | | /// 来电中... |
| | |
| | | |
| | | |
| | | |
| | | //} |
| | | } |
| | | |
| | | #endregion |
| | | #endif |