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

PVXMLChannel Class Reference

#include <vxml.h>

Inheritance diagram for PVXMLChannel:

PIndirectChannel PChannel PObject PVXMLChannelG7231 PVXMLChannelG729 PVXMLChannelPCM List of all members.

Public Member Functions

 PVXMLChannel (PVXMLChannelInterface &_vxml, BOOL incoming, const PString &fmtName, PINDEX frameBytes, unsigned frameTime, unsigned wavFileType, const PString &wavFilePrefix)
 ~PVXMLChannel ()
virtual BOOL IsOpen () const
virtual BOOL Close ()
virtual BOOL Read (void *buffer, PINDEX amount)
virtual BOOL Write (const void *buf, PINDEX len)
virtual PWAVFileCreateWAVFile (const PFilePath &fn)
PWAVFileGetWAVFile () const
const PStringGetFormatName () const
BOOL IsMediaPCM () const
unsigned GetWavFileType () const
virtual PString AdjustWavFilename (const PString &fn)
virtual BOOL WriteFrame (const void *buf, PINDEX len)=0
virtual BOOL IsSilenceFrame (const void *buf, PINDEX len) const =0
BOOL StartRecording (const PFilePath &fn, unsigned finalSilence=2000)
BOOL EndRecording ()
BOOL IsRecording () const
virtual BOOL ReadFrame (void *buffer, PINDEX amount)=0
virtual PINDEX CreateSilenceFrame (void *buffer, PINDEX amount)=0
virtual void GetBeepData (PBYTEArray &, unsigned)
virtual void QueueFile (const PString &fn, PINDEX repeat=1, PINDEX delay=0, BOOL autoDelete=FALSE)
virtual void QueueResource (const PURL &url, PINDEX repeat=1, PINDEX delay=0)
virtual void QueueData (const PBYTEArray &data, PINDEX repeat=1, PINDEX delay=0)
virtual void QueueCommand (const PString &data, PINDEX repeat=1, PINDEX delay=0)
virtual void QueueItem (PVXMLQueueItem *newItem)
virtual void FlushQueue ()
virtual BOOL IsPlaying () const
void SetPause (BOOL _pause)
virtual void HandleDelay (PINDEX amount)
void SetName (const PString &name)

Protected Attributes

PVXMLChannelInterfacevxmlInterface
BOOL isIncoming
PString formatName
unsigned sampleFrequency
PINDEX frameBytes
unsigned frameTime
unsigned wavFileType
PString wavFilePrefix
PMutex channelMutex
PAdaptiveDelay delay
BOOL closed
PINDEX delayBytes
BOOL recording
PWAVFilewavFile
unsigned finalSilence
unsigned silenceRun
BOOL playing
PMutex queueMutex
PVXMLQueue playQueue
BOOL paused
int silentCount
int totalData
PTimer delayTimer
PString channelName

Constructor & Destructor Documentation

PVXMLChannel::PVXMLChannel PVXMLChannelInterface _vxml,
BOOL  incoming,
const PString fmtName,
PINDEX  frameBytes,
unsigned  frameTime,
unsigned  wavFileType,
const PString wavFilePrefix
 

PVXMLChannel::~PVXMLChannel  ) 
 


Member Function Documentation

virtual PString PVXMLChannel::AdjustWavFilename const PString fn  )  [virtual]
 

virtual BOOL PVXMLChannel::Close  )  [virtual]
 

Close the channel. This will detach itself from the read and write channels and delete both of them if they are auto delete.

Returns:
TRUE if the channel is closed.

Reimplemented from PIndirectChannel.

virtual PINDEX PVXMLChannel::CreateSilenceFrame void *  buffer,
PINDEX  amount
[pure virtual]
 

Implemented in PVXMLChannelPCM, PVXMLChannelG7231, and PVXMLChannelG729.

virtual PWAVFile* PVXMLChannel::CreateWAVFile const PFilePath fn  )  [virtual]
 

BOOL PVXMLChannel::EndRecording  ) 
 

virtual void PVXMLChannel::FlushQueue  )  [virtual]
 

virtual void PVXMLChannel::GetBeepData PBYTEArray ,
unsigned 
[inline, virtual]
 

Reimplemented in PVXMLChannelPCM.

const PString& PVXMLChannel::GetFormatName  )  const [inline]
 

PWAVFile* PVXMLChannel::GetWAVFile  )  const [inline]
 

unsigned PVXMLChannel::GetWavFileType  )  const [inline]
 

virtual void PVXMLChannel::HandleDelay PINDEX  amount  )  [virtual]
 

Reimplemented in PVXMLChannelPCM.

BOOL PVXMLChannel::IsMediaPCM  )  const [inline]
 

virtual BOOL PVXMLChannel::IsOpen  )  const [virtual]
 

