Main Page | Class Hierarchy | Class List | File List | Class Members

MyManager Class Reference

#include <mymanager.h>

Collaboration diagram for MyManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MyManager (LaunchNewId &lid, PString &controllerId, PString &ourId, PString &ourPassword)
 ~MyManager ()
void EndEverything ()
BOOL Initialise (PArgList &args)
void Main (PArgList &args)
virtual BOOL OnIncomingConnection (OpalConnection &connection)
virtual void OnEstablishedCall (OpalCall &call)
virtual void OnClearedCall (OpalCall &call)
virtual BOOL OnOpenMediaStream (OpalConnection &connection, OpalMediaStream &stream)
virtual void OnUserInputString (OpalConnection &connection, const PString &value)
virtual void OnAlerting (OpalConnection &connection)
OpalConnection::AnswerCallResponse OnAnswerCall (OpalConnection &connection, const PString &caller)
void StartCall (const PString &ostr, const PString &remoteController, const PString &callIdToUse)
PString GetOurPassword ()
PString GetOurId ()
PString GetControllerId ()
virtual BOOL SetUpCall (const PString &partyA, const PString &partyB, const PString &remoteController, const PString &preferredId)
virtual OpalCall * CreateCall ()
virtual OpalCall * CreateCall (const PString &remoteController, const PString &preferredId)
virtual void DestroyCall (OpalCall *call)
void HangupThisOpalCall (const PString &token)
PString GetStatusInfo (const PString &token)
PString GetStatusInfo ()
PString GetDurationInfo (const PString &token)
void AcceptThisCall (const PString &uniqueCallId)
void RejectThisCall (const PString &uniqueCallId)
BOOL SendThisDtmf (const PString &token, const PString &dtmfValue)
LaunchNewIdGetLaunchNewId ()
PINDEX ActiveCalls ()
void RequestNewId (PString &requester)
void DestroyOldComms (Comms *oldComms)
void AdviseCommsReady (MessageFrame *newFrame, PString &remoteController)

Protected Attributes

LaunchNewIdlid
Supervisorsupervisor
MessageFrameList nodesMakingCalls
MessageFrameList destroyTheseCalls
CommsProviderrunningComms
MyUdpSsEndPointudpssEP
PString controllerId
PString ourPassword
PString ourId
PSyncPoint syncPoint
DWORD allocationNumber

Detailed Description

The major class of this application. The rmote node controls us via the Supervisor class.

This class has access to all the internal variables of opal


Constructor & Destructor Documentation

MyManager::MyManager LaunchNewId lid,
PString &  controllerId,
PString &  ourId,
PString &  ourPassword
 

Constructor

MyManager::~MyManager  ) 
 

destructor


Member Function Documentation

void MyManager::AcceptThisCall const PString &  uniqueCallId  ) 
 

Advise the manager to accept this call, which has a particular callId

PINDEX MyManager::ActiveCalls  )  [inline]
 

Count of the number of active calls in the system

void MyManager::AdviseCommsReady MessageFrame newFrame,
PString &  remoteController
 

WE have received a node that a Comms instance has been built in response to a RequestNewId command. advise the relevant controller of this

OpalCall * MyManager::CreateCall const PString &  remoteController,
const PString &  preferredId
[virtual]
 

Same as CreateCall(), but assign a particular Comms structure, with a particular remoteController to this call. This routine is used on creating outgoing calls.

OpalCall * MyManager::CreateCall  )  [virtual]
 

Create a call object. This function allows an application to have the system create desccendants of the OpalCall class. This call will be controlled by an ID.

void MyManager::DestroyCall OpalCall *  call  )  [virtual]
 

Destroy a call object. This gets called from background thread that garbage collects all calls and connections.

void MyManager::DestroyOldComms Comms oldComms  )  [inline]
 

Take this old Comms structure, and delete it, in a separate thread to the MyOpalCall destructor

Here is the call graph for this function:

void MyManager::EndEverything  ) 
 

Set the syncpoint to run, which ends the main thread

PString MyManager::GetControllerId  )  [inline]
 

Return the id of the remote controller

PString MyManager::GetDurationInfo const PString &  token  ) 
 

Get information (in a textual form) of how long this call has been up

LaunchNewId& MyManager::GetLaunchNewId  )  [inline]
 

Return a reference to the pyython launcher for this program

PString MyManager::GetOurId  )  [inline]
 

Return our id which is used to connect the message server

PString MyManager::GetOurPassword  )  [inline]
 

Return the password used to connect to the message server

PString MyManager::GetStatusInfo  ) 
 

Request manager to provide general status information on all calls

PString MyManager::GetStatusInfo const PString &  token  ) 
 

Request manager to provide status information on the call matching this specific token

void MyManager::HangupThisOpalCall const PString &  token  ) 
 

Advise the manager to clear the call that has this specific token

BOOL MyManager::Initialise PArgList &  args  ) 
 

Given the command line args, set this class up

void MyManager::Main PArgList &  args  ) 
 

Where we sit, while waiting for commands & events

void MyManager::OnAlerting OpalConnection &  connection  )  [virtual]
 

Call back for remote party being alerted on outgoing call. This function is called after the connection is informed that the remote endpoint is "ringing". This function is generally called some time after the MakeConnection() function was called.

Parameters:
connection  Connection that was established

OpalConnection::AnswerCallResponse MyManager::OnAnswerCall OpalConnection &  connection,
const PString &  caller
 

call back for when there is a in coming call for us to "answer"

void MyManager::OnClearedCall OpalCall &  call  )  [virtual]
 

A call has been cleared, and is about to be totally destroyed

Parameters:
call  Connection that was established

void MyManager::OnEstablishedCall OpalCall &  call  )  [virtual]
 

A call has been established, and now is running with media in both directions

Parameters:
call  Call that was completed

BOOL MyManager::OnIncomingConnection OpalConnection &  connection  )  [virtual]
 

Call back for answering an incoming call. This function is used for an application to control the answering of incoming calls.

Parameters:
connection  Connection that is calling

BOOL MyManager::OnOpenMediaStream OpalConnection &  connection,
OpalMediaStream &  stream
[virtual]
 

Create a new media stream for them to use

Parameters:
stream  Connection that owns the media stream New media stream being opened

void MyManager::OnUserInputString OpalConnection &  connection,
const PString &  value
[virtual]
 

We have received a message from some connection, where the message is in the PString arg

Parameters:
value  Connection input has come from String value of indication

void MyManager::RejectThisCall const PString &  uniqueCallId  ) 
 

Advise the manager to reject this call, which has a particular callId

void MyManager::RequestNewId PString &  requester  ) 
 

Start the proces to get a new ID. The new ID is created by a separate thread, and the remote controller is advised when it is available

BOOL MyManager::SendThisDtmf const PString &  token,
const PString &  dtmfValue
 

Request manager to send the supplied dtmf string to the remote endpoint

BOOL MyManager::SetUpCall const PString &  partyA,
const PString &  partyB,
const PString &  remoteController,
const PString &  preferredId
[virtual]
 

Set up a call between two parties. This is used to initiate a call. Incoming calls are "answered" using a different mechanism.

Parameters:
partyA  The A party of call
partyB  The B party of call
remoteController  the controller who started this call
preferredId  the id to assign to this call

void MyManager::StartCall const PString &  ostr,
const PString &  remoteController,
const PString &  callIdToUse
 

Initiate a call to a remote node

Parameters:
ostr  Remote node we are calling
remoteController  controller who started this call
preferredId  the id of the local message client who wants this call


Member Data Documentation

DWORD MyManager::allocationNumber [protected]
 

The allocation number used in the last memory leak test request

PString MyManager::controllerId [protected]
 

The unique ID that identifies the remote controller who is responsible for the overview of this sofaswitch

MessageFrameList MyManager::destroyTheseCalls [protected]
 

A list of MessageFrame instances that we are currently destroying. These MessageFrame instances have been used in previous calls, and have to be deleted be a separate thread

LaunchNewId& MyManager::lid [protected]
 

The interface to the external script which runs python, to provide comms for us

MessageFrameList MyManager::nodesMakingCalls [protected]
 

A list of the nodes who are initiating calls through us

PString MyManager::ourId [protected]
 

The description of who we are, which is used when logging in to the server

PString MyManager::ourPassword [protected]
 

An enity which could be used when logging in to the server

CommsProvider* MyManager::runningComms [protected]
 

A list of Comms instances, which are already built, connected to the remote server, and ready to be used

Supervisor& MyManager::supervisor [protected]
 

The manager of the comms with remote controller. It allows the calls to be setup

PSyncPoint MyManager::syncPoint [protected]
 

Sync point that can be called to end the whole thing

MyUdpSsEndPoint* MyManager::udpssEP [protected]
 

The sound system endpoint that we use to control talk to the remote sofa switch nodes


The documentation for this class was generated from the following files:
Generated on Sun Jan 29 19:49:19 2006 for SSVoip, which is Sofa Switch Voip by  doxygen 1.4.4