SIPTransaction Class Reference

#include <sippdu.h>

Inheritance diagram for SIPTransaction:
SIP_PDU SIPInvite SIPMessage SIPNotify SIPOptions SIPPing SIPPublish SIPRefer SIPReferNotify SIPRegister SIPSubscribe

List of all members.

Public Member Functions

 SIPTransaction (SIPEndPoint &endpoint, OpalTransport &transport, const PTimeInterval &minRetryTime=PMaxTimeInterval, const PTimeInterval &maxRetryTime=PMaxTimeInterval)
 SIPTransaction (SIPConnection &connection, OpalTransport &transport, Methods method=NumMethods)
 ~SIPTransaction ()
PBoolean Start ()
bool IsTrying () const
bool IsProceeding () const
bool IsInProgress () const
bool IsFailed () const
bool IsCompleted () const
bool IsCanceled () const
bool IsTerminated () const
void WaitForCompletion ()
PBoolean Cancel ()
void Abort ()
virtual PBoolean OnReceivedResponse (SIP_PDU &response)
virtual PBoolean OnCompleted (SIP_PDU &response)
OpalTransportGetTransport () const
SIPConnectionGetConnection () const
PString GetInterface () const

Static Public Member Functions

static PString GenerateCallID ()

Protected Types

enum  States {
  NotStarted, Trying, Proceeding, Cancelling,
  Completed, Terminated_Success, Terminated_Timeout, Terminated_RetriesExceeded,
  Terminated_TransportError, Terminated_Cancelled, Terminated_Aborted, NumStates
}

Protected Member Functions

void Construct (const PTimeInterval &minRetryTime=PMaxTimeInterval, const PTimeInterval &maxRetryTime=PMaxTimeInterval)
void Construct (Methods method, SIPDialogContext &dialog)
bool SendPDU (SIP_PDU &pdu)
bool ResendCANCEL ()
 PDECLARE_NOTIFIER (PTimer, SIPTransaction, OnRetry)
 PDECLARE_NOTIFIER (PTimer, SIPTransaction, OnTimeout)
virtual void SetTerminated (States newState)

Protected Attributes

SIPEndPointendpoint
OpalTransporttransport
PSafePtr< SIPConnectionconnection
PTimeInterval retryTimeoutMin
PTimeInterval retryTimeoutMax
States state
unsigned retry
PTimer retryTimer
PTimer completionTimer
PSyncPoint completed
PString m_localInterface
OpalTransportAddress m_remoteAddress

Detailed Description

Session Initiation Protocol transaction. A transaction is a stateful independent entity that provides services to a connection (Transaction User). Transactions are contained within connections. A client transaction handles sending a request and receiving its responses. A server transaction handles sending responses to a received request. In either case the SIP_PDU ancestor is the sent or received request.


Member Enumeration Documentation

enum SIPTransaction::States [protected]
Enumerator:
NotStarted 
Trying 
Proceeding 
Cancelling 
Completed 
Terminated_Success 
Terminated_Timeout 
Terminated_RetriesExceeded 
Terminated_TransportError 
Terminated_Cancelled 
Terminated_Aborted 
NumStates 

Constructor & Destructor Documentation

SIPTransaction::SIPTransaction ( SIPEndPoint endpoint,
OpalTransport transport,
const PTimeInterval &  minRetryTime = PMaxTimeInterval,
const PTimeInterval &  maxRetryTime = PMaxTimeInterval 
)
SIPTransaction::SIPTransaction ( SIPConnection connection,
OpalTransport transport,
Methods  method = NumMethods 
)

Construct a transaction for requests in a dialog. The transport is used to determine the local address

SIPTransaction::~SIPTransaction (  ) 

Member Function Documentation

void SIPTransaction::Abort (  ) 
PBoolean SIPTransaction::Cancel (  ) 
void SIPTransaction::Construct ( Methods  method,
SIPDialogContext dialog 
) [protected]
void SIPTransaction::Construct ( const PTimeInterval &  minRetryTime = PMaxTimeInterval,
const PTimeInterval &  maxRetryTime = PMaxTimeInterval 
) [protected]
static PString SIPTransaction::GenerateCallID (  )  [static]
SIPConnection* SIPTransaction::GetConnection (  )  const [inline]
PString SIPTransaction::GetInterface (  )  const [inline]

References m_localInterface.

OpalTransport& SIPTransaction::GetTransport (  )  const [inline]
bool SIPTransaction::IsCanceled (  )  const [inline]
bool SIPTransaction::IsCompleted (  )  const [inline]

References Completed, and state.

bool SIPTransaction::IsFailed (  )  const [inline]

References state, and Terminated_Success.

bool SIPTransaction::IsInProgress (  )  const [inline]

References Proceeding, state, and Trying.

bool SIPTransaction::IsProceeding (  )  const [inline]

References Proceeding, and state.

bool SIPTransaction::IsTerminated (  )  const [inline]

References state, and Terminated_Success.

bool SIPTransaction::IsTrying (  )  const [inline]

References state, and Trying.

virtual PBoolean SIPTransaction::OnCompleted ( SIP_PDU response  )  [virtual]
virtual PBoolean SIPTransaction::OnReceivedResponse ( SIP_PDU response  )  [virtual]

Reimplemented in SIPInvite.

SIPTransaction::PDECLARE_NOTIFIER ( PTimer  ,
SIPTransaction  ,
OnTimeout   
) [protected]
SIPTransaction::PDECLARE_NOTIFIER ( PTimer  ,
SIPTransaction  ,
OnRetry   
) [protected]
bool SIPTransaction::ResendCANCEL (  )  [protected]
bool SIPTransaction::SendPDU ( SIP_PDU pdu  )  [protected]
virtual void SIPTransaction::SetTerminated ( States  newState  )  [protected, virtual]
PBoolean SIPTransaction::Start (  ) 
void SIPTransaction::WaitForCompletion (  ) 

Member Data Documentation

PSyncPoint SIPTransaction::completed [protected]
PTimer SIPTransaction::completionTimer [protected]
PString SIPTransaction::m_localInterface [protected]

Referenced by GetInterface().

unsigned SIPTransaction::retry [protected]
PTimeInterval SIPTransaction::retryTimeoutMax [protected]
PTimeInterval SIPTransaction::retryTimeoutMin [protected]
PTimer SIPTransaction::retryTimer [protected]

The documentation for this class was generated from the following file:
Generated on Tue Jun 15 00:29:41 2010 for OPAL by  doxygen 1.6.3