/// <summary> /// Allows the caller to cancel an outgoing call invitation. /// </summary> /// <param name="invitation">An LocalCallInvitation object.</param> /// <returns></returns> public int CancelLocalInvitation(LocalInvitation invitation) { if (_rtmCallManagerPtr == IntPtr.Zero) { Debug.LogError("_rtmCallManagerPtr is null"); return((int)COMMON_ERR_CODE.ERROR_NULL_PTR); } return(rtm_call_manager_cancelLocalInvitation(_rtmCallManagerPtr, invitation.GetPtr())); }
private static void OnLocalInvitationReceivedByPeerCallback(IntPtr localInvitationPtr) { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnLocalInvitationReceivedByPeer != null) { if (AgoraCallbackObject.GetInstance()._CallbackQueue != null) { AgoraCallbackObject.GetInstance()._CallbackQueue.EnQueue(() => { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnLocalInvitationReceivedByPeer != null) { LocalInvitation _localInvitation = new LocalInvitation(localInvitationPtr); rtmCallEventHandlerDic[id].OnLocalInvitationReceivedByPeer(_localInvitation); } }); } } }
private static void OnLocalInvitationRefusedCallback(IntPtr localInvitationPtr, string response) { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnLocalInvitationRefused != null) { if (AgoraCallbackObject.GetInstance()._CallbackQueue != null) { AgoraCallbackObject.GetInstance()._CallbackQueue.EnQueue(() => { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnLocalInvitationRefused != null) { LocalInvitation _localInvitation = new LocalInvitation(localInvitationPtr); rtmCallEventHandlerDic[id].OnLocalInvitationRefused(_localInvitation, response); } }); } } }
private static void OnLocalInvitationFailureCallback(IntPtr localInvitationPtr, LOCAL_INVITATION_ERR_CODE errorCode) { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnLocalInvitationCanceled != null) { if (AgoraCallbackObject.GetInstance()._CallbackQueue != null) { AgoraCallbackObject.GetInstance()._CallbackQueue.EnQueue(() => { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnLocalInvitationCanceled != null) { LocalInvitation _localInvitation = new LocalInvitation(localInvitationPtr); rtmCallEventHandlerDic[id].OnLocalInvitationCanceled(_localInvitation); } }); } } }
private static void OnLocalInvitationCanceledCallback(int _id, IntPtr localInvitationPtr) { if (rtmCallEventHandlerDic.ContainsKey(_id) && rtmCallEventHandlerDic[_id].OnLocalInvitationCanceled != null) { if (AgoraCallbackObject.GetInstance()._CallbackQueue != null) { AgoraCallbackObject.GetInstance()._CallbackQueue.EnQueue(() => { if (rtmCallEventHandlerDic.ContainsKey(_id) && rtmCallEventHandlerDic[_id].OnLocalInvitationCanceled != null) { LocalInvitation _localInvitation = new LocalInvitation(localInvitationPtr, false); rtmCallEventHandlerDic[_id].OnLocalInvitationCanceled(_localInvitation); } }); } } }