sipXcallLib home page


Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CpCall Class Referenceabstract

#include <CpCall.h>

Inheritance diagram for CpCall:
Inheritance graph
[legend]
Collaboration diagram for CpCall:
Collaboration graph
[legend]

Public Types

enum  eventType { CONNECTION_STATE = 0, TERMINAL_CONNECTION_STATE, CALL_STATE }
 
enum  metaEventState { METAEVENT_START = 0, METAEVENT_INPROGRESS, METAEVENT_END }
 
enum  callTypes {
  CP_NORMAL_CALL, CP_TRANSFER_CONTROLLER_ORIGINAL_CALL, CP_TRANSFER_CONTROLLER_TARGET_CALL, CP_TRANSFEREE_ORIGINAL_CALL,
  CP_TRANSFEREE_TARGET_CALL, CP_TRANSFER_TARGET_TARGET_CALL
}
 
enum  handleWillingness { CP_WILL_NOT_HANDLE = 0, CP_MAY_HANDLE, CP_DEFINITELY_WILL_HANDLE }
 

Public Member Functions

 CpCall (CpCallManager *manager=NULL, CpMediaInterface *callMediaInterface=NULL, int callIndex=-1, const char *callId=NULL, int holdType=CallManager::NEAR_END_HOLD)
 
virtual ~CpCall ()
 
void setDropState (UtlBoolean state)
 
void postMetaEvent (int state, int remoteIsCallee=-1)
 
void postTaoListenerMessage (int responseCode, UtlString responseText, int eventId, int type, int cause=PtEvent::CAUSE_NORMAL, int remoteIsCallee=1, UtlString remoteAddress="", int isRemote=0, UtlString targetCallId=OsUtil::NULL_OS_STRING)
 
void setCallState (int responseCode, UtlString responseText, int state, int cause=PtEvent::CAUSE_NORMAL)
 
virtual void inFocus (int talking=1)
 
virtual void outOfFocus ()
 
virtual void sendFlowgraphMessage (OsMsg &flowgraphMessage)
 
virtual void localHold ()
 
virtual void hangUp (UtlString callId, int metaEventId)
 
virtual void getLocalAddress (char *address, int len)
 
virtual void getLocalTerminalId (char *terminal, int len)
 
virtual void getCallId (UtlString &callId)
 
virtual void setCallId (const char *callId)
 
void setLocalConnectionState (int newState)
 
int getLocalConnectionState ()
 
int getCallIndex ()
 
int getCallState ()
 
virtual void printCall ()
 
void enableDtmf ()
 
virtual void startMetaEvent (int metaEventId, int metaEventType, int numCalls, const char *metaEventCallIds[], int remoteIsCallee=-1)
 
virtual void setMetaEvent (int metaEventId, int metaEventType, int numCalls, const char *metaEventCallIds[])
 
void getMetaEvent (int &metaEventId, int &metaEventType, int &numCalls, const UtlString *metaEventCallIds[]) const
 
virtual void stopMetaEvent (int remoteIsCallee=-1)
 
void setCallType (int callType)
 
int getCallType () const
 
void setTargetCallId (const char *targetCallId)
 
void getTargetCallId (UtlString &targetCallId) const
 
void setOriginalCallId (const char *targetCallId)
 
void getOriginalCallId (UtlString &targetCallId) const
 
int getLocalConnectionState (int state)
 
virtual UtlBoolean hasCallId (const char *callId)=0
 
virtual enum handleWillingness willHandleMessage (const OsMsg &eventMessage)=0
 
virtual UtlBoolean isQueued ()
 
virtual UtlBoolean isCallIdSet ()
 
virtual UtlBoolean isLocalHeld ()
 
virtual UtlBoolean canDisconnectConnection (Connection *pConnection)=0
 
virtual UtlBoolean isInFocus () const
 

Static Public Member Functions

static int getCallTrackingListCount ()
 
static void getStateString (int state, UtlString *stateLabel)
 

Protected Member Functions

virtual UtlBoolean handleMessage (OsMsg &eventMessage)
 
virtual UtlBoolean handleCallMessage (OsMsg &eventMessage)=0
 
virtual UtlBoolean handleMiNotificationMessage (MiNotification &notification)=0
 
virtual void onHook ()=0
 
virtual UtlBoolean getConnectionState (const char *remoteAddress, int &state)=0
 
virtual UtlBoolean getTermConnectionState (const char *address, const char *terminal, int &state)=0
 
void addHistoryEvent (const char *messageLogString)
 
void addHistoryEvent (const int msgSubType, const CpMultiStringMessage *multiStringMessage)
 

Protected Attributes

CpCallManagermpManager
 
UtlString mCallId
 
volatile UtlBoolean mCallInFocus
 
UtlBoolean mRemoteDtmf
 
UtlBoolean mDtmfEnabled
 
OsRWMutex mCallIdMutex
 
CpMediaInterface * mpMediaInterface
 
int mCallIndex
 
int mCallState
 
int mHoldType
 
int mLocalConnectionState
 
int mLocalTermConnectionState
 
UtlBoolean mLocalHeld
 
OsMsgDispatcher mMediaMsgDispatcher
 
UtlBoolean mDropping
 
int mMetaEventId
 
int mMetaEventType
 
int mNumMetaEventCalls
 
UtlString * mpMetaEventCallIds
 
int mMessageEventCount
 
UtlString mCallHistory [CP_CALL_HISTORY_LENGTH]
 

Private Member Functions

CpCalloperator= (const CpCall &rhs)
 
 CpCall (const CpCall &rCpCall)
 
int tcStateFromEventId (int eventId)
 

Static Private Member Functions

static OsStatus addToCallTrackingList (UtlString &rCallTaskName)
 
static OsStatus removeFromCallTrackingList (UtlString &rCallTaskName)
 

Private Attributes

int mCallType
 
UtlString mOriginalCallId
 
UtlString mTargetCallId
 

Static Private Attributes

static OsLockingList * spCallTrackingList = NULL
 

Member Enumeration Documentation

enum callTypes
Enumerator
CP_NORMAL_CALL 
CP_TRANSFER_CONTROLLER_ORIGINAL_CALL 
CP_TRANSFER_CONTROLLER_TARGET_CALL 
CP_TRANSFEREE_ORIGINAL_CALL 
CP_TRANSFEREE_TARGET_CALL 
CP_TRANSFER_TARGET_TARGET_CALL 
enum eventType
Enumerator
CONNECTION_STATE 
TERMINAL_CONNECTION_STATE 
CALL_STATE 
Enumerator
CP_WILL_NOT_HANDLE 
CP_MAY_HANDLE 
CP_DEFINITELY_WILL_HANDLE 
Enumerator
METAEVENT_START 
METAEVENT_INPROGRESS 
METAEVENT_END 

Constructor & Destructor Documentation

CpCall ( CpCallManager manager = NULL,
CpMediaInterface *  callMediaInterface = NULL,
int  callIndex = -1,
const char *  callId = NULL,
int  holdType = CallManager::NEAR_END_HOLD 
)
~CpCall ( )
virtual
CpCall ( const CpCall rCpCall)
private

Member Function Documentation

void addHistoryEvent ( const char *  messageLogString)
protected
void addHistoryEvent ( const int  msgSubType,
const CpMultiStringMessage multiStringMessage 
)
protected
OsStatus addToCallTrackingList ( UtlString &  rCallTaskName)
staticprivate
virtual UtlBoolean canDisconnectConnection ( Connection pConnection)
pure virtual

Implemented in CpPeerCall.

void enableDtmf ( )
void getCallId ( UtlString &  callId)
virtual
int getCallIndex ( )
int getCallState ( )
int getCallTrackingListCount ( )
static
int getCallType ( ) const
virtual UtlBoolean getConnectionState ( const char *  remoteAddress,
int &  state 
)
protectedpure virtual

Implemented in CpPeerCall.

void getLocalAddress ( char *  address,
int  len 
)
virtual

Reimplemented in CpPeerCall.

int getLocalConnectionState ( )
inline
int getLocalConnectionState ( int  state)
void getLocalTerminalId ( char *  terminal,
int  len 
)
virtual

Reimplemented in CpPeerCall.

void getMetaEvent ( int &  metaEventId,
int &  metaEventType,
int &  numCalls,
const UtlString *  metaEventCallIds[] 
) const
void getOriginalCallId ( UtlString &  targetCallId) const
void getStateString ( int  state,
UtlString *  stateLabel 
)
static
void getTargetCallId ( UtlString &  targetCallId) const
virtual UtlBoolean getTermConnectionState ( const char *  address,
const char *  terminal,
int &  state 
)
protectedpure virtual

Implemented in CpPeerCall.

virtual UtlBoolean handleCallMessage ( OsMsg &  eventMessage)
protectedpure virtual

Implemented in CpPeerCall.

UtlBoolean handleMessage ( OsMsg &  eventMessage)
protectedvirtual
virtual UtlBoolean handleMiNotificationMessage ( MiNotification &  notification)
protectedpure virtual

Implemented in CpPeerCall.

void hangUp ( UtlString  callId,
int  metaEventId 
)
virtual
virtual UtlBoolean hasCallId ( const char *  callId)
pure virtual

Implemented in CpPeerCall.

void inFocus ( int  talking = 1)
virtual

Reimplemented in CpPeerCall.

UtlBoolean isCallIdSet ( )
virtual
virtual UtlBoolean isInFocus ( ) const
inlinevirtual
UtlBoolean isLocalHeld ( )
virtual
UtlBoolean isQueued ( )
virtual

Reimplemented in CpPeerCall.

void localHold ( )
virtual
virtual void onHook ( )
protectedpure virtual

Implemented in CpPeerCall.

CpCall& operator= ( const CpCall rhs)
private
void outOfFocus ( )
virtual

Reimplemented in CpPeerCall.

void postMetaEvent ( int  state,
int  remoteIsCallee = -1 
)

To be removed...

void postTaoListenerMessage ( int  responseCode,
UtlString  responseText,
int  eventId,
int  type,
int  cause = PtEvent::CAUSE_NORMAL,
int  remoteIsCallee = 1,
UtlString  remoteAddress = "",
int  isRemote = 0,
UtlString  targetCallId = OsUtil::NULL_OS_STRING 
)

To be removed...

void printCall ( )
virtual

Reimplemented in CpPeerCall.

OsStatus removeFromCallTrackingList ( UtlString &  rCallTaskName)
staticprivate
void sendFlowgraphMessage ( OsMsg &  flowgraphMessage)
virtual
void setCallId ( const char *  callId)
virtual
void setCallState ( int  responseCode,
UtlString  responseText,
int  state,
int  cause = PtEvent::CAUSE_NORMAL 
)
void setCallType ( int  callType)
void setDropState ( UtlBoolean  state)
void setLocalConnectionState ( int  newState)
void setMetaEvent ( int  metaEventId,
int  metaEventType,
int  numCalls,
const char *  metaEventCallIds[] 
)
virtual
void setOriginalCallId ( const char *  targetCallId)
void setTargetCallId ( const char *  targetCallId)
void startMetaEvent ( int  metaEventId,
int  metaEventType,
int  numCalls,
const char *  metaEventCallIds[],
int  remoteIsCallee = -1 
)
virtual
void stopMetaEvent ( int  remoteIsCallee = -1)
virtual
int tcStateFromEventId ( int  eventId)
private
virtual enum handleWillingness willHandleMessage ( const OsMsg &  eventMessage)
pure virtual

Implemented in CpPeerCall.

Member Data Documentation

UtlString mCallHistory[CP_CALL_HISTORY_LENGTH]
protected
UtlString mCallId
protected
OsRWMutex mCallIdMutex
protected
int mCallIndex
protected
volatile UtlBoolean mCallInFocus
protected
int mCallState
protected
int mCallType
private
UtlBoolean mDropping
protected
UtlBoolean mDtmfEnabled
protected
int mHoldType
protected
int mLocalConnectionState
protected
UtlBoolean mLocalHeld
protected
int mLocalTermConnectionState
protected
OsMsgDispatcher mMediaMsgDispatcher
protected
int mMessageEventCount
protected
int mMetaEventId
protected
int mMetaEventType
protected
int mNumMetaEventCalls
protected
UtlString mOriginalCallId
private
CpCallManager* mpManager
protected
CpMediaInterface* mpMediaInterface
protected
UtlString* mpMetaEventCallIds
protected
UtlBoolean mRemoteDtmf
protected
UtlString mTargetCallId
private
OsLockingList * spCallTrackingList = NULL
staticprivate