/// <summary> /// Allows the callee to decline an incoming call invitation. /// </summary> /// <param name="invitation">An RemoteCallInvitation object.</param> /// <returns> /// 0: Success. /// <0: Failure. /// </returns> public int RefuseRemoteInvitation(RemoteInvitation invitation) { if (_rtmCallManagerPtr == IntPtr.Zero) { Debug.LogError("_rtmCallManagerPtr is null"); return((int)COMMON_ERR_CODE.ERROR_NULL_PTR); } return(rtm_call_manager_refuseRemoteInvitation(_rtmCallManagerPtr, invitation.GetPtr())); }
private static void OnRemoteInvitationCanceledCallback(IntPtr localInvitationPtr) { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnRemoteInvitationCanceled != null) { if (AgoraCallbackObject.GetInstance()._CallbackQueue != null) { AgoraCallbackObject.GetInstance()._CallbackQueue.EnQueue(() => { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnRemoteInvitationCanceled != null) { RemoteInvitation _localInvitation = new RemoteInvitation(localInvitationPtr); rtmCallEventHandlerDic[id].OnRemoteInvitationCanceled(_localInvitation); } }); } } }
private static void OnRemoteInvitationFailureCallback(IntPtr localInvitationPtr, REMOTE_INVITATION_ERR_CODE errorCode) { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnRemoteInvitationFailure != null) { if (AgoraCallbackObject.GetInstance()._CallbackQueue != null) { AgoraCallbackObject.GetInstance()._CallbackQueue.EnQueue(() => { if (rtmCallEventHandlerDic.ContainsKey(id) && rtmCallEventHandlerDic[id].OnRemoteInvitationFailure != null) { RemoteInvitation _localInvitation = new RemoteInvitation(localInvitationPtr); rtmCallEventHandlerDic[id].OnRemoteInvitationFailure(_localInvitation, errorCode); } }); } } }