SIPTransaction Class Reference

#include <sippdu.h>

Inheritance diagram for SIPTransaction:

SIP_PDU SIPInvite SIPMessage SIPMWISubscribe SIPOptions SIPRefer SIPReferNotify SIPRegister

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 ()
BOOL Start ()
BOOL IsInProgress () const
BOOL IsFailed () const
BOOL IsFinished ()
BOOL IsCanceled () const
void Wait ()
BOOL SendCANCEL ()
virtual BOOL OnReceivedResponse (SIP_PDU &response)
virtual BOOL OnCompleted (SIP_PDU &response)
OpalTransportGetTransport () const
SIPConnectionGetConnection () const
const OpalTransportAddressGetLocalAddress () const

Protected Types

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

Protected Member Functions

void Construct (const PTimeInterval &minRetryTime=PMaxTimeInterval, const PTimeInterval &maxRetryTime=PMaxTimeInterval)
BOOL ResendCANCEL ()
 PDECLARE_NOTIFIER (PTimer, SIPTransaction, OnRetry)
 PDECLARE_NOTIFIER (PTimer, SIPTransaction, OnTimeout)
virtual void SetTerminated (States newState)

Protected Attributes

SIPEndPointendpoint
OpalTransporttransport
SIPConnectionconnection
States state
unsigned retry
PTimer retryTimer
PTimer completionTimer
PSyncPoint finished
PTimedMutex mutex
PTimeInterval retryTimeoutMin
PTimeInterval retryTimeoutMax
OpalTransportAddress localAddress


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 
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

BOOL SIPTransaction::Start (  ) 

BOOL SIPTransaction::IsInProgress (  )  const [inline]

References Proceeding, state, and Trying.

BOOL SIPTransaction::IsFailed (  )  const [inline]

References state, and Terminated_Success.

BOOL SIPTransaction::IsFinished (  )  [inline]

References finished.

BOOL SIPTransaction::IsCanceled (  )  const [inline]

References state, and Terminated_Cancelled.

void SIPTransaction::Wait (  ) 

BOOL SIPTransaction::SendCANCEL (  ) 

virtual BOOL SIPTransaction::OnReceivedResponse ( SIP_PDU response  )  [virtual]

Reimplemented in SIPInvite.

virtual BOOL SIPTransaction::OnCompleted ( SIP_PDU response  )  [virtual]

OpalTransport& SIPTransaction::GetTransport (  )  const [inline]

SIPConnection* SIPTransaction::GetConnection (  )  const [inline]

const OpalTransportAddress& SIPTransaction::GetLocalAddress (  )  const [inline]

References localAddress.

void SIPTransaction::Construct ( const PTimeInterval &  minRetryTime = PMaxTimeInterval,
const PTimeInterval &  maxRetryTime = PMaxTimeInterval 
) [protected]

BOOL SIPTransaction::ResendCANCEL (  )  [protected]

SIPTransaction::PDECLARE_NOTIFIER ( PTimer  ,
SIPTransaction  ,
OnRetry   
) [protected]

SIPTransaction::PDECLARE_NOTIFIER ( PTimer  ,
SIPTransaction  ,
OnTimeout   
) [protected]

virtual void SIPTransaction::SetTerminated ( States  newState  )  [protected, virtual]


Member Data Documentation

Referenced by IsCanceled(), IsFailed(), and IsInProgress().

unsigned SIPTransaction::retry [protected]

PTimer SIPTransaction::retryTimer [protected]

PTimer SIPTransaction::completionTimer [protected]

PSyncPoint SIPTransaction::finished [protected]

Referenced by IsFinished().

PTimedMutex SIPTransaction::mutex [protected]

PTimeInterval SIPTransaction::retryTimeoutMin [protected]

PTimeInterval SIPTransaction::retryTimeoutMax [protected]

Referenced by GetLocalAddress().


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

Generated on Wed Dec 17 08:09:07 2008 for OPAL by  doxygen 1.5.6