📄 si_si.h
字号:
SI_Delete
============================================
---Purpose:
Deallocates the SI and its components.
---Params:
pThis The SI.
---Return:
-
------------------------------------------------------------------------*/
VOID SI_Delete( pstructSI *pThis );
/*==========================================
SI_ExecBlock
============================================
---Purpose:
The central function of the SI.
This function interprets instructions until either
timeslice time units have been consumed or an
external resource is needed in which case the SI
goes in to a wait state until the result is
received.
---Params:
thisx The SI.
---Return:
ERR_WAE_WMLS_NONE All went ok. SI->returnInfo must be checked in order to see
if the script is done, need external resource or there
is more to be interpreted.
otherwise An error ocurred (see errcodes.h and WMLS language spec).
------------------------------------------------------------------------*/
enumErrorCode SI_ExecBlock( pstructSI thisx );
/* If the return val is SI_RETURN_DONE then the return info is found inside the si (see structSI) */
/*==========================================
SI_GetReturnVal
============================================
---Purpose:
If SI->returnInfo == SI_RETURN_DONE (and no errors ocurred) then the
script file is done and the caller should retrieve a return value
by calling this function.
---Params:
thisx The SI.
---Return:
pstructVar The return value.
NULL something went wrong. E.g. the script is not done.
------------------------------------------------------------------------*/
pstructVar SI_GetReturnVal( pstructSI thisx );
/*==========================================
SI_ReceiveReturnVal
============================================
---Purpose:
This function is used for returning the result from a script library
function that was completed in SDL.
---Params:
thisx The SI.
pRetVal The return value.
NOTE: The SI will take care of deallocation of this parameter.
---Return:
-
------------------------------------------------------------------------*/
VOID SI_ReceiveReturnVal( pstructSI thisx, pstructVar *pRetVal );
/*==========================================
SI_LoadStringDone
============================================
---Purpose:
This function is used for returning result from the
URL.loadString library function.
SI_ReceiveReturnVal can not be used since there is more to be done
before putting it on the operand stack. For instance, it must
be translated to unicode if not already in that charset.
---Params:
thisx The SI.
charSet The IANA mibEnum code for the charset used in the string.
pValueStr The loaded string.
strLen The length of ValueStr in bytes.
---Return:
-
------------------------------------------------------------------------*/
VOID SI_LoadStringDone( pstructSI thisx, INT16 charSet, BYTE **pValueStr, UINT32 strLen );
/*==========================================
SI_ReceiveCalledSIReturnVal
============================================
---Purpose:
This function is used for returning the result of calling an
external (not in the same script file) script function.
The result is a return value, and possible a browser action (GO or PREV).
If there is a browser action then it overrides any previous
browser action stored in this SI.
---Params:
thisx The SI.
pRetVal The return value to be pushed on the operand stack.
browserActionInvoked TRUE: a browser action was invoked (either GO or PREV, not both).
BrowserPrev TRUE: a PREV action was invoked.
pBrowserGoUrl Not NULL: The URL parameter of the GO action.
---Return:
-
------------------------------------------------------------------------*/
VOID SI_ReceiveCalledSIReturnVal( pstructSI thisx, pstructVar *pRetVal, BOOL browserActionInvoked,
BOOL BrowserPrev, WCHAR **pBrowserGoUrl );
/*==========================================
SI_GetLibCalllParams
============================================
---Purpose:
When SI->returnInfo == SI_RETURN_EXTERNAL and the SI->returnParams->islibCall is TRUE
then the SI needs SDL to complete a script library function. This function should
thus be used by SDL to retrieve the data about the lib call such as library and
function index as well as parameter values to the lib func.
---Params:
thisx The SI.
pLibIndex Returns the script library index.
pFuncIndex Returns the script library function index.
pArgOpS Returns an operand stack containing
the call parameter values.
---Return:
TRUE: All went well.
FALSE: Something went wrong. E.g. no external lib call had been made.
------------------------------------------------------------------------*/
BOOL SI_GetLibCalllParams( pstructSI thisx, UINT16 *pLibIndex, UINT8 *pFuncIndex,pstructOpS *pArgOpS );
/*==========================================
SI_GetExtCalllParams_URL
============================================
---Purpose:
To retrieve the URL to the script file where the external function
resides. The SQ calls this function so it can order the file to
be loaded. Not until the file has been loaded is it time to fetch
the function name and the parameter values of the call.
Therefore are they not fetched in this function. The rest can be
retrieved by calling SI_GetExtCalllParams_URL.
---Params:
thisx This SI.
pCallUrl Returns the absolute URL to the file
where the external function resides.
---Return:
TRUE: Everything went well.
FALSE: Something went wrong.
------------------------------------------------------------------------*/
BOOL SI_GetExtCalllParams_URL( pstructSI thisx, WCHAR **pCallUrl );
/*==========================================
SI_GetExtCalllParams_rest
============================================
---Purpose:
To retrieve the function name and parameter values in the
call to the external script function.
See SI_GetExtCalllParams_URL above for more info.
---Params:
thisx This SI.
pFuncName Returns the function name.
pArgOpS Returns an operand stack containing
the parameter values of the call.
---Return:
TRUE:
FALSE:
------------------------------------------------------------------------*/
BOOL SI_GetExtCalllParams_rest( pstructSI thisx, BYTE **pFuncName, pstructOpS *pArgOpS );
/*==========================================
SI_NewReturnParams
============================================
---Purpose:
Creates a struct in the SI to be filled out when
needing an external resource (external function or lib call).
Creates the struct and initialises the attributes. Does not
create a new operand stack!
Used by si_instr and si_libs.
---Params:
si The SI.
---Return:
TRUE: Everything went well.
FALSE: Something went wrong.
------------------------------------------------------------------------*/
BOOL SI_NewReturnParams( pstructSI si );
/* _SI_SI_H */
#endif
/*==========================================
x
============================================
---Purpose:
---Params:
---Return:
------------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -