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 PWAVFile * CreateWAVFile (const PFilePath &fn, BOOL recording=FALSE)
const PString & GetMediaFormat () 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

PVXMLChannelInterface * vxmlInterface
unsigned sampleFrequency
PString mediaFormat
PString wavFilePrefix
PMutex channelWriteMutex
PMutex channelReadMutex
BOOL closed
BOOL recording
PVXMLRecordable * recordable
unsigned finalSilence
unsigned silenceRun
BOOL playing
PMutex queueMutex
PVXMLQueue playQueue
PVXMLPlayable * currentPlayItem
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 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]

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

BOOL PVXMLChannel::EndRecording (  ) 

virtual void PVXMLChannel::FlushQueue (  )  [virtual]

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

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

unsigned PVXMLChannel::GetSampleFrequency (  )  const [inline]

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]

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

virtual BOOL PVXMLChannel::QueueCommand ( const PString &  cmd,
PINDEX  repeat = 1,
PINDEX  delay = 0 
) [inline, 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::QueuePlayable ( PVXMLPlayable *  newItem  )  [virtual]

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

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

virtual BOOL 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 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::ReadFrame ( void *  buffer,
PINDEX  amount 
) [pure virtual]

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

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

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

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


Member Data Documentation

PString PVXMLChannel::channelName [protected]

Reimplemented from PChannel.

PMutex PVXMLChannel::channelReadMutex [protected]

PMutex PVXMLChannel::channelWriteMutex [protected]

BOOL PVXMLChannel::closed [protected]

PVXMLPlayable* PVXMLChannel::currentPlayItem [protected]

PTimer PVXMLChannel::delayTimer [protected]

unsigned PVXMLChannel::finalSilence [protected]

PString PVXMLChannel::mediaFormat [protected]

BOOL PVXMLChannel::paused [protected]

BOOL PVXMLChannel::playing [protected]

PVXMLQueue PVXMLChannel::playQueue [protected]

PMutex PVXMLChannel::queueMutex [protected]

PVXMLRecordable* PVXMLChannel::recordable [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]

PString PVXMLChannel::wavFilePrefix [protected]


The documentation for this class was generated from the following file:
Generated on Sun Oct 22 12:49:44 2006 for PWLib by  doxygen 1.4.7