PVXMLChannel Class Reference

#include <vxml.h>

Inheritance diagram for PVXMLChannel:

PDelayChannel PIndirectChannel PChannel PObject

List of all members.

Public Member Functions

 PVXMLChannel (unsigned frameDelay, PINDEX frameSize)
 ~PVXMLChannel ()
virtual BOOL Open (PVXMLChannelInterface *_vxml)
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, BOOL recording=FALSE)
const PStringGetMediaFormat () const
BOOL IsMediaPCM () 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
virtual BOOL QueueRecordable (PVXMLRecordable *newItem)
BOOL StartRecording (const PFilePath &fn, unsigned finalSilence=3000, unsigned maxDuration=30000)
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 BOOL QueueResource (const PURL &url, PINDEX repeat=1, PINDEX delay=0)
virtual BOOL QueuePlayable (const PString &type, const PString &str, PINDEX repeat=1, PINDEX delay=0, BOOL autoDelete=FALSE)
virtual BOOL QueuePlayable (PVXMLPlayable *newItem)
virtual BOOL QueueData (const PBYTEArray &data, PINDEX repeat=1, PINDEX delay=0)
virtual BOOL QueueFile (const PString &fn, PINDEX repeat=1, PINDEX delay=0, BOOL autoDelete=FALSE)
virtual BOOL QueueCommand (const PString &cmd, PINDEX repeat=1, PINDEX delay=0)
virtual void FlushQueue ()
virtual BOOL IsPlaying () const
void SetPause (BOOL _pause)
void SetName (const PString &name)
unsigned GetSampleFrequency () const

Protected Attributes

PVXMLChannelInterfacevxmlInterface
unsigned sampleFrequency
PString mediaFormat
PString wavFilePrefix
PMutex channelWriteMutex
PMutex channelReadMutex
BOOL closed
BOOL recording
PVXMLRecordablerecordable
unsigned finalSilence
unsigned silenceRun
BOOL playing
PMutex queueMutex
PVXMLQueue playQueue
PVXMLPlayablecurrentPlayItem
BOOL paused
int silentCount
int totalData
PTimer delayTimer
PString channelName


Constructor & Destructor Documentation

PVXMLChannel::PVXMLChannel ( unsigned  frameDelay,
PINDEX  frameSize 
)

PVXMLChannel::~PVXMLChannel (  ) 


Member Function Documentation

virtual BOOL PVXMLChannel::Open ( PVXMLChannelInterface _vxml  )  [virtual]

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::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 BOOL PVXMLChannel::Read ( void *  buf,
PINDEX  len 
) [virtual]

Low level read from the file channel. The read timeout is ignored for file I/O. The GetLastReadCount() function returns the actual number of bytes read.

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 PDelayChannel.

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

Low level write to the file channel. The write timeout is ignored for file I/O. The GetLastWriteCount() function returns the actual number of bytes written.

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 PDelayChannel.

virtual PWAVFile* PVXMLChannel::CreateWAVFile ( const PFilePath fn,
BOOL  recording = FALSE 
) [virtual]

const PString& PVXMLChannel::GetMediaFormat (  )  const [inline]

BOOL PVXMLChannel::IsMediaPCM (  )  const [inline]

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

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

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

virtual BOOL PVXMLChannel::QueueRecordable ( PVXMLRecordable newItem  )  [virtual]

BOOL PVXMLChannel::StartRecording ( const PFilePath fn,
unsigned  finalSilence = 3000,
unsigned  maxDuration = 30000 
)

BOOL PVXMLChannel::EndRecording (  ) 

BOOL PVXMLChannel::IsRecording (  )  const [inline]

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

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

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

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

virtual BOOL PVXMLChannel::QueuePlayable ( const PString type,
const PString str,
PINDEX  repeat = 1,
PINDEX  delay = 0,
BOOL  autoDelete = FALSE 
) [virtual]

virtual BOOL PVXMLChannel::QueuePlayable ( PVXMLPlayable newItem  )  [virtual]

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

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

virtual BOOL PVXMLChannel::QueueCommand ( const PString cmd,
PINDEX  repeat = 1,
PINDEX  delay = 0 
) [inline, virtual]

virtual void PVXMLChannel::FlushQueue (  )  [virtual]

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

void PVXMLChannel::SetPause ( BOOL  _pause  )  [inline]

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

unsigned PVXMLChannel::GetSampleFrequency (  )  const [inline]


Member Data Documentation

PVXMLChannelInterface* PVXMLChannel::vxmlInterface [protected]

unsigned PVXMLChannel::sampleFrequency [protected]

PString PVXMLChannel::mediaFormat [protected]

PString PVXMLChannel::wavFilePrefix [protected]

PMutex PVXMLChannel::channelWriteMutex [protected]

PMutex PVXMLChannel::channelReadMutex [protected]

BOOL PVXMLChannel::closed [protected]

BOOL PVXMLChannel::recording [protected]

PVXMLRecordable* PVXMLChannel::recordable [protected]

unsigned PVXMLChannel::finalSilence [protected]

unsigned PVXMLChannel::silenceRun [protected]

BOOL PVXMLChannel::playing [protected]

PMutex PVXMLChannel::queueMutex [protected]

PVXMLQueue PVXMLChannel::playQueue [protected]

PVXMLPlayable* PVXMLChannel::currentPlayItem [protected]

BOOL PVXMLChannel::paused [protected]

int PVXMLChannel::silentCount [protected]

int PVXMLChannel::totalData [protected]

PTimer PVXMLChannel::delayTimer [protected]

PString PVXMLChannel::channelName [protected]

Reimplemented from PChannel.


The documentation for this class was generated from the following file:
Generated on Fri Sep 21 14:40:16 2007 for PWLib by  doxygen 1.5.3