PVXMLSession Class Reference

#include <vxml.h>

Inheritance diagram for PVXMLSession:

PIndirectChannel PVXMLChannelInterface PChannel PObject List of all members.

Public Member Functions

 PVXMLSession (PTextToSpeech *tts=NULL, PBoolean autoDelete=false)
virtual ~PVXMLSession ()
PTextToSpeechSetTextToSpeech (PTextToSpeech *tts, PBoolean autoDelete=false)
PTextToSpeechSetTextToSpeech (const PString &ttsName)
PTextToSpeechGetTextToSpeech () const
virtual PBoolean Load (const PString &source)
virtual PBoolean LoadFile (const PFilePath &file)
virtual PBoolean LoadURL (const PURL &url)
virtual PBoolean LoadVXML (const PString &xml)
virtual PBoolean IsLoaded () const
virtual PBoolean Open (const PString &mediaFormat)
virtual PBoolean Close ()
 Close the channel.
PBoolean Execute ()
PVXMLChannelGetAndLockVXMLChannel ()
void UnLockVXMLChannel ()
PMutexGetSessionMutex ()
PBoolean LoadGrammar (PVXMLGrammar *grammar)
virtual PBoolean PlayText (const PString &text, PTextToSpeech::TextType type=PTextToSpeech::Default, PINDEX repeat=1, PINDEX delay=0)
PBoolean ConvertTextToFilenameList (const PString &text, PTextToSpeech::TextType type, PStringArray &list, PBoolean useCacheing)
virtual PBoolean PlayFile (const PString &fn, PINDEX repeat=1, PINDEX delay=0, PBoolean autoDelete=false)
virtual PBoolean PlayData (const PBYTEArray &data, PINDEX repeat=1, PINDEX delay=0)
virtual PBoolean PlayCommand (const PString &data, PINDEX repeat=1, PINDEX delay=0)
virtual PBoolean PlayResource (const PURL &url, PINDEX repeat=1, PINDEX delay=0)
virtual PBoolean PlayTone (const PString &toneSpec, PINDEX repeat=1, PINDEX delay=0)
virtual PBoolean PlaySilence (PINDEX msecs=0)
virtual PBoolean PlaySilence (const PTimeInterval &timeout)
virtual PBoolean PlayStop ()
virtual void SetPause (PBoolean pause)
virtual void GetBeepData (PBYTEArray &data, unsigned ms)
virtual PBoolean StartRecording (const PFilePath &fn, PBoolean recordDTMFTerm, const PTimeInterval &recordMaxTime, const PTimeInterval &recordFinalSilence)
virtual PBoolean EndRecording ()
virtual PBoolean IsPlaying () const
virtual PBoolean IsRecording () const
virtual PBoolean OnUserInput (const PString &str)
PString GetXMLError () const
virtual void OnEndDialog ()
virtual void OnEndSession ()
virtual void OnTransfer (const PString &, bool)
virtual PString GetVar (const PString &str) const
virtual void SetVar (const PString &ostr, const PString &val)
virtual PString EvaluateExpr (const PString &oexpr)
virtual PBoolean RetreiveResource (const PURL &url, PString &contentType, PFilePath &fn, PBoolean useCache=true)
 PDECLARE_NOTIFIER (PThread, PVXMLSession, VXMLExecute)
void SetCallingToken (PString &token)
PXMLElementFindHandler (const PString &event)
PWAVFileCreateWAVFile (const PFilePath &fn, PFile::OpenMode mode, int opts, unsigned fmt)
void OnEndRecording (const PString &channelName)
void RecordEnd ()
void Trigger ()
PStringToStringGetSessionVars ()

Protected Member Functions

void Initialise ()
void AllowClearCall ()
void ProcessUserInput ()
void ProcessGrammar ()
void ProcessNode ()
bool NextNode ()
PBoolean TraverseAudio ()
PBoolean TraverseGoto ()
PBoolean TraverseGrammar ()
PBoolean TraverseRecord ()
PBoolean TraverseIf ()
PBoolean TraverseExit ()
PBoolean TraverseVar ()
PBoolean TraverseSubmit ()
PBoolean TraverseMenu ()
PBoolean TraverseChoice ()
PBoolean TraverseProperty ()
PBoolean TraverseTransfer ()
void SayAs (const PString &className, const PString &text)
void SayAs (const PString &className, const PString &text, const PString &voice)
PURL NormaliseResourceName (const PString &src)
PXMLElementFindForm (const PString &id)

Static Protected Member Functions

static PTimeInterval StringToTime (const PString &str)

Protected Attributes

PSyncPoint waitForEvent
PMutex sessionMutex
PXML xmlFile
PVXMLGrammaractiveGrammar
PBoolean listening
int timeout
PStringToString sessionVars
PStringToString documentVars
PMutex userInputMutex
std::queue< char > userInputQueue
PBoolean recording
PFilePath recordFn
PBoolean recordDTMFTerm
PTimeInterval recordMaxTime
PTimeInterval recordFinalSilence
PSyncPoint recordSync
PBoolean loaded
PURL rootURL
PBoolean emptyAction
PThreadvxmlThread
bool m_abortVXML
PString mediaFormat
PVXMLChannel *& vxmlChannel
PTextToSpeechtextToSpeech
PBoolean autoDeleteTextToSpeech
PXMLElementcurrentForm
PXMLElementcurrentField
PXMLObjectcurrentNode
bool m_speakNodeData

Constructor & Destructor Documentation

PVXMLSession::PVXMLSession ( PTextToSpeech tts = NULL,
PBoolean  autoDelete = false 
)

virtual PVXMLSession::~PVXMLSession (  )  [virtual]


Member Function Documentation

void PVXMLSession::AllowClearCall (  )  [protected]

virtual PBoolean PVXMLSession::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.

PBoolean PVXMLSession::ConvertTextToFilenameList ( const PString text,
PTextToSpeech::TextType  type,
PStringArray list,
PBoolean  useCacheing 
)

PWAVFile* PVXMLSession::CreateWAVFile ( const PFilePath fn,
PFile::OpenMode  mode,
int  opts,
unsigned  fmt 
) [virtual]

Implements PVXMLChannelInterface.

virtual PBoolean PVXMLSession::EndRecording (  )  [virtual]

virtual PString PVXMLSession::EvaluateExpr ( const PString oexpr  )  [virtual]

PBoolean PVXMLSession::Execute (  ) 

PXMLElement* PVXMLSession::FindForm ( const PString id  )  [protected]

PXMLElement* PVXMLSession::FindHandler ( const PString event  ) 

PVXMLChannel* PVXMLSession::GetAndLockVXMLChannel (  ) 

virtual void PVXMLSession::GetBeepData ( PBYTEArray data,
unsigned  ms 
) [virtual]

PMutex& PVXMLSession::GetSessionMutex (  )  [inline]

PStringToString& PVXMLSession::GetSessionVars (  )  [inline]

PTextToSpeech* PVXMLSession::GetTextToSpeech (  )  const [inline]

virtual PString PVXMLSession::GetVar ( const PString str  )  const [virtual]

PString PVXMLSession::GetXMLError (  )  const

void PVXMLSession::Initialise (  )  [protected]

virtual PBoolean PVXMLSession::IsLoaded (  )  const [inline, virtual]

virtual PBoolean PVXMLSession::IsPlaying (  )  const [virtual]

virtual PBoolean PVXMLSession::IsRecording (  )  const [virtual]

virtual PBoolean PVXMLSession::Load ( const PString source  )  [virtual]

virtual PBoolean PVXMLSession::LoadFile ( const PFilePath file  )  [virtual]

PBoolean PVXMLSession::LoadGrammar ( PVXMLGrammar grammar  ) 

virtual PBoolean PVXMLSession::LoadURL ( const PURL url  )  [virtual]

virtual PBoolean PVXMLSession::LoadVXML ( const PString xml  )  [virtual]

bool PVXMLSession::NextNode (  )  [protected]

PURL PVXMLSession::NormaliseResourceName ( const PString src  )  [protected]

virtual void PVXMLSession::OnEndDialog (  )  [virtual]

void PVXMLSession::OnEndRecording ( const PString channelName  )  [virtual]

Implements PVXMLChannelInterface.

virtual void PVXMLSession::OnEndSession (  )  [inline, virtual]

virtual void PVXMLSession::OnTransfer ( const PString ,
bool   
) [inline, virtual]

virtual PBoolean PVXMLSession::OnUserInput ( const PString str  )  [virtual]

virtual PBoolean PVXMLSession::Open ( const PString mediaFormat  )  [virtual]

PVXMLSession::PDECLARE_NOTIFIER ( PThread  ,
PVXMLSession  ,
VXMLExecute   
)

virtual PBoolean PVXMLSession::PlayCommand ( const PString data,
PINDEX  repeat = 1,
PINDEX  delay = 0 
) [virtual]

virtual PBoolean PVXMLSession::PlayData ( const PBYTEArray data,
PINDEX  repeat = 1,
PINDEX  delay = 0 
) [virtual]

virtual PBoolean PVXMLSession::PlayFile ( const PString fn,
PINDEX  repeat = 1,
PINDEX  delay = 0,
PBoolean  autoDelete = false 
) [virtual]

virtual PBoolean PVXMLSession::PlayResource ( const PURL url,
PINDEX  repeat = 1,
PINDEX  delay = 0 
) [virtual]

virtual PBoolean PVXMLSession::PlaySilence ( const PTimeInterval timeout  )  [virtual]

virtual PBoolean PVXMLSession::PlaySilence ( PINDEX  msecs = 0  )  [virtual]

virtual PBoolean PVXMLSession::PlayStop (  )  [virtual]

virtual PBoolean PVXMLSession::PlayText ( const PString text,
PTextToSpeech::TextType  type = PTextToSpeech::Default,
PINDEX  repeat = 1,
PINDEX  delay = 0 
) [virtual]

virtual PBoolean PVXMLSession::PlayTone ( const PString toneSpec,
PINDEX  repeat = 1,
PINDEX  delay = 0 
) [virtual]

void PVXMLSession::ProcessGrammar (  )  [protected]

void PVXMLSession::ProcessNode (  )  [protected]

void PVXMLSession::ProcessUserInput (  )  [protected]

void PVXMLSession::RecordEnd (  )  [virtual]

Implements PVXMLChannelInterface.

virtual PBoolean PVXMLSession::RetreiveResource ( const PURL url,
PString contentType,
PFilePath fn,
PBoolean  useCache = true 
) [virtual]

void PVXMLSession::SayAs ( const PString className,
const PString text,
const PString voice 
) [protected]

void PVXMLSession::SayAs ( const PString className,
const PString text 
) [protected]

void PVXMLSession::SetCallingToken ( PString token  )  [inline]

virtual void PVXMLSession::SetPause ( PBoolean  pause  )  [virtual]

PTextToSpeech* PVXMLSession::SetTextToSpeech ( const PString ttsName  ) 

PTextToSpeech* PVXMLSession::SetTextToSpeech ( PTextToSpeech tts,
PBoolean  autoDelete = false 
)

virtual void PVXMLSession::SetVar ( const PString ostr,
const PString val 
) [virtual]

virtual PBoolean PVXMLSession::StartRecording ( const PFilePath fn,
PBoolean  recordDTMFTerm,
const PTimeInterval recordMaxTime,
const PTimeInterval recordFinalSilence 
) [virtual]

static PTimeInterval PVXMLSession::StringToTime ( const PString str  )  [static, protected]

PBoolean PVXMLSession::TraverseAudio (  )  [protected]

PBoolean PVXMLSession::TraverseChoice (  )  [protected]

PBoolean PVXMLSession::TraverseExit (  )  [protected]

PBoolean PVXMLSession::TraverseGoto (  )  [protected]

PBoolean PVXMLSession::TraverseGrammar (  )  [protected]

PBoolean PVXMLSession::TraverseIf (  )  [protected]

PBoolean PVXMLSession::TraverseMenu (  )  [protected]

PBoolean PVXMLSession::TraverseProperty (  )  [protected]

PBoolean PVXMLSession::TraverseRecord (  )  [protected]

PBoolean PVXMLSession::TraverseSubmit (  )  [protected]

PBoolean PVXMLSession::TraverseTransfer (  )  [protected]

PBoolean PVXMLSession::TraverseVar (  )  [protected]

void PVXMLSession::Trigger (  )  [virtual]

Implements PVXMLChannelInterface.

void PVXMLSession::UnLockVXMLChannel (  )  [inline]


Member Data Documentation

PVXMLGrammar* PVXMLSession::activeGrammar [protected]

PBoolean PVXMLSession::autoDeleteTextToSpeech [protected]

PXMLElement* PVXMLSession::currentField [protected]

PXMLElement* PVXMLSession::currentForm [protected]

PXMLObject* PVXMLSession::currentNode [protected]

PStringToString PVXMLSession::documentVars [protected]

PBoolean PVXMLSession::emptyAction [protected]

PBoolean PVXMLSession::listening [protected]

PBoolean PVXMLSession::loaded [protected]

bool PVXMLSession::m_abortVXML [protected]

bool PVXMLSession::m_speakNodeData [protected]

PString PVXMLSession::mediaFormat [protected]

PBoolean PVXMLSession::recordDTMFTerm [protected]

PTimeInterval PVXMLSession::recordFinalSilence [protected]

PFilePath PVXMLSession::recordFn [protected]

PBoolean PVXMLSession::recording [protected]

PTimeInterval PVXMLSession::recordMaxTime [protected]

PSyncPoint PVXMLSession::recordSync [protected]

PURL PVXMLSession::rootURL [protected]

PMutex PVXMLSession::sessionMutex [protected]

PStringToString PVXMLSession::sessionVars [protected]

PTextToSpeech* PVXMLSession::textToSpeech [protected]

int PVXMLSession::timeout [protected]

PMutex PVXMLSession::userInputMutex [protected]

std::queue<char> PVXMLSession::userInputQueue [protected]

PVXMLChannel* & PVXMLSession::vxmlChannel [protected]

PThread* PVXMLSession::vxmlThread [protected]

PSyncPoint PVXMLSession::waitForEvent [protected]

PXML PVXMLSession::xmlFile [protected]


The documentation for this class was generated from the following file:
Generated on Fri Oct 14 01:44:14 2011 for PTLib by  doxygen 1.4.7