#include <comms.h>
Inheritance diagram for Comms:


Public Member Functions | |
| Comms (LaunchNewId &lid, Manager &manager) | |
| ~Comms () | |
| virtual void | StopAllCommunications () |
| void | AdviseCallCreation (const PString &remoteCont) |
| void | SetMediaConnectionPtr (MediaConnection *ptr) |
| PString | GetAudioFile (BOOL isReadFile) |
| void | CloseCommsDown () |
| virtual void | SilentlyEndAll () |
Protected Member Functions | |
| virtual void | ProcessTransferUdp (PStringArray &cmds, PString &sender) |
| 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 BOOL | SendDtmf (const PString &dtmfVals) |
| virtual void | SetReadFile (PString &newReadFile) |
| virtual void | SetWriteFile (PString &newWriteFile) |
| virtual BOOL | OkToHangup () |
| PString | GetStatusInfo () |
| PString | GetDurationInfo () |
| void | StartMediaStreams () |
| void | CloseMediaStreams () |
Protected Attributes | |
| Manager & | manager |
| PString | remoteController |
| PTime | createdAt |
Audio thread releated variables | |
| AudioRead * | audioReadThread |
| AudioWrite * | audioWriteThread |
| PString | audioReadFile |
| PString | audioWriteFile |
|
||||||||||||
|
Constructor, with a reference to the manager and the unique ID generator |
|
|
Close down the handling of incoming message, and break the link to the MediaConnection class |
|
|
Send a message to the remote controller saying that we are created. The id of this node is appended to the message. |
|
|
Close this comms instance down Here is the call graph for this function: ![]() |
|
|
Close the current streams of media - which is generated by the audio Read and Write Threads |
|
|
Report the current file for audio read/writeing |
|
|
Get information (in a textual form) of how long this call has been up |
|
|
Get information for this call on status |
|
|
Some MessageFrame instances do not obey the hangup command. This virtual method says we can hangup, cause we are one channel of a conference call. This instance of the comms should close on receiving a hangup Reimplemented from MessageFrame. |
|
||||||||||||
|
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. |
|
||||||||||||
|
we have received a Call other Node command, so do it and reply accordingly Reimplemented from MessageFrame. |
|
||||||||||||
|
we have received a command which enables/disables debug information so install as required and reply accordingly Reimplemented from MessageFrame. |
|
||||||||||||
|
we have received a command queryig the current call duration , so extract information & answer Reimplemented from MessageFrame. |
|
||||||||||||
|
we have received a hangup message, so end the call Reimplemented from MessageFrame. |
|
||||||||||||
|
we have received a command requesting that we identify ourselves so do it and reply accordingly Reimplemented from MessageFrame. |
|
||||||||||||
|
we have received a query status command, so do it and reply accordingly Reimplemented from MessageFrame. |
|
||||||||||||
|
we have received a command advising us that we are to install udp comms with a particular remote node id. We override this method so we know when are being transferred. On being transferred, we move ourselves out of the Manager's list of pending calls. Then we call the ancestor method to actually do the work of transferring the udp Reimplemented from MessageFrame. |
|
|
Send this dtmf string to the remote node. Returns TRUE on success, FALSE on failure. Reimplemented from MessageFrame. |
|
|
Assign a value to the jocall pointer |
|
|
Actually set the file this application reads data from. An application will override this method, if it is allowed to grab audio from the specified file (which is the case for the answering machine. The answering machine will read aaudio from the specified file. Reimplemented from MessageFrame. |
|
|
Actually set the file this application will write PCM audio data to. application will override this method, if it is allowed to put audio into this file (which is the case for the answering machine. The answering machine will write audio to the specified file. Reimplemented from MessageFrame. |
|
|
We have a reason to close down, so just close everything right now (or alternatively, it is the end of this Comms instance). Send no message to the remote node - just end end end. Reimplemented from MessageFrame. |
|
|
Get the media to start to flow, and start the audio read/write methods |
|
|
Send a message to the remote controller that we are closing down now |
|
|
Name of the file we read audio from, and send to the remote sofa switch entity |
|
|
Pointer to the thead instance that reads from a file, and sends this back through the socket |
|
|
Name of the file used for writing audio to, that is, audio we have received from the sofa switch entity |
|
|
Pointer to the thead instance that reads from a socket, and writes the audio to the specified file |
|
|
The time at which this call started Reimplemented from MessageFrame. |
|
|
Reference back to the most important class of all |
|
|
The id of the controller who has created this call |
1.4.4