# SIPHandler Class Reference

`#include <handlers.h>`

Inheritance diagram for SIPHandler:

List of all members.

## Public Types

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

## Public Member Functions

| ~SIPHandler ()
virtual bool | ShutDown ()
void | SetState (SIPHandler::State s)
SIPHandler::State | GetState ()
virtual OpalTransport * | GetTransport ()
virtual SIPAuthentication * | GetAuthentication ()
virtual const SIPURL & | GetTargetAddress ()
virtual const PString | GetRemotePartyAddress ()
virtual PBoolean | OnReceivedNOTIFY (SIP_PDU &response)
virtual void | SetExpire (int e)
virtual int | GetExpire ()
virtual PString | GetCallID ()
virtual void | SetBody (const PString &b)
virtual SIPTransaction * | CreateTransaction (OpalTransport &t)=0
virtual SIP_PDU::Methods | GetMethod ()=0
virtual PCaselessString | GetEventPackage () const
virtual void | OnReceivedAuthenticationRequired (SIPTransaction &transaction, SIP_PDU &response)
virtual void | OnReceivedOK (SIPTransaction &transaction, SIP_PDU &response)
virtual void | OnTransactionFailed (SIPTransaction &transaction)
virtual void | OnFailed (SIP_PDU::StatusCodes)
virtual PBoolean | SendRequest (SIPHandler::State state)
const PStringList & | GetRouteSet () const
const OpalProductInfo & | GetProductInfo () const

## Public Attributes

PString | authenticationUsername
PString | authenticationPassword
PString | authenticationAuthRealm

## Protected Member Functions

| SIPHandler (SIPEndPoint &ep, const PString &to, int expireTime, int offlineExpire=30, const PTimeInterval &retryMin=PMaxTimeInterval, const PTimeInterval &retryMax=PMaxTimeInterval)
void | CollapseFork (SIPTransaction &transaction)
| PDECLARE_NOTIFIER (PTimer, SIPHandler, OnExpireTimeout)
bool | WriteSIPHandler (OpalTransport &transport)

## Static Protected Member Functions

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

## Protected Attributes

SIPEndPoint & | endpoint
SIPAuthentication * | authentication
PSafeList< SIPTransaction > | transactions
OpalTransport * | transport
SIPURL | targetAddress
PString | callID
int | expire
int | originalExpire
int | offlineExpire
PStringList | routeSet
PString | body
unsigned | authenticationAttempts
State | state
PTimer | expireTimer
PTimeInterval | retryTimeoutMin
PTimeInterval | retryTimeoutMax
PString | remotePartyAddress
SIPURL | proxy
OpalProductInfo | m_productInfo

## Member Enumeration Documentation

enum SIPHandler::State

Enumerator:

  Subscribed |
  Subscribing |
  Unavailable |
  Refreshing |
  Restoring |
  Unsubscribing |
  Unsubscribed |

## Constructor & Destructor Documentation

SIPHandler::SIPHandler | ( | SIPEndPoint & | ep,
|  | const PString & | to,
|  | int | expireTime,
|  | int | offlineExpire = `30`,
|  | const PTimeInterval & | retryMin = `PMaxTimeInterval`,
|  | const PTimeInterval & | retryMax = `PMaxTimeInterval` |
| ) |  |  | `[protected]`

SIPHandler::~SIPHandler | ( |  | ) |

## Member Function Documentation

virtual bool SIPHandler::ShutDown | ( |  | ) | `[virtual]`

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

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

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

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

virtual const SIPURL& SIPHandler::GetTargetAddress | ( |  | ) | `[inline, virtual]`

virtual const PString SIPHandler::GetRemotePartyAddress | ( |  | ) | `[virtual]`

virtual PBoolean SIPHandler::OnReceivedNOTIFY | ( | SIP_PDU & | response | ) | `[virtual]`

Reimplemented in SIPSubscribeHandler.

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

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

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

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

Reimplemented in SIPPublishHandler, and SIPMessageHandler.

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

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

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

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

virtual PCaselessString SIPHandler::GetEventPackage | ( |  | ) | const`[inline, virtual]`

Reimplemented in SIPSubscribeHandler.

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

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

Reimplemented in SIPRegisterHandler, SIPSubscribeHandler, and SIPPublishHandler.

virtual void SIPHandler::OnTransactionFailed | ( | SIPTransaction & | transaction | ) | `[virtual]`

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

Reimplemented in SIPRegisterHandler, SIPSubscribeHandler, and SIPMessageHandler.

virtual PBoolean SIPHandler::SendRequest | ( | SIPHandler::State | state | ) | `[virtual]`

Reimplemented in SIPRegisterHandler, and SIPSubscribeHandler.

const PStringList& SIPHandler::GetRouteSet | ( |  | ) | const`[inline]`

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

void SIPHandler::CollapseFork | ( | SIPTransaction & | transaction | ) | `[protected]`

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

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

bool SIPHandler::WriteSIPHandler | ( | OpalTransport & | transport | ) | `[protected]`

## Member Data Documentation

PString SIPHandler::authenticationUsername

PString SIPHandler::authenticationPassword

PString SIPHandler::authenticationAuthRealm

SIPEndPoint& SIPHandler::endpoint `[protected]`

SIPAuthentication* SIPHandler::authentication `[protected]`

PSafeList<SIPTransaction> SIPHandler::transactions `[protected]`

OpalTransport* SIPHandler::transport `[protected]`

SIPURL SIPHandler::targetAddress `[protected]`

PString SIPHandler::callID `[protected]`

int SIPHandler::expire `[protected]`

int SIPHandler::originalExpire `[protected]`

int SIPHandler::offlineExpire `[protected]`

PStringList SIPHandler::routeSet `[protected]`

PString SIPHandler::body `[protected]`

unsigned SIPHandler::authenticationAttempts `[protected]`

State SIPHandler::state `[protected]`

PTimer SIPHandler::expireTimer `[protected]`

PTimeInterval SIPHandler::retryTimeoutMin `[protected]`

PTimeInterval SIPHandler::retryTimeoutMax `[protected]`

PString SIPHandler::remotePartyAddress `[protected]`

SIPURL SIPHandler::proxy `[protected]`

OpalProductInfo SIPHandler::m_productInfo `[protected]`

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

- handlers.h