📄 si_sq.h
字号:
This function is still here because the function has not been
removed in order to avoid too much code change.
It is still called.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
---Return:
TRUE: Everything went ok.
FALSE: Something went wrong. E.g. incorrect invokeID or the script thread
is not done.
------------------------------------------------------------------------*/
BOOL SQ_GetPrevParams( pstructSQ thisx, UINT8 invokeID );
/*==========================================
SQ_GetError
============================================
---Purpose:
To get the error code of the script thread where
an error was detected. The error is one of the fatal errors
described in the WMLScript language specification 1.1
section 13.3.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
errCode Returns a WMLS error code (see errcodes.h).
---Return:
TRUE: Everything went ok.
FALSE: Something went wrong. E.g. incorrect invokeID or the script thread
is not done.
------------------------------------------------------------------------*/
BOOL SQ_GetError( pstructSQ thisx, UINT8 invokeID, enumErrorCode *errCode );
/*==========================================
SQ_GetExternalCallParams
============================================
---Purpose:
To get the URL to the new script file to be loaded.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
pTheURL Returns the absolute URL to the script file tobe loaded.
NOTE: The receiver is responsible for deallocating this parameter.
---Return:
TRUE: Everything went ok.
FALSE: Something went wrong. E.g. incorrect invokeID.
------------------------------------------------------------------------*/
BOOL SQ_GetExternalCallParams( pstructSQ thisx, UINT8 invokeID, BYTE **pTheURL );
/*==========================================
SQ_GetLibCallParams
============================================
---Purpose:
To get the parameters needed to perform the part of a script lib function that
resides externally to the SQ environment (e.g. in SDL).
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
pLibIndex Returns the script library index of the function that
needs external help.
pFuncIndex Returns the script library function index for the function that
needs external help.
pArgOpS Returns an operand stack which holds the arguments for
the lib function.
NOTE: The receiver is responsible for deallocating this parameter.
---Return:
TRUE: Everything went ok.
FALSE: Something went wrong. E.g. incorrect invokeID.
------------------------------------------------------------------------*/
BOOL SQ_GetLibCallParams( pstructSQ thisx, UINT8 invokeID, UINT16 *pLibIndex, UINT8 *pFuncIndex,
pstructOpS *pArgOpS );
/*==========================================
SQ_ReturnValueToScript
============================================
See SQ_ReturnStringValueToScript below.
------------------------------------------------------------------------*/
VOID SQ_ReturnValueToScript( pstructSQ thisx, UINT8 invokeID, WCHAR **theValueStr );
/*==========================================
SQ_ReturnVarValueToScript
============================================
------------------------------------------------------------------------*/
VOID SQ_ReturnVarValueToScript( pstructSQ thisx, UINT8 invokeID, pstructVar *ppResultVar );
/*==========================================
SQ_ReturnStringValueToScript
============================================
---Purpose:
To return a string to script thread.
E.g. the Dialogs.alert script lib function has requested completion of the
function. When SDL receives the result of the function it calls this
function to return the result over to the SQ and the script thread
that made the request.
NOTE: If this function is called and the script thread never asked for
help the parameters are properly taken care of anyway.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
theValue The string to be returned to the sript thread.
NOTE: The SQ will take care of deallocation of this parameter.
---Return:
-
------------------------------------------------------------------------*/
VOID SQ_ReturnStringValueToScript( pstructSQ thisx, UINT8 invokeID, WCHAR **theValue );
/*==========================================
SQ_ReturnBoolValueToScript
============================================
---Purpose:
To return a bool value to script thread.
E.g. the Dialogs.confirm script lib function has requested completion of the
function. When SDL receives the result of the function it calls this
function to return the result over to the SQ and the script thread
that made the request.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
theValue The bool to be returned to the sript thread.
---Return:
-
------------------------------------------------------------------------*/
VOID SQ_ReturnBoolValueToScript( pstructSQ thisx, UINT8 invokeID, BOOL theValue );
/*==========================================
SQ_ReturnIntValueToScript
============================================
---Purpose:
To return an integer value to script thread.
E.g. the URL.loadString script lib function has requested completion of the
function. The load failed and so the result is an integer error code which is
returned to the script thread by calling this function.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
theValue The integer to be returned to the sript thread.
---Return:
-
------------------------------------------------------------------------*/
VOID SQ_ReturnIntValueToScript( pstructSQ thisx, UINT8 invokeID, INT32 theValue );
/*==========================================
SQ_LoadStringDone
============================================
---Purpose:
To take care of the successful result of a URL.loadString call and
return it to the proper script thread.
NOTE: If the load failed, SQ_ReturnIntValueToScript must then be called to
transfer the integer error code to the script thread.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
charSet The IANA mibEnum for the charset that the string is in.
pValueStr The string to be transfered over to the script thread.
NOTE: The SQ will take care of deallocation of this parameter.
strLen The length of ValueStr in bytes.
---Return:
-
------------------------------------------------------------------------*/
VOID SQ_LoadStringDone( pstructSQ thisx, UINT8 invokeID, INT16 charSet, BYTE **pValueStr, UINT32 strLen );
/*==========================================
SQ_LibraryErrorReceived
============================================
---Purpose:
This function is to be called if the external part of
a lib function call failed.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
---Return:
-
------------------------------------------------------------------------*/
VOID SQ_LibraryErrorReceived( pstructSQ thisx, UINT8 invokeID );
/*==========================================
SQ_GetViewId
============================================
---Purpose:
To get the view id of the user agent that invoked the script thread has.
This is used when logging certain events,
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
pResult Returns the view id.
---Return:
TRUE: Everything went ok.
FALSE: Something went wrong. E.g. incorrect invokeID.
------------------------------------------------------------------------*/
BOOL SQ_GetViewId( pstructSQ thisx, UINT8 invokeID, UINT8 *pResult );
/*==========================================
SQ_LoadErrorReceived
============================================
---Purpose:
This function is to be called when the loading of
another script file fails. I.e. a script thread
calls a function in another script file. This new file has to be loaded.
The loading fails. Then this function is called.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
---Return:
-
------------------------------------------------------------------------*/
VOID SQ_LoadErrorReceived( pstructSQ thisx, UINT8 invokeID );
/*==========================================
SQ_LoadDoneReceived
============================================
---Purpose:
The loading of a new script file is successful.
---Params:
thisx The SQ.
invokeID The id of the script thread (this was returned by SQ_Exec).
pBP The contents of the new encoded script file.
NOTE: The SQ will take care of deallocation of this parameter.
BPlen The length of BP in bytes.
IANAcharset The IANA mibEnum for the charset that some string constants may be
encoded in.
---Return:
-
------------------------------------------------------------------------*/
VOID SQ_LoadDoneReceived( pstructSQ thisx, UINT8 invokeID, BYTE **pBP, UINT32 BPlen, INT16 IANAcharset );
/*==========================================
SQ_GetAnArgumentAsString
============================================
---Purpose:
This functions pops an operand from the operand stack
and converts it into a string in the same way
the script lib function String.toString does.
It is used by SDL to retrieve arguments from the
operand stack when part of a script lib function resides
outside the SQ environment (see also SQ_GetLibCallParams).
NOTE: The popped operand is removed after it has been
converted into a string.
---Params:
argOpS The operand stack (see si_ops files) that contains
an argument that needs to be converted into a string.
pArgAsStr Returns the argument in a string format.
NOTE: The receiver is responsible for deallocating this parameter.
---Return:
TRUE: The conversion went fine.
FALSE: Conversion failed or the stack is empty.
------------------------------------------------------------------------*/
BOOL SQ_GetAnArgumentAsString( pstructOpS argOpS, WCHAR **pArgAsStr );
/*==========================================
SQ_DeleteArgOpS
============================================
---Purpose:
This function deallocates the operand stack and all
of its components.
---Params:
pArgOpS The stack to be deallocated.
---Return:
-
------------------------------------------------------------------------*/
VOID SQ_DeleteArgOpS( pstructOpS *pArgOpS );
#ifdef CAN_SIGN_TEXT
VOID SQ_TextSigned( pstructSQ thisx, UINT8 invokeId, UINT8 algorithm, UINT16 sigLen, CHAR *signature, CHAR *hashedKey, UINT16 hashedKeyLen, CHAR *certificate, UINT16 certificateLen, UINT8 certificateType, UINT16 err);
#endif
#ifdef USE_PROPRIETARY_WMLS_LIBS
VOID SQ_ProprietaryLibraryFunctionResponse( pstructSQ thisx, UINT8 invokeID, WMLSvar** pResultVar );
#endif
/* _SI_SQ_H */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -