sipXcallLib home page


Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Friends | List of all members
PtConnection Class Reference

#include <PtConnection.h>

Collaboration diagram for PtConnection:
Collaboration graph
[legend]

Public Types

enum  ConnectionState {
  IDLE = 0x50, OFFERED = 0x51, QUEUED = 0x52, ALERTING = 0x53,
  INITIATED = 0x54, DIALING = 0x55, NETWORK_REACHED = 0x56, NETWORK_ALERTING = 0x57,
  ESTABLISHED = 0x58, DISCONNECTED = 0x59, FAILED = 0x5A, UNKNOWN = 0x5B
}
 

Public Member Functions

 PtConnection ()
 
 PtConnection (TaoClientTask *pClient, const char *address, const char *callId)
 
 PtConnection (const PtConnection &rPtConnection)
 
PtConnectionoperator= (const PtConnection &rhs)
 
 PtConnection (const char *address, const char *callId)
 
virtual ~PtConnection ()
 
virtual PtStatus accept (void)
 
virtual PtStatus disconnect (void)
 retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in either the OFFERED or ALERTING states. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus park (char *destinationURL, PtConnection &rNewConnection)
 retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in an appropriate state for this call. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus redirect (char *destinationURL, PtConnection &rNewConnection)
 param: (in) destinationURL - The destination URL where the call should be parked. param: (out) rpNewConnection - Set to point to the PtConnection representing the destination where the call was parked. retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in an appropriate state for this call. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus reject (void)
 param: (in) destinationURL - The destination URL where the call should be redirected. param: (out) rpNewConnection - Set to point to the PtConnection representing the redirect destination. retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in either the OFFERED or ALERTING states. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getAddress (PtAddress &rAddress)
 retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in either the OFFERED or ALERTING states. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getCall (PtCall &rCall)
 param: (out) rpAddress - Pointer to the address object corresponding to this connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getSessionInfo (PtSessionDesc &rSession)
 param: (out) rpCall - Pointer to the call object corresponding to this connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getState (int &rState)
 param: (out) rSession - Set to the current session of the connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getTerminalConnections (PtTerminalConnection termConnections[], int size, int &nItems)
 param: (out) rState - Set to the current state of the connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus numTerminalConnections (int &count)
 param: (out) termConnections - The array of PtTerminalConnection pointers param: (in) size - The number of elements in the termConnections array param: (out) nItems - The number of items assigned retcode: PT_SUCCESS - Success retcode: PT_MORE_DATA - There are more than size terminal connections retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getToField (char *pName, int len)
 param: (out) count - The number of terminal connections associated with this connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available More...
 
virtual PtStatus getFromField (char *pName, int len)
 param: (in) len - length of the string to store the To field More...
 

Protected Member Functions

void initialize ()
 

Protected Attributes

UtlString mAddress
 
UtlString mCallId
 
int mState
 
PtConnectionmpConnection
 
TaoClientTaskmpClient
 
OsTime mTimeOut
 

Static Protected Attributes

static OsBSem semInit
 
static TaoReferencempTransactionCnt = 0
 
static unsigned int mRef = 0
 

Private Attributes

OsProtectEventMgr * mpEventMgr
 

Friends

class PtConnectionEvent
 param: (in) len - length of the string to store the From field More...
 

Member Enumeration Documentation

Enumerator
IDLE 
OFFERED 
QUEUED 
ALERTING 
INITIATED 
DIALING 
NETWORK_REACHED 
NETWORK_ALERTING 
ESTABLISHED 
DISCONNECTED 
FAILED 
UNKNOWN 

Constructor & Destructor Documentation

PtConnection ( TaoClientTask pClient,
const char *  address,
const char *  callId 
)
PtConnection ( const PtConnection rPtConnection)
PtConnection ( const char *  address,
const char *  callId 
)
~PtConnection ( )
virtual

Member Function Documentation

PtStatus accept ( void  )
virtual
PtStatus disconnect ( void  )
virtual

retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in either the OFFERED or ALERTING states. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getAddress ( PtAddress rAddress)
virtual

retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in either the OFFERED or ALERTING states. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getCall ( PtCall rCall)
virtual

param: (out) rpAddress - Pointer to the address object corresponding to this connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getFromField ( char *  pName,
int  len 
)
virtual

param: (in) len - length of the string to store the To field

PtStatus getSessionInfo ( PtSessionDesc rSession)
virtual

param: (out) rpCall - Pointer to the call object corresponding to this connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getState ( int &  rState)
virtual

param: (out) rSession - Set to the current session of the connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getTerminalConnections ( PtTerminalConnection  termConnections[],
int  size,
int &  nItems 
)
virtual

param: (out) rState - Set to the current state of the connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus getToField ( char *  pName,
int  len 
)
virtual

param: (out) count - The number of terminal connections associated with this connection retcode: PT_SUCCESS - Success retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

void initialize ( )
protected
PtStatus numTerminalConnections ( int &  count)
virtual

param: (out) termConnections - The array of PtTerminalConnection pointers param: (in) size - The number of elements in the termConnections array param: (out) nItems - The number of items assigned retcode: PT_SUCCESS - Success retcode: PT_MORE_DATA - There are more than size terminal connections retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtConnection & operator= ( const PtConnection rhs)
PtStatus park ( char *  destinationURL,
PtConnection rNewConnection 
)
virtual

retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in an appropriate state for this call. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus redirect ( char *  destinationURL,
PtConnection rNewConnection 
)
virtual

param: (in) destinationURL - The destination URL where the call should be parked. param: (out) rpNewConnection - Set to point to the PtConnection representing the destination where the call was parked. retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in an appropriate state for this call. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

PtStatus reject ( void  )
virtual

param: (in) destinationURL - The destination URL where the call should be redirected. param: (out) rpNewConnection - Set to point to the PtConnection representing the redirect destination. retcode: PT_SUCCESS - Success retcode: PT_INVALID_STATE - Connection was not in either the OFFERED or ALERTING states. retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available

Friends And Related Function Documentation

friend class PtConnectionEvent
friend

param: (in) len - length of the string to store the From field

Member Data Documentation

UtlString mAddress
protected
UtlString mCallId
protected
TaoClientTask* mpClient
protected
PtConnection* mpConnection
protected
OsProtectEventMgr* mpEventMgr
private
TaoReference * mpTransactionCnt = 0
staticprotected
unsigned int mRef = 0
staticprotected
int mState
protected
OsTime mTimeOut
protected
OsBSem semInit
staticprotected