OPAL  Version 3.10.10
SIPHandler Class Referenceabstract

#include <handlers.h>

Inheritance diagram for SIPHandler:
SIPMessageHandler SIPNotifyHandler SIPOptionsHandler SIPPingHandler SIPPublishHandler SIPRegisterHandler SIPSubscribeHandler

Public Types

enum  State {
  Subscribed, Subscribing, Unavailable, Refreshing,
  Restoring, Unsubscribing, Unsubscribed, NumStates
}
 

Public Member Functions

 ~SIPHandler ()
 
virtual Comparison Compare (const PObject &other) const
 
virtual bool ShutDown ()
 
void SetState (SIPHandler::State s)
 
SIPHandler::State GetState ()
 
virtual OpalTransportGetTransport ()
 
virtual SIPAuthenticationGetAuthentication ()
 
virtual const SIPURLGetAddressOfRecord ()
 
virtual PBoolean OnReceivedNOTIFY (SIP_PDU &response)
 
virtual void SetExpire (int e)
 
virtual int GetExpire ()
 
virtual const PString & GetCallID () const
 
virtual void SetBody (const PString &)
 
virtual bool IsDuplicateCSeq (unsigned)
 
virtual SIPTransactionCreateTransaction (OpalTransport &t)=0
 
SIP_PDU::Methods GetMethod () const
 
virtual SIPSubscribe::EventPackage GetEventPackage () const
 
virtual void OnReceivedResponse (SIPTransaction &transaction, SIP_PDU &response)
 
virtual void OnReceivedIntervalTooBrief (SIPTransaction &transaction, SIP_PDU &response)
 
virtual void OnReceivedTemporarilyUnavailable (SIPTransaction &transaction, SIP_PDU &response)
 
virtual void OnReceivedAuthenticationRequired (SIPTransaction &transaction, SIP_PDU &response)
 
virtual void OnReceivedOK (SIPTransaction &transaction, SIP_PDU &response)
 
virtual void OnTransactionFailed (SIPTransaction &transaction)
 
virtual void OnFailed (const SIP_PDU &response)
 
virtual void OnFailed (SIP_PDU::StatusCodes)
 
bool ActivateState (SIPHandler::State state)
 
virtual bool SendNotify (const PObject *)
 
SIPEndPointGetEndPoint () const
 
const OpalProductInfoGetProductInfo () const
 
const PString & GetUsername () const
 
const PString & GetPassword () const
 
const PString & GetRealm () const
 
const SIPURLGetRemoteAddress () const
 
const SIPURLGetProxy () const
 

Data Fields

SIPMIMEInfo m_mime
 

Protected Types

typedef std::map< PString, PSafePtr< SIPHandler > > IndexMap
 

Protected Member Functions

 SIPHandler (SIP_PDU::Methods method, SIPEndPoint &ep, const SIPParameters &params)
 
virtual PBoolean SendRequest (SIPHandler::State state)
 
void RetryLater (unsigned after)
 
 PDECLARE_NOTIFIER (PTimer, SIPHandler, OnExpireTimeout)
 
virtual bool WriteSIPHandler (OpalTransport &transport, bool forked)
 

Static Protected Member Functions

static PBoolean WriteSIPHandler (OpalTransport &transport, void *info)
 

Protected Attributes

SIPEndPointendpoint
 
SIPAuthenticationm_authentication
 
unsigned m_authenticateErrors
 
PString m_username
 
PString m_password
 
PString m_realm
 
PSafeList< SIPTransactionm_transactions
 
OpalTransportm_transport
 
SIP_PDU::Methods m_method
 
SIPURL m_addressOfRecord
 
SIPURL m_remoteAddress
 
PString m_callID
 
unsigned m_lastCseq
 
int m_currentExpireTime
 
int m_originalExpireTime
 
int m_offlineExpireTime
 
State m_state
 
queue< Statem_stateQueue
 
bool m_receivedResponse
 
PTimer m_expireTimer
 
SIPURL m_proxy
 
OpalProductInfo m_productInfo
 
std::pair< IndexMap::iterator, bool > m_byCallID
 
std::pair< IndexMap::iterator, bool > m_byAorAndPackage
 
std::pair< IndexMap::iterator, bool > m_byAuthIdAndRealm
 
std::pair< IndexMap::iterator, bool > m_byAorUserAndRealm
 

Friends

class SIPHandlersList
 

Member Typedef Documentation

◆ IndexMap

typedef std::map<PString, PSafePtr<SIPHandler> > SIPHandler::IndexMap
protected

Member Enumeration Documentation

◆ State

Enumerator
Subscribed 
Subscribing 
Unavailable 
Refreshing 
Restoring 
Unsubscribing 
Unsubscribed 
NumStates 

Constructor & Destructor Documentation

◆ SIPHandler()

SIPHandler::SIPHandler ( SIP_PDU::Methods  method,
SIPEndPoint ep,
const SIPParameters params 
)
protected

◆ ~SIPHandler()

SIPHandler::~SIPHandler ( )

Member Function Documentation

◆ ActivateState()

bool SIPHandler::ActivateState ( SIPHandler::State  state)

Referenced by GetEventPackage().

◆ Compare()

virtual Comparison SIPHandler::Compare ( const PObject &  other) const
virtual

◆ CreateTransaction()

◆ GetAddressOfRecord()

virtual const SIPURL& SIPHandler::GetAddressOfRecord ( )
inlinevirtual

◆ GetAuthentication()

virtual SIPAuthentication* SIPHandler::GetAuthentication ( )
inlinevirtual

References m_authentication.

◆ GetCallID()

virtual const PString& SIPHandler::GetCallID ( ) const
inlinevirtual

References m_callID.

◆ GetEndPoint()

SIPEndPoint& SIPHandler::GetEndPoint ( ) const
inline

References endpoint.

◆ GetEventPackage()

◆ GetExpire()

virtual int SIPHandler::GetExpire ( )
inlinevirtual

References m_currentExpireTime.

◆ GetMethod()

SIP_PDU::Methods SIPHandler::GetMethod ( ) const
inline

References m_method.

◆ GetPassword()

const PString& SIPHandler::GetPassword ( ) const
inline

References m_password.

◆ GetProductInfo()

const OpalProductInfo& SIPHandler::GetProductInfo ( ) const
inline

References m_productInfo.

◆ GetProxy()

const SIPURL& SIPHandler::GetProxy ( ) const
inline

References m_proxy.

◆ GetRealm()

const PString& SIPHandler::GetRealm ( ) const
inline

References m_realm.

◆ GetRemoteAddress()

const SIPURL& SIPHandler::GetRemoteAddress ( ) const
inline

References m_remoteAddress.

◆ GetState()

SIPHandler::State SIPHandler::GetState ( )
inline

References GetTransport(), and m_state.

◆ GetTransport()

virtual OpalTransport* SIPHandler::GetTransport ( )
virtual

Referenced by GetState().

◆ GetUsername()

const PString& SIPHandler::GetUsername ( ) const
inline

References m_username.

◆ IsDuplicateCSeq()

virtual bool SIPHandler::IsDuplicateCSeq ( unsigned  )
inlinevirtual

Reimplemented in SIPNotifyHandler, and SIPSubscribeHandler.

References CreateTransaction().

◆ OnFailed() [1/2]

virtual void SIPHandler::OnFailed ( const SIP_PDU response)
virtual

Reimplemented in SIPOptionsHandler, and SIPSubscribeHandler.

Referenced by GetEventPackage().

◆ OnFailed() [2/2]

virtual void SIPHandler::OnFailed ( SIP_PDU::StatusCodes  )
virtual

◆ OnReceivedAuthenticationRequired()

virtual void SIPHandler::OnReceivedAuthenticationRequired ( SIPTransaction transaction,
SIP_PDU response 
)
virtual

Referenced by GetEventPackage().

◆ OnReceivedIntervalTooBrief()

virtual void SIPHandler::OnReceivedIntervalTooBrief ( SIPTransaction transaction,
SIP_PDU response 
)
virtual

Referenced by GetEventPackage().

◆ OnReceivedNOTIFY()

virtual PBoolean SIPHandler::OnReceivedNOTIFY ( SIP_PDU response)
virtual

Reimplemented in SIPSubscribeHandler.

Referenced by GetAddressOfRecord().

◆ OnReceivedOK()

virtual void SIPHandler::OnReceivedOK ( SIPTransaction transaction,
SIP_PDU response 
)
virtual

◆ OnReceivedResponse()

virtual void SIPHandler::OnReceivedResponse ( SIPTransaction transaction,
SIP_PDU response 
)
virtual

Referenced by GetEventPackage().

◆ OnReceivedTemporarilyUnavailable()

virtual void SIPHandler::OnReceivedTemporarilyUnavailable ( SIPTransaction transaction,
SIP_PDU response 
)
virtual

Referenced by GetEventPackage().

◆ OnTransactionFailed()

virtual void SIPHandler::OnTransactionFailed ( SIPTransaction transaction)
virtual

Referenced by GetEventPackage().

◆ PDECLARE_NOTIFIER()

SIPHandler::PDECLARE_NOTIFIER ( PTimer  ,
SIPHandler  ,
OnExpireTimeout   
)
protected

◆ RetryLater()

void SIPHandler::RetryLater ( unsigned  after)
protected

◆ SendNotify()

virtual bool SIPHandler::SendNotify ( const PObject *  )
inlinevirtual

Reimplemented in SIPNotifyHandler.

Referenced by SIPNotifyHandler::IsDuplicateCSeq().

◆ SendRequest()

virtual PBoolean SIPHandler::SendRequest ( SIPHandler::State  state)
protectedvirtual

◆ SetBody()

virtual void SIPHandler::SetBody ( const PString &  )
inlinevirtual

Reimplemented in SIPPublishHandler, and SIPNotifyHandler.

◆ SetExpire()

virtual void SIPHandler::SetExpire ( int  e)
virtual

Referenced by GetAddressOfRecord().

◆ SetState()

void SIPHandler::SetState ( SIPHandler::State  s)

◆ ShutDown()

virtual bool SIPHandler::ShutDown ( )
virtual

◆ WriteSIPHandler() [1/2]

static PBoolean SIPHandler::WriteSIPHandler ( OpalTransport transport,
void *  info 
)
staticprotected

◆ WriteSIPHandler() [2/2]

virtual bool SIPHandler::WriteSIPHandler ( OpalTransport transport,
bool  forked 
)
protectedvirtual

Reimplemented in SIPNotifyHandler, and SIPSubscribeHandler.

Friends And Related Function Documentation

◆ SIPHandlersList

friend class SIPHandlersList
friend

Field Documentation

◆ endpoint

SIPEndPoint& SIPHandler::endpoint
protected

Referenced by GetEndPoint().

◆ m_addressOfRecord

SIPURL SIPHandler::m_addressOfRecord
protected

Referenced by GetAddressOfRecord().

◆ m_authenticateErrors

unsigned SIPHandler::m_authenticateErrors
protected

◆ m_authentication

SIPAuthentication* SIPHandler::m_authentication
protected

Referenced by GetAuthentication().

◆ m_byAorAndPackage

std::pair<IndexMap::iterator, bool> SIPHandler::m_byAorAndPackage
protected

◆ m_byAorUserAndRealm

std::pair<IndexMap::iterator, bool> SIPHandler::m_byAorUserAndRealm
protected

◆ m_byAuthIdAndRealm

std::pair<IndexMap::iterator, bool> SIPHandler::m_byAuthIdAndRealm
protected

◆ m_byCallID

std::pair<IndexMap::iterator, bool> SIPHandler::m_byCallID
protected

◆ m_callID

PString SIPHandler::m_callID
protected

Referenced by GetCallID().

◆ m_currentExpireTime

int SIPHandler::m_currentExpireTime
protected

Referenced by GetExpire().

◆ m_expireTimer

PTimer SIPHandler::m_expireTimer
protected

◆ m_lastCseq

unsigned SIPHandler::m_lastCseq
protected

◆ m_method

SIP_PDU::Methods SIPHandler::m_method
protected

Referenced by GetMethod().

◆ m_mime

SIPMIMEInfo SIPHandler::m_mime

◆ m_offlineExpireTime

int SIPHandler::m_offlineExpireTime
protected

◆ m_originalExpireTime

int SIPHandler::m_originalExpireTime
protected

◆ m_password

PString SIPHandler::m_password
protected

Referenced by GetPassword().

◆ m_productInfo

OpalProductInfo SIPHandler::m_productInfo
protected

Referenced by GetProductInfo().

◆ m_proxy

SIPURL SIPHandler::m_proxy
protected

Referenced by GetProxy().

◆ m_realm

PString SIPHandler::m_realm
protected

Referenced by GetRealm().

◆ m_receivedResponse

bool SIPHandler::m_receivedResponse
protected

◆ m_remoteAddress

SIPURL SIPHandler::m_remoteAddress
protected

Referenced by GetRemoteAddress().

◆ m_state

State SIPHandler::m_state
protected

◆ m_stateQueue

queue<State> SIPHandler::m_stateQueue
protected

◆ m_transactions

PSafeList<SIPTransaction> SIPHandler::m_transactions
protected

◆ m_transport

OpalTransport* SIPHandler::m_transport
protected

◆ m_username

PString SIPHandler::m_username
protected

Referenced by GetUsername().


The documentation for this class was generated from the following file: