sources/plugin.cpp File Reference

#include "plugin.h"
#include <scol.h>
#include <sapi.h>
#include <sphelper.h>
#include <spuihelp.h>
#include <list>
#include <mlang.h>
#include <string>

Go to the source code of this file.

Defines

#define NbTplPKG   29
 Nb of Scol functions or types.

Functions

wchar_t * convertCharToLPCWSTR (char *s_text)
 Utils Conversions.
char * convertWcharToChar (wchar_t *w_text)
int destroySpeechObj (mmachine m, int handsys, int speechTab)
 function to destroy an OBJSPEECHSCOL in scol
int _CRSpeech (mmachine m)
 _CRSpeech : create speech instance
int _DSSpeech (mmachine m)
 _DSSpeech : destroy speech instance
int _SetSpeechText (mmachine m)
 _SetSpeechText : Set speech Text
int _SetSpeechVolume (mmachine m)
 _SetSpeechVolume : Set speech volume
int _GetSpeechVolume (mmachine m)
 _GetSpeechVolume : Get speech volume
int _SetSpeechRate (mmachine m)
 _SetSpeechRate : set speech rate
int _GetSpeechRate (mmachine m)
 _GetSpeechRate : get speech rate
int _PlaySpeech (mmachine m)
 _PlaySpeech : play speech
int _PauseSpeech (mmachine m)
 _PauseSpeech : pause speech
int _ResumeSpeech (mmachine m)
 _ResumeSpeech : resume speech
int _StopSpeech (mmachine m)
 _StopSpeech : Stop speech
int _CBSpeechEnd (mmachine m)
 n_CBSpeechEnd : set callback end of speech
int getSpeechEndCb (mmachine m, HWND h, unsigned msg, UINT id, LONG param, int *ret)
 C function that prepares the VM for the execution of the speech end event callback.
int _GetSpeechVoices (mmachine m)
 _GetSpeechVoices : get speech voices
int _SetSpeechVoice (mmachine m)
 _SetSpeechVoice : set speech voice
int _GetSpeechVoice (mmachine m)
 _GetSpeechVoice : get speech voice
int _CBSpeechWord (mmachine m)
 _CBSpeechWord : Set callback on speech word
int getSpeechWordCb (mmachine m, HWND h, unsigned msg, UINT id, LONG param, int *ret)
 C function that prepares the VM for the execution of the speech word event callback.
int _CBSpeechText (mmachine m)
 _CBSpeechText : Set callback on speech text
int getSpeechTextCb (mmachine m, HWND h, unsigned msg, UINT id, LONG param, int *ret)
 C function that prepares the VM for the execution of the speech text event callback.
int _CBSpeechPhoneme (mmachine m)
 _CBSpeechPhoneme : set callback on speech phoneme
int getSpeechPhonemeCb (mmachine m, HWND h, unsigned msg, UINT id, LONG param, int *ret)
 C function that prepares the VM for the execution of the speech phoneme event callback.
int _CRRecognition (mmachine m)
 _CRRecognition : create recognition instance
int destroyRecognitionObj (mmachine m, int handsys, int recognitionTab)
 function to destroy an OBJRECOSCOL in scol
int _DSRecognition (mmachine m)
 n_DSRecognition : destroy recognition instance
int _CBRecognitionEnd (mmachine m)
 _CBRecognitionEnd : set callback end of recognition
int getRecognitionEndCb (mmachine m, HWND h, unsigned msg, UINT id, LONG param, int *ret)
 C function that prepares the VM for the execution of the recognition end event callback.
int _CBRecognitionStart (mmachine m)
 _CBRecognitionStart : set callback start of recognition
int getRecognitionStartCb (mmachine m, HWND h, unsigned msg, UINT id, LONG param, int *ret)
 C function that prepares the VM for the execution of the recognition start event callback.
int _CBRecognitionText (mmachine m)
 _CBRecognitionText : Set callback on recognition text
int getRecognitionTextCb (mmachine m, HWND h, unsigned msg, UINT id, LONG param, int *ret)
 C function that prepares the VM for the execution of the recognition text event callback.
int _CBRecognitionTextsAlt (mmachine m)
 _CBRecognitionTextsAlt : Set callback on recognition texts alternates
int getRecognitionTextsAltCb (mmachine m, HWND h, unsigned msg, UINT id, LONG param, int *ret)
 C function that prepares the VM for the execution of the recognition alternates text event callback.
int _SetRecogntionVolume (mmachine m)
 _CBRecognitionWords : Set callback on recognition words
int _GetRecogntionVolume (mmachine m)
 _GetRecogntionVolume : Get recognition volume
int _AddRecognitionWord (mmachine m)
 _AddRecognitionWord : add recogntion word to dictionary
int LoadSpeech (mmachine m)
 Load the packages in Scol virtual machine.
 __declspec (dllexport) int SCOLloadSPEECH(mmachine m
 Starting point of the DLL Function to add in Scol usm.ini for loading dll.
 SCOLinitplugin (w)
 MMechostr (MSKDEBUG,"SCOLloadSPEECH_RECOGNITION loading SpeechRecognition DLL ...\n")
 LoadSpeech (m)

Variables

cbmachine ww
 Main include.
HWND HScol = NULL
int OBJSPEECHSCOL
 global object declaration
int OBJRECOSCOL
int SCOL_SPEECH_END_CB = 0
 global Callback declaration for text to speech
int SPEECH_END_CB
int SCOL_SPEECH_WORD_CB = 1
int SPEECH_WORD_CB
int SCOL_SPEECH_TEXT_CB = 2
int SPEECH_TEXT_CB
int SCOL_SPEECH_PHONEME_CB = 3
int SPEECH_PHONEME_CB
int SCOL_RECO_END_CB = 0
 global Callback declaration for recognition
int RECOGNITION_END_CB
int SCOL_RECO_TEXT_CB = 1
int RECOGNITION_TEXT_CB
int SCOL_RECO_START_CB = 2
int RECOGNITION_START_CB
int SCOL_RECO_TEXTS_ALT_CB = 3
int RECOGNITION_TEXTS_ALT_CB
int SCOL_RECO_WORDS_CB = 4
int RECOGNITION_WORDS_CB
char * TplName [NbTplPKG]
int(* TplFunc [NbTplPKG])(mmachine m)
int TplNArg [NbTplPKG]
char * TplType [NbTplPKG]
cbmachine w int k = 0

Define Documentation

#define NbTplPKG   29

Nb of Scol functions or types.

Definition at line 1341 of file plugin.cpp.


Function Documentation

__declspec ( dllexport   ) 

Starting point of the DLL Function to add in Scol usm.ini for loading dll.

Ending point of the DLL Function to add in Scol usm.ini for free dll.

Definition at line 1575 of file plugin.cpp.

wchar_t* convertCharToLPCWSTR ( char *  s_text  ) 

Utils Conversions.

Definition at line 97 of file plugin.cpp.

char* convertWcharToChar ( wchar_t *  w_text  ) 

Definition at line 107 of file plugin.cpp.

int destroyRecognitionObj ( mmachine  m,
int  handsys,
int  recognitionTab 
)

function to destroy an OBJRECOSCOL in scol

Parameters:
m : current machine
handle : given handle
obj : given OBJRECOSCOL
Returns:
0 if success

Definition at line 927 of file plugin.cpp.

int destroySpeechObj ( mmachine  m,
int  handsys,
int  speechTab 
)

function to destroy an OBJSPEECHSCOL in scol

Parameters:
m : current machine
handle : given handle
obj : given OBJSPEECHSCOL
Returns:
0 if success

Definition at line 125 of file plugin.cpp.

int getRecognitionEndCb ( mmachine  m,
HWND  h,
unsigned  msg,
UINT  id,
LONG  param,
int *  ret 
)

C function that prepares the VM for the execution of the recognition end event callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 1003 of file plugin.cpp.

int getRecognitionStartCb ( mmachine  m,
HWND  h,
unsigned  msg,
UINT  id,
LONG  param,
int *  ret 
)

C function that prepares the VM for the execution of the recognition start event callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 1048 of file plugin.cpp.

int getRecognitionTextCb ( mmachine  m,
HWND  h,
unsigned  msg,
UINT  id,
LONG  param,
int *  ret 
)

C function that prepares the VM for the execution of the recognition text event callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 1094 of file plugin.cpp.

int getRecognitionTextsAltCb ( mmachine  m,
HWND  h,
unsigned  msg,
UINT  id,
LONG  param,
int *  ret 
)

C function that prepares the VM for the execution of the recognition alternates text event callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 1144 of file plugin.cpp.

int getSpeechEndCb ( mmachine  m,
HWND  h,
unsigned  msg,
UINT  id,
LONG  param,
int *  ret 
)

C function that prepares the VM for the execution of the speech end event callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 575 of file plugin.cpp.

int getSpeechPhonemeCb ( mmachine  m,
HWND  h,
unsigned  msg,
UINT  id,
LONG  param,
int *  ret 
)

C function that prepares the VM for the execution of the speech phoneme event callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 852 of file plugin.cpp.

int getSpeechTextCb ( mmachine  m,
HWND  h,
unsigned  msg,
UINT  id,
LONG  param,
int *  ret 
)

C function that prepares the VM for the execution of the speech text event callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 802 of file plugin.cpp.

int getSpeechWordCb ( mmachine  m,
HWND  h,
unsigned  msg,
UINT  id,
LONG  param,
int *  ret 
)

C function that prepares the VM for the execution of the speech word event callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 753 of file plugin.cpp.

LoadSpeech (  ) 
int LoadSpeech ( mmachine  m  ) 

Load the packages in Scol virtual machine.

Parameters:
mmachine : the scol machine

Definition at line 1507 of file plugin.cpp.

MMechostr ( MSKDEBUG  ,
"SCOLloadSPEECH_RECOGNITION loading SpeechRecognition DLL ...\n"   
)
SCOLinitplugin (  ) 

Variable Documentation

HScol = NULL

Definition at line 57 of file plugin.cpp.

return k = 0

Definition at line 1557 of file plugin.cpp.

Definition at line 62 of file plugin.cpp.

global object declaration

Definition at line 61 of file plugin.cpp.

Definition at line 81 of file plugin.cpp.

Definition at line 87 of file plugin.cpp.

Definition at line 84 of file plugin.cpp.

Definition at line 90 of file plugin.cpp.

Definition at line 93 of file plugin.cpp.

global Callback declaration for recognition

Definition at line 80 of file plugin.cpp.

Definition at line 86 of file plugin.cpp.

Definition at line 83 of file plugin.cpp.

Definition at line 89 of file plugin.cpp.

Definition at line 92 of file plugin.cpp.

global Callback declaration for text to speech

Definition at line 66 of file plugin.cpp.

Definition at line 75 of file plugin.cpp.

Definition at line 72 of file plugin.cpp.

Definition at line 69 of file plugin.cpp.

Definition at line 67 of file plugin.cpp.

Definition at line 76 of file plugin.cpp.

Definition at line 73 of file plugin.cpp.

Definition at line 70 of file plugin.cpp.

int(* TplFunc[NbTplPKG])(mmachine m)

Pointers to C functions that manipulate the VM for each scol function previously defined

Definition at line 1387 of file plugin.cpp.

char* TplName[NbTplPKG]

Scol function names

Definition at line 1347 of file plugin.cpp.

int TplNArg[NbTplPKG]

Nb of arguments of each scol function

Definition at line 1427 of file plugin.cpp.

char* TplType[NbTplPKG]

Prototypes of the scol functions

Definition at line 1466 of file plugin.cpp.

cbmachine ww

Main include.

utils libraries for Speech

global scol declaration

Definition at line 56 of file plugin.cpp.

 All Classes Files Functions Variables Defines
Generated on Fri Jun 11 12:08:48 2010 for Template by  doxygen 1.6.3