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

Manager Class Reference

#include <manager.h>

Collaboration diagram for Manager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Manager (LaunchNewId &lid, PString &ourId, PString &ourPassword)
 ~Manager ()
void EndEverything ()
PString GetOurPassword ()
PString GetOurId ()
PString GetStatusInfo (const PString &token)
PString GetDurationInfo (const PString &token)
void AcceptThisCall (const PString &uniqueCallId)
void RejectThisCall (const PString &uniqueCallId)
BOOL GetSendToAddress (const PString &SsAmToken, PIPSocket::Address &address, PINDEX &portNo)
LaunchNewIdGetLaunchNewId ()
void RequestNewId (const PString &requester)
void DestroyOldComms (Comms *oldComms)
void Main ()
CommsCreateCall (const PString &remoteCont, const PString &preferredId)
CommsRemoveFromPreCallQueue (const PString &preferredId)
BOOL WaitUntilSupervisorOk ()
void ClearCommsId (PString _memberId)
PINDEX ActiveCalls ()

Protected Member Functions

void RemoveAllCalls ()
void RemoveGarbageCollector ()

Protected Attributes

LaunchNewIdlid
Supervisorsupervisor
MessageFrameList nodesMakingCalls
MessageFrameList activeCalls
MessageFrameList destroyTheseCalls
PString controllerId
PString ourPassword
PString ourId
PSyncPoint syncPoint
CommsProviderrunningComms
PAtomicInteger bogusIdCount

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

Manager::Manager LaunchNewId lid,
PString &  ourId,
PString &  ourPassword
 

Constructor

Manager::~Manager  ) 
 

destructor


Member Function Documentation

void Manager::AcceptThisCall const PString &  uniqueCallId  )  [inline]
 

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

PINDEX Manager::ActiveCalls  )  [inline]
 

Count of the number of active calls in the system

Here is the call graph for this function:

void Manager::ClearCommsId PString  _memberId  ) 
 

Cause the comms instance in activeCalls to be moved to the dead comms list. Give no error if the specified comms instance could not be found

Comms * Manager::CreateCall const PString &  remoteCont,
const PString &  preferredId
 

Called from a descendant of a MessageFrame class instance to create a call

void Manager::DestroyOldComms Comms oldComms  )  [inline]
 

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

Here is the call graph for this function:

void Manager::EndEverything  ) 
 

Set the syncpoint to run, which ends the main thread

PString Manager::GetDurationInfo const PString &  token  )  [inline]
 

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

LaunchNewId& Manager::GetLaunchNewId  )  [inline]
 

Return a reference to the pyython launcher for this program

PString Manager::GetOurId  )  [inline]
 

Return our id which is used to connect the message server

PString Manager::GetOurPassword  )  [inline]
 

Return the password used to connect to the message server

BOOL Manager::GetSendToAddress const PString &  SsAmToken,
PIPSocket::Address &  address,
PINDEX &  portNo
 

Return the send to address that is stored in this class instance

PString Manager::GetStatusInfo const PString &  token  )  [inline]
 

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

void Manager::Main  ) 
 

The entry point, where the main control loop sits

void Manager::RejectThisCall const PString &  uniqueCallId  )  [inline]
 

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

void Manager::RemoveAllCalls  )  [protected]
 

Go through the list of active calls, and tell them to "die now"

Comms * Manager::RemoveFromPreCallQueue const PString &  preferredId  ) 
 

Grab the instances of comms from the Pre Call Queue. Note that the PreCallQueue contains Comms instances generated by RequestNewId commands

void Manager::RemoveGarbageCollector  )  [protected]
 

Remove and terminate the garbage collector thread

void Manager::RequestNewId const PString &  requester  ) 
 

Allocate a new ID, place it in the pending list (nodesMakingNewCalls) and reply with the id to the controller who made this request

BOOL Manager::WaitUntilSupervisorOk  ) 
 

Wait (up to 1 second) to see if the supervisor is installed and connected OK.


Member Data Documentation

MessageFrameList Manager::activeCalls [protected]
 

A list of Comms instances that are currently in a call. That is, Comms instances who are talking with a remote Sofa Switch entity

PAtomicInteger Manager::bogusIdCount [protected]
 

count of the number of calls that started badly. It is used to created a bogus Id

PString Manager::controllerId [protected]
 

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

MessageFrameList Manager::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& Manager::lid [protected]
 

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

MessageFrameList Manager::nodesMakingCalls [protected]
 

A list of the nodes who are initiating calls through us

PString Manager::ourId [protected]
 

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

PString Manager::ourPassword [protected]
 

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

CommsProvider* Manager::runningComms [protected]
 

The list of initialised, ready to go, Comms instances

Supervisor& Manager::supervisor [protected]
 

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

PSyncPoint Manager::syncPoint [protected]
 

Sync point that can be called to end the whole thing


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