Determine if the channel is currently open and read and write operations can be executed on it. For example, in the PFile# class it returns if the file is currently open.

Returns:
TRUE if the channel is open.

Reimplemented from PIndirectChannel.

virtual BOOL PVXMLChannel::IsPlaying  )  const [inline, virtual]
 

BOOL PVXMLChannel::IsRecording  )  const [inline]
 

virtual BOOL PVXMLChannel::IsSilenceFrame const void *  buf,
PINDEX  len
const [pure virtual]
 

Implemented in PVXMLChannelPCM, PVXMLChannelG7231, and PVXMLChannelG729.

virtual void PVXMLChannel::QueueCommand const PString data,
PINDEX  repeat = 1,
PINDEX  delay = 0
[virtual]
 

virtual void PVXMLChannel::QueueData const PBYTEArray data,
PINDEX  repeat = 1,
PINDEX  delay = 0
[virtual]
 

virtual void PVXMLChannel::QueueFile const PString fn,
PINDEX  repeat = 1,
PINDEX  delay = 0,
BOOL  autoDelete = FALSE
[virtual]
 

virtual void PVXMLChannel::QueueItem PVXMLQueueItem newItem  )  [virtual]
 

virtual void PVXMLChannel::QueueResource const PURL url,
PINDEX  repeat = 1,
PINDEX  delay = 0
[virtual]
 

virtual BOOL PVXMLChannel::Read void *  buffer,
PINDEX  amount
[virtual]
 

Low level read from the channel. This function may block until the requested number of characters were read or the read timeout was reached. The GetLastReadCount() function returns the actual number of bytes read.

This will use the readChannel# pointer to actually do the read. If readChannel# is null the this asserts.

The GetErrorCode() function should be consulted after Read() returns FALSE to determine what caused the failure.

Returns:
TRUE indicates that at least one character was read from the channel. FALSE means no bytes were read due to timeout or some other I/O error.

Reimplemented from PIndirectChannel.

virtual BOOL PVXMLChannel::ReadFrame void *  buffer,
PINDEX  amount
[pure virtual]
 

Implemented in PVXMLChannelPCM, PVXMLChannelG7231, and PVXMLChannelG729.

void PVXMLChannel::SetName const PString name  )  [inline]
 

void PVXMLChannel::SetPause BOOL  _pause  )  [inline]
 

BOOL PVXMLChannel::StartRecording const PFilePath fn,
unsigned  finalSilence = 2000
 

virtual BOOL PVXMLChannel::Write const void *  buf,
PINDEX  len
[virtual]
 

Low level write to the channel. This function will block until the requested number of characters are written or the write timeout is reached. The GetLastWriteCount() function returns the actual number of bytes written.

This will use the writeChannel# pointer to actually do the write. If writeChannel# is null the this asserts.

The GetErrorCode() function should be consulted after Write() returns FALSE to determine what caused the failure.

Returns:
TRUE if at least len bytes were written to the channel.

Reimplemented from PIndirectChannel.

virtual BOOL PVXMLChannel::WriteFrame const void *  buf,
PINDEX  len
[pure virtual]
 

Implemented in PVXMLChannelPCM, PVXMLChannelG7231, and PVXMLChannelG729.


Member Data Documentation

PMutex PVXMLChannel::channelMutex [protected]
 

PString PVXMLChannel::channelName [protected]
 

Reimplemented from PChannel.

BOOL PVXMLChannel::closed [protected]
 

PAdaptiveDelay PVXMLChannel::delay [protected]
 

PINDEX PVXMLChannel::delayBytes [protected]
 

PTimer PVXMLChannel::delayTimer [protected]
 

unsigned PVXMLChannel::finalSilence [protected]
 

PString PVXMLChannel::formatName [protected]
 

PINDEX PVXMLChannel::frameBytes [protected]
 

unsigned PVXMLChannel::frameTime [protected]
 

BOOL PVXMLChannel::isIncoming [protected]
 

BOOL PVXMLChannel::paused [protected]
 

BOOL PVXMLChannel::playing [protected]
 

PVXMLQueue PVXMLChannel::playQueue [protected]
 

PMutex PVXMLChannel::queueMutex [protected]
 

BOOL PVXMLChannel::recording [protected]
 

unsigned PVXMLChannel::sampleFrequency [protected]
 

unsigned PVXMLChannel::silenceRun [protected]
 

int PVXMLChannel::silentCount [protected]
 

int PVXMLChannel::totalData [protected]
 

PVXMLChannelInterface& PVXMLChannel::vxmlInterface [protected]
 

PWAVFile* PVXMLChannel::wavFile [protected]
 

PString PVXMLChannel::wavFilePrefix [protected]
 

unsigned PVXMLChannel::wavFileType [protected]
 


The documentation for this class was generated from the following file:
Generated on Sat Jul 24 15:36:00 2004 for PWLib by doxygen 1.3.7