/// <summary> /// Default constructor. /// </summary> /// <param name="proxy">Owner proxy.</param> /// <exception cref="ArgumentNullException">Is raised when <b>proxy</b> is null reference.</exception> internal SIP_Registrar(SIP_Proxy proxy) { if (proxy == null) { throw new ArgumentNullException("proxy"); } m_pProxy = proxy; m_pStack = m_pProxy.Stack; m_pRegistrations = new SIP_RegistrationCollection(); m_pTimer = new Timer(15000); m_pTimer.Elapsed += new ElapsedEventHandler(m_pTimer_Elapsed); m_pTimer.Enabled = true; }
/// <summary> /// Default constructor. /// </summary> /// <param name="proxy">Owner SIP proxy server.</param> /// <param name="request">The request what is represented by this context.</param> /// <param name="flow">Data flow what received request.</param> /// <exception cref="ArgumentNullException">Is raised when <b>proxy</b>, <b>request</b> or <b>flow</b> is null reference.</exception> internal SIP_RequestContext(SIP_Proxy proxy, SIP_Request request, SIP_Flow flow) { if (proxy == null) { throw new ArgumentNullException("proxy"); } if (request == null) { throw new ArgumentNullException("request"); } if (flow == null) { throw new ArgumentNullException("flow"); } m_pProxy = proxy; m_pRequest = request; m_pFlow = flow; m_pTargets = new List <SIP_ProxyTarget>(); }
/// <summary> /// Cleans up any resources being used. /// </summary> internal void Dispose() { if (m_IsDisposed) { return; } m_IsDisposed = true; this.CanRegister = null; this.AorRegistered = null; this.AorUnregistered = null; this.AorUpdated = null; m_pProxy = null; m_pStack = null; m_pRegistrations = null; if (m_pTimer != null) { m_pTimer.Dispose(); m_pTimer = null; } }
/// <summary> /// Default constructor. /// </summary> /// <param name="owner">Onwer SIP proxy.</param> internal SIP_B2BUA(SIP_Proxy owner) { m_pProxy = owner; m_pCalls = new List <SIP_B2BUA_Call>(); }