BogheApp.SessionWindow.CanReceiveCall C# (CSharp) Method

CanReceiveCall() public method

public CanReceiveCall ( BogheCore.Sip.MyInviteSession session ) : bool
session BogheCore.Sip.MyInviteSession
return bool
        public bool CanReceiveCall(MyInviteSession session)
        {
            if (String.Equals(this.remotePartyUri, session.RemotePartyUri))
            {
                if (session is MyMsrpSession)
                {
                    if (session.MediaType == MediaType.Chat)
                    {
                        return (this.ChatSession == null);
                    }
                    else
                    {
                        // Can always receive file transfer session as long as it's from the same remote uri
                        return true;
                    }
                }
                else if (session is MyAVSession)
                {
                    return (this.AVSession == null);
                }
            }
            return false;
        }