Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

PVXMLSession Class Reference

Inheritance diagram for PVXMLSession:
Inheritance graph
Collaboration diagram for PVXMLSession:
Collaboration graph

List of all members.

Public Types

enum  PXBlockType { PXReadBlock, PXWriteBlock, PXAcceptBlock, PXConnectBlock }

Public Member Functions

virtual BOOL Close ()
BOOL ConvertTextToFilenameList (const PString &_text, PTextToSpeech::TextType type, PStringArray &list, BOOL useCacheing)
PWAVFileCreateWAVFile (const PFilePath &fn, PFile::OpenMode mode, int opts, unsigned fmt)
virtual BOOL DoTransfer (const PVXMLTransferOptions &)
virtual BOOL EndRecording ()
virtual PString EvaluateExpr (const PString &oexpr)
BOOL Execute ()
PXMLElementFindHandler (const PString &event)
PVXMLChannelGetAndLockVXMLChannel ()
virtual void GetBeepData (PBYTEArray &data, unsigned ms)
PMutexGetSessionMutex ()
PTextToSpeechGetTextToSpeech ()
virtual PString GetVar (const PString &str) const
PString GetXMLError () const
virtual BOOL IsLoaded () const
virtual BOOL IsPlaying () const
virtual BOOL IsRecording () const
virtual BOOL Load (const PString &source)
virtual BOOL LoadFile (const PFilePath &file)
BOOL LoadGrammar (PVXMLGrammar *grammar)
virtual BOOL LoadURL (const PURL &url)
virtual BOOL LoadVXML (const PString &xml)
void OnEndRecording (const PString &channelName)
virtual void OnEndSession ()
virtual void OnTransfer (const PVXMLTransferResult &)
virtual BOOL OnUserInput (const PString &str)
virtual BOOL Open (BOOL isPCM)
virtual BOOL Open (const PString &mediaFormat)
virtual BOOL PlayCommand (const PString &data, PINDEX repeat=1, PINDEX delay=0)
virtual BOOL PlayData (const PBYTEArray &data, PINDEX repeat=1, PINDEX delay=0)
virtual BOOL PlayFile (const PString &fn, PINDEX repeat=1, PINDEX delay=0, BOOL autoDelete=FALSE)
virtual BOOL PlayResource (const PURL &url, PINDEX repeat=1, PINDEX delay=0)
virtual BOOL PlaySilence (const PTimeInterval &timeout)
virtual BOOL PlaySilence (PINDEX msecs=0)
virtual BOOL PlayText (const PString &text, PTextToSpeech::TextType type=PTextToSpeech::Default, PINDEX repeat=1, PINDEX delay=0)
 PVXMLSession (PTextToSpeech *tts=NULL, BOOL autoDelete=FALSE)
void RecordEnd ()
virtual BOOL RetreiveResource (const PURL &url, PString &contentType, PFilePath &fn, BOOL useCache=TRUE)
void SetCallingToken (PString &token)
void SetFinishWhenEmpty (BOOL v)
virtual void SetPause (BOOL pause)
PTextToSpeechSetTextToSpeech (const PString &ttsName)
PTextToSpeechSetTextToSpeech (PTextToSpeech *_tts, BOOL autoDelete=FALSE)
virtual void SetVar (const PString &ostr, const PString &val)
virtual BOOL StartRecording (const PFilePath &fn, BOOL recordDTMFTerm, const PTimeInterval &recordMaxTime, const PTimeInterval &recordFinalSilence)
void Trigger ()
void UnLockVXMLChannel ()
Overrides from class PObject
Comparison Compare (const PObject &obj) const
Overrides from class PChannel
virtual PString GetName () const
virtual BOOL IsOpen () const
virtual BOOL Read (void *buf, PINDEX len)
virtual BOOL Write (const void *buf, PINDEX len)
virtual BOOL Shutdown (ShutdownValue option)
virtual PChannelGetBaseReadChannel () const
virtual PChannelGetBaseWriteChannel () const
virtual PString GetErrorText (ErrorGroup group=NumErrorGroups) const
Channel establish functions
BOOL Open (PChannel &channel)
BOOL Open (PChannel *channel, BOOL autoDelete=TRUE)
BOOL Open (PChannel *readChannel, PChannel *writeChannel, BOOL autoDeleteRead=TRUE, BOOL autoDeleteWrite=TRUE)
PChannelGetReadChannel () const
BOOL SetReadChannel (PChannel *channel, BOOL autoDelete=TRUE)
PChannelGetWriteChannel () const
BOOL SetWriteChannel (PChannel *channel, BOOL autoDelete=TRUE)
Overrides from class PObject
virtual PINDEX HashFunction () const
Information functions
int GetHandle () const
Reading functions
void SetReadTimeout (const PTimeInterval &time)
PTimeInterval GetReadTimeout () const
virtual PINDEX GetLastReadCount () const
virtual int ReadChar ()
BOOL ReadBlock (void *buf, PINDEX len)
PString ReadString (PINDEX len)
virtual BOOL ReadAsync (void *buf, PINDEX len)
virtual void OnReadComplete (void *buf, PINDEX len)
Writing functions
void SetWriteTimeout (const PTimeInterval &time)
PTimeInterval GetWriteTimeout () const
virtual PINDEX GetLastWriteCount () const
BOOL WriteChar (int c)
BOOL WriteString (const PString &str)
virtual BOOL WriteAsync (const void *buf, PINDEX len)
virtual void OnWriteComplete (const void *buf, PINDEX len)
Miscellaneous functions
virtual PObjectClone () const

Static Public Member Functions

static BOOL ConvertOSError (int libcReturnValue, Errors &lastError, int &osError)

Protected Member Functions

void AllowClearCall ()
virtual BOOL ConvertOSError (int libcReturnValue, ErrorGroup group=LastGeneralError)
PXMLElementFindForm (const PString &id)
void Initialise ()
PURL NormaliseResourceName (const PString &src)
virtual BOOL OnOpen ()
void ProcessGrammar ()
void ProcessNode ()
void ProcessUserInput ()
int PXClose ()
BOOL PXSetIOBlock (PXBlockType type, const PTimeInterval &timeout)
int ReadCharWithTimeout (PTimeInterval &timeout)
BOOL ReceiveCommandString (int nextChar, const PString &reply, PINDEX &pos, PINDEX start)
void SayAs (const PString &className, const PString &text)
BOOL SetErrorValues (Errors errorCode, int osError, ErrorGroup group=LastGeneralError)
BOOL TraverseAudio ()
BOOL TraverseChoice (const PString &grammarResult)
BOOL TraverseExit ()
BOOL TraverseGoto ()
BOOL TraverseGrammar ()
BOOL TraverseIf ()
BOOL TraverseMenu ()
BOOL TraverseProperty ()
BOOL TraverseRecord ()
BOOL TraverseSubmit ()
virtual BOOL TraverseTransfer ()
BOOL TraverseVar ()

Static Protected Member Functions

static PTimeInterval StringToTime (const PString &str)

Protected Attributes

BOOL allowFinish
BOOL autoDeleteTextToSpeech
PString channelName
PReadWriteMutex channelPointerMutex
 Race condition prevention on closing channel.
PStringToString documentVars
BOOL emptyAction
BOOL finishWhenEmpty
BOOL forceEnd
Errors lastErrorCode [NumErrorGroups+1]
 The platform independant error code.
int lastErrorNumber [NumErrorGroups+1]
 The operating system error number (eg as returned by errno).
PINDEX lastReadCount
 Number of byte last read by the Read() function.
PINDEX lastWriteCount
 Number of byte last written by the Write() function.
BOOL listening
BOOL loaded
PString mediaFormat
int os_handle
 The operating system file handle return by standard open() function.
PXBlockType px_lastBlockType
PMutex px_selectMutex
PMutex px_threadMutex
PMutex px_writeMutex
BOOL readAutoDelete
 Automatically delete read channel on destruction.
 Channel for read operations.
PTimeInterval readTimeout
 Timeout for read operations.
BOOL recordDTMFTerm
PTimeInterval recordFinalSilence
PFilePath recordFn
BOOL recording
PTimeInterval recordMaxTime
PSyncPoint recordSync
PMutex sessionMutex
PStringToString sessionVars
BOOL threadRunning
int timeout
PMutex userInputMutex
std::queue< char > userInputQueue
PSyncPoint waitForEvent
BOOL writeAutoDelete
 Automatically delete write channel on destruction.
 Channel for write operations.
PTimeInterval writeTimeout
 Timeout for write operations.
PXML xmlFile

Private Member Functions

void ExecuteDialog ()
 PCLASSINFO (PVXMLSession, PIndirectChannel)

Private Attributes

PSyncPoint answerSync
PString callingCallToken
PString eventName
PString grammarResult
PSyncPoint transferSync

Scattered read/write functions

virtual BOOL Read (const VectorOfSlice &slices)
virtual BOOL Write (const VectorOfSlice &slices)
typedef std::vector< SliceVectorOfSlice

Miscellaneous functions

BOOL SetBufferSize (PINDEX newSize)
BOOL SendCommandString (const PString &command)
void AbortCommandString ()
enum  ShutdownValue { ShutdownRead = 0, ShutdownWrite = 1, ShutdownReadAndWrite = 2 }

Error functions

Errors GetErrorCode (ErrorGroup group=NumErrorGroups) const
int GetErrorNumber (ErrorGroup group=NumErrorGroups) const
static PString GetErrorText (Errors lastError, int osError=0)
enum  Errors {
  NoError, NotFound, FileExists, DiskFull,
  AccessDenied, DeviceInUse, BadParameter, NoMemory,
  NotOpen, Timeout, Interrupted, BufferTooSmall,
  Miscellaneous, ProtocolFailure, NumNormalisedErrors
enum  ErrorGroup { LastReadError, LastWriteError, LastGeneralError, NumErrorGroups }

Run Time Type functions

virtual const char * GetClass (unsigned=0) const
BOOL IsClass (const char *cls) const
virtual BOOL InternalIsDescendant (const char *clsName) const
static const char * Class ()

Comparison functions

virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
bool operator== (const PObject &obj) const
bool operator!= (const PObject &obj) const
bool operator< (const PObject &obj) const
bool operator> (const PObject &obj) const
bool operator<= (const PObject &obj) const
bool operator>= (const PObject &obj) const
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }

I/O functions

virtual void PrintOn (ostream &strm) const
virtual void ReadFrom (istream &strm)
ostream & operator<< (ostream &strm, const PObject &obj)
istream & operator>> (istream &strm, PObject &obj)

Detailed Description

Definition at line 334 of file vxml.h.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index