SIPHandler Class Reference

#include <handlers.h>

Inheritance diagram for SIPHandler:

SIPMessageHandler SIPNotifyHandler SIPPingHandler SIPPublishHandler SIPRegisterHandler SIPSubscribeHandler

Public Types

 Subscribed
 Subscribing
 Unavailable
 Refreshing
 Restoring
 Unsubscribing
 Unsubscribed
 NumStates
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 PString GetCallID ()
virtual void SetBody (const PString &b)
virtual bool IsDuplicateCSeq (unsigned)
virtual SIPTransactionCreateTransaction (OpalTransport &t)=0
virtual SIP_PDU::Methods GetMethod ()=0
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 (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
SIPAuthenticationauthentication
PString m_username
PString m_password
PString m_realm
PSafeList< SIPTransactiontransactions
OpalTransportm_transport
SIPURL m_addressOfRecord
SIPURL m_remoteAddress
PString callID
int expire
int originalExpire
int offlineExpire
PString body
unsigned authenticationAttempts
State m_state
queue< Statem_stateQueue
bool m_receivedResponse
PTimer expireTimer
PTimeInterval retryTimeoutMin
PTimeInterval retryTimeoutMax
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

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


Member Enumeration Documentation

enum SIPHandler::State

Enumerator:
Subscribed 
Subscribing 
Unavailable 
Refreshing 
Restoring 
Unsubscribing 
Unsubscribed 
NumStates 


Constructor & Destructor Documentation

SIPHandler::SIPHandler ( SIPEndPoint ep,
const SIPParameters params 
) [protected]

SIPHandler::~SIPHandler (  ) 


Member Function Documentation

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

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

virtual SIPTransaction* SIPHandler::CreateTransaction ( OpalTransport t  )  [pure virtual]

Implemented in SIPRegisterHandler, SIPSubscribeHandler, SIPNotifyHandler, SIPPublishHandler, SIPMessageHandler, and SIPPingHandler.

virtual const SIPURL& SIPHandler::GetAddressOfRecord (  )  [inline, virtual]

virtual SIPAuthentication* SIPHandler::GetAuthentication (  )  [inline, virtual]

virtual PString SIPHandler::GetCallID (  )  [inline, virtual]

SIPEndPoint& SIPHandler::GetEndPoint (  )  const [inline]

virtual SIPSubscribe::EventPackage SIPHandler::GetEventPackage (  )  const [inline, virtual]

Reimplemented in SIPSubscribeHandler, SIPNotifyHandler, and SIPPublishHandler.

virtual int SIPHandler::GetExpire (  )  [inline, virtual]

virtual SIP_PDU::Methods SIPHandler::GetMethod (  )  [pure virtual]

Implemented in SIPRegisterHandler, SIPSubscribeHandler, SIPNotifyHandler, SIPPublishHandler, SIPMessageHandler, and SIPPingHandler.

const PString& SIPHandler::GetPassword (  )  const [inline]

const OpalProductInfo& SIPHandler::GetProductInfo (  )  const [inline]

const SIPURL& SIPHandler::GetProxy (  )  const [inline]

const PString& SIPHandler::GetRealm (  )  const [inline]

const SIPURL& SIPHandler::GetRemoteAddress (  )  const [inline]

SIPHandler::State SIPHandler::GetState (  )  [inline]

virtual OpalTransport* SIPHandler::GetTransport (  )  [virtual]

const PString& SIPHandler::GetUsername (  )  const [inline]

virtual bool SIPHandler::IsDuplicateCSeq ( unsigned   )  [inline, virtual]

Reimplemented in SIPSubscribeHandler, and SIPNotifyHandler.

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

Reimplemented in SIPRegisterHandler, and SIPMessageHandler.

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

Reimplemented in SIPSubscribeHandler.

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

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

virtual PBoolean SIPHandler::OnReceivedNOTIFY ( SIP_PDU response  )  [virtual]

Reimplemented in SIPSubscribeHandler.

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

Reimplemented in SIPRegisterHandler, SIPSubscribeHandler, and SIPPublishHandler.

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

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

virtual void SIPHandler::OnTransactionFailed ( SIPTransaction transaction  )  [virtual]

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

void SIPHandler::RetryLater ( unsigned  after  )  [protected]

virtual bool SIPHandler::SendNotify ( const PObject *   )  [inline, virtual]

Reimplemented in SIPNotifyHandler.

virtual PBoolean SIPHandler::SendRequest ( SIPHandler::State  state  )  [protected, virtual]

Reimplemented in SIPRegisterHandler, SIPSubscribeHandler, and SIPNotifyHandler.

virtual void SIPHandler::SetBody ( const PString &  b  )  [inline, virtual]

Reimplemented in SIPMessageHandler.

virtual void SIPHandler::SetExpire ( int  e  )  [virtual]

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

virtual bool SIPHandler::ShutDown (  )  [virtual]

virtual bool SIPHandler::WriteSIPHandler ( OpalTransport transport,
bool  forked 
) [protected, virtual]

Reimplemented in SIPSubscribeHandler, and SIPNotifyHandler.

static PBoolean SIPHandler::WriteSIPHandler ( OpalTransport transport,
void *  info 
) [static, protected]


Friends And Related Function Documentation

friend class SIPHandlersList [friend]


Field Documentation

SIPAuthentication* SIPHandler::authentication [protected]

unsigned SIPHandler::authenticationAttempts [protected]

PString SIPHandler::body [protected]

PString SIPHandler::callID [protected]

SIPEndPoint& SIPHandler::endpoint [protected]

int SIPHandler::expire [protected]

PTimer SIPHandler::expireTimer [protected]

SIPURL SIPHandler::m_addressOfRecord [protected]

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

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

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

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

SIPMIMEInfo SIPHandler::m_mime

PString SIPHandler::m_password [protected]

OpalProductInfo SIPHandler::m_productInfo [protected]

SIPURL SIPHandler::m_proxy [protected]

PString SIPHandler::m_realm [protected]

bool SIPHandler::m_receivedResponse [protected]

SIPURL SIPHandler::m_remoteAddress [protected]

State SIPHandler::m_state [protected]

queue<State> SIPHandler::m_stateQueue [protected]

OpalTransport* SIPHandler::m_transport [protected]

PString SIPHandler::m_username [protected]

int SIPHandler::offlineExpire [protected]

int SIPHandler::originalExpire [protected]

PTimeInterval SIPHandler::retryTimeoutMax [protected]

PTimeInterval SIPHandler::retryTimeoutMin [protected]

PSafeList<SIPTransaction> SIPHandler::transactions [protected]


The documentation for this class was generated from the following file:
Generated on Mon Feb 21 20:19:24 2011 for OPAL by  doxygen 1.4.7