# SIPTransaction Class Reference

`#include <sippdu.h>`

Inheritance diagram for SIPTransaction:

[legend]
Collaboration diagram for SIPTransaction:
[legend]

## Public Member Functions

| ~SIPTransaction ()
virtual SIPTransaction * | CreateDuplicate () const =0
bool | 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)
SIPEndPoint & | GetEndPoint () const
SIPConnection * | GetConnection () const
PString | GetInterface () const

## Static Public Member Functions

static PString | GenerateCallID ()

## Protected Types

typedef SIPPoolTimer< SIPTransaction > | PoolTimer

## Protected Member Functions

| SIPTransaction (Methods method, SIPTransactionOwner *owner, OpalTransport *transport, bool deleteOwner=false)
bool | ResendCANCEL ()
void | SetParameters (const SIPParameters &params)
void | OnRetry ()
void | OnTimeout ()
| P_DECLARE_TRACED_ENUM (States, NotStarted, Trying, Proceeding, Cancelling, Completed, Terminated_Success, Terminated_Timeout, Terminated_RetriesExceeded, Terminated_TransportError, Terminated_Cancelled, Terminated_Aborted)
virtual void | SetTerminated (States newState)

## Protected Attributes

SIPTransactionOwner * | m_owner
bool | m_deleteOwner
PTimeInterval | m_retryTimeoutMin
PTimeInterval | m_retryTimeoutMax
States | m_state
unsigned | m_retry
PoolTimer | m_retryTimer
PoolTimer | m_completionTimer
PSyncPoint | m_completed
bool | m_pduSizeOK
PString | m_localInterface

## Friends

class | SIPConnection

## 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 Typedef Documentation

typedef SIPPoolTimer<SIPTransaction> SIPTransaction::PoolTimer `[protected]`

## Constructor & Destructor Documentation

SIPTransaction::SIPTransaction | ( | Methods | method,
|  | SIPTransactionOwner * | owner,
|  | OpalTransport * | transport,
|  | bool | deleteOwner = `false` |
| ) |  |  | `[protected]`

SIPTransaction::~SIPTransaction | ( |  | ) |

## Member Function Documentation

void SIPTransaction::Abort | ( |  | ) |

PBoolean SIPTransaction::Cancel | ( |  | ) |

virtual SIPTransaction* SIPTransaction::CreateDuplicate | ( |  | ) | const`[pure virtual]`

Implemented in SIPResponse, SIPInvite, SIPBye, SIPRegister, SIPSubscribe, SIPNotify, SIPPublish, SIPRefer, SIPReferNotify, SIPMessage, SIPOptions, SIPInfo, SIPPing, and SIPPrack.

static PString SIPTransaction::GenerateCallID | ( |  | ) | `[static]`

SIPConnection* SIPTransaction::GetConnection | ( |  | ) | const

SIPEndPoint& SIPTransaction::GetEndPoint | ( |  | ) | const`[inline]`

PString SIPTransaction::GetInterface | ( |  | ) | const`[inline]`

bool SIPTransaction::IsCanceled | ( |  | ) | const`[inline]`

bool SIPTransaction::IsCompleted | ( |  | ) | const`[inline]`

bool SIPTransaction::IsFailed | ( |  | ) | const`[inline]`

bool SIPTransaction::IsInProgress | ( |  | ) | const`[inline]`

bool SIPTransaction::IsProceeding | ( |  | ) | const`[inline]`

bool SIPTransaction::IsTerminated | ( |  | ) | const`[inline, virtual]`

Reimplemented from SIPTransactionBase.

bool SIPTransaction::IsTrying | ( |  | ) | const`[inline]`

virtual PBoolean SIPTransaction::OnCompleted | ( | SIP_PDU & | response | ) | `[virtual]`

virtual PBoolean SIPTransaction::OnReceivedResponse | ( | SIP_PDU & | response | ) | `[virtual]`

Reimplemented in SIPInvite.

void SIPTransaction::OnRetry | ( |  | ) | `[protected]`

void SIPTransaction::OnTimeout | ( |  | ) | `[protected]`

SIPTransaction::P_DECLARE_TRACED_ENUM | ( | States | ,
|  | NotStarted | ,
|  | Trying | ,
|  | Proceeding | ,
|  | Cancelling | ,
|  | Completed | ,
|  | Terminated_Success | ,
|  | Terminated_Timeout | ,
|  | Terminated_RetriesExceeded | ,
|  | Terminated_TransportError | ,
|  | Terminated_Cancelled | ,
|  | Terminated_Aborted |  |
| ) |  |  | `[protected]`

bool SIPTransaction::ResendCANCEL | ( |  | ) | `[protected]`

void SIPTransaction::SetParameters | ( | const SIPParameters & | params | ) | `[protected]`

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

bool SIPTransaction::Start | ( |  | ) |

void SIPTransaction::WaitForCompletion | ( |  | ) |

## Friends And Related Function Documentation

friend class SIPConnection `[friend]`

## Field Documentation

PSyncPoint SIPTransaction::m_completed `[protected]`

PoolTimer SIPTransaction::m_completionTimer `[protected]`

bool SIPTransaction::m_deleteOwner `[protected]`

PString SIPTransaction::m_localInterface `[protected]`

SIPTransactionOwner* SIPTransaction::m_owner `[protected]`

bool SIPTransaction::m_pduSizeOK `[protected]`

unsigned SIPTransaction::m_retry `[protected]`

PTimeInterval SIPTransaction::m_retryTimeoutMax `[protected]`

PTimeInterval SIPTransaction::m_retryTimeoutMin `[protected]`

PoolTimer SIPTransaction::m_retryTimer `[protected]`

States SIPTransaction::m_state `[protected]`

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

- sippdu.h