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

Comms Class Reference

#include <comms.h>

Inheritance diagram for Comms:

Inheritance graph
[legend]
Collaboration diagram for Comms:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Comms (LaunchNewId &lid)
 ~Comms ()
BOOL ConstructReaderWriter (PString soundDevice)
virtual void Terminate ()
virtual void WaitForTermination ()
BOOL StoppedByHangup ()
BOOL StoppedByExit ()

Protected Member Functions

virtual void ProcessHangup (PStringArray &cmds, PString &sender)
virtual void ProcessCallNode (PStringArray &cmds, PString &sender)
virtual void ProcessStatusQuery (PStringArray &cmds, PString &sender)
virtual void ProcessDuration (PStringArray &cmds, PString &sender)
virtual void ProcessIdentify (PStringArray &cmds, PString &sender)
virtual void ProcessDebug (PStringArray &cmds, PString &sender)
virtual void ProcessAnswer (PStringArray &cmds, PString &sender)
virtual void ProcessQuitNow (PStringArray &cmds, PString &sender)
virtual BOOL OkToQuitNow ()

Protected Attributes

TestAudioWritetaw
TestAudioReadtar
PMutex lockReaderWriter
BOOL stopByHangup
BOOL stopByExit

Detailed Description

The parent class that handles communication with the remote server. This class overrides some methods from MessageFrame, in a manner appropriate to something that reads/writes to the sound device


Constructor & Destructor Documentation

Comms::Comms LaunchNewId lid  ) 
 

Constuctor

Comms::~Comms  ) 
 

Terminate, wait for threads to exit, and destroy the tar & taw threads


Member Function Documentation

BOOL Comms::ConstructReaderWriter PString  soundDevice  ) 
 

Open the test audio read and test audio write threads. Return TRUE if successfull, FALSE on failure

virtual BOOL Comms::OkToQuitNow  )  [inline, protected, virtual]
 

Some MessageFrame instances do not have the permission to quit now. This virtual method determines if this instance is permitted to exit the program. This supervisor has permision to end all.

Reimplemented from MessageFrame.

void Comms::ProcessAnswer PStringArray &  cmds,
PString &  sender
[protected, virtual]
 

we have received a command advising us how to answer to the incoming call, so we act as required and reply accordingly

Reimplemented from MessageFrame.

void Comms::ProcessCallNode PStringArray &  cmds,
PString &  sender
[protected, virtual]
 

we have received a Call other Node command, so do it and reply accordingly

Reimplemented from MessageFrame.

void Comms::ProcessDebug PStringArray &  cmds,
PString &  sender
[protected, virtual]
 

we have received a command which enables/disables debug information so install as required and reply accordingly

Reimplemented from MessageFrame.

void Comms::ProcessDuration PStringArray &  cmds,
PString &  sender
[protected, virtual]
 

we have received a command queryig the current call duration , so extract information & answer

Reimplemented from MessageFrame.

void Comms::ProcessHangup PStringArray &  cmds,
PString &  sender
[protected, virtual]
 

we have received a hangup message, so end the call

Reimplemented from MessageFrame.

void Comms::ProcessIdentify PStringArray &  cmds,
PString &  sender
[protected, virtual]
 

we have received a command requesting that we identify ourselves so do it and reply accordingly

Reimplemented from MessageFrame.

void Comms::ProcessQuitNow PStringArray &  cmds,
PString &  sender
[protected, virtual]
 

we have received a command advising us that we are to end now

Reimplemented from MessageFrame.

void Comms::ProcessStatusQuery PStringArray &  cmds,
PString &  sender
[protected, virtual]
 

we have received a query status command, so do it and reply accordingly

Reimplemented from MessageFrame.

BOOL Comms::StoppedByExit  )  [inline]
 

Report if we were stopped by a shutdown request

BOOL Comms::StoppedByHangup  )  [inline]
 

Report if we were stopped by hangup

void Comms::Terminate  )  [virtual]
 

Shut down the read and write methods

Reimplemented from MessageFrame.

void Comms::WaitForTermination  )  [virtual]
 

Block the calling process, and return when the threads have terminated


Member Data Documentation

PMutex Comms::lockReaderWriter [protected]
 

Mutex which protects access to the tar/taw variables

BOOL Comms::stopByExit [protected]
 

The terminating condition was

BOOL Comms::stopByHangup [protected]
 

The terminating condition was

TestAudioRead* Comms::tar [protected]
 

Class that reads audio from the sound device

TestAudioWrite* Comms::taw [protected]
 

class that writes audio data to sound device


The documentation for this class was generated from the following files:
Generated on Sun Jan 29 19:49:45 2006 for SSSound : Sofa Switch Sound by  doxygen 1.4.4