⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wmlif.h

📁 是一个手机功能的模拟程序
💻 H
📖 第 1 页 / 共 2 页
字号:



/*========================================================================

	INPUT ELEMENT FUNCTIONS

=========================================================================*/

/*========================================================================
	WML_SetInputKeyValue
==========================================================================
	Update the value of the Key of the specified INPUT Element. Stores a 
	COPY of the value.

	Input: Element of type INPUT, Value and User Agent.
	Output: True if OK, FALSE otherwise.
==========================================================================*/
BOOL WML_SetInputKeyValue (pUA pUser, pELEMENTTYPE pElement, WCHAR *pchValue);


/*========================================================================
	WML_SetInputKeyValue
==========================================================================
	Returns a COPY of the Key value for the specified INPUT Element. If 
	none, the default value is returned and the variable is set with the
	value.

	Input: Element of type INPUT, Value and User Agent.
	Output: Pointer to WCHAR.
==========================================================================*/
WCHAR* WML_GetInputKeyValue (pUA pUser, pELEMENTTYPE pElement);





/*========================================================================

	ACTION ELEMENT FUNCTIONS

=========================================================================*/

/*========================================================================
	WML_UpdateEventVariables
==========================================================================
	Updates the variables associated with a task. If the Action is of the 
	type GO, PREV or REFRESH, it can include VAR element. These variables 
	are then set.    

	Input: Element and User Agent.
	Output: -
==========================================================================*/
void WML_UpdateEventVariables (pUA pUser, pELEMENTTYPE pAction);


/*========================================================================
	WML_HandleEvent
==========================================================================
	The function HandleEvent accepts an intrinsic event (eg. ONTIMER) and 
	the ELEMENT (CARD) where it takes place. The appropriate action is 
	obtained, and is returned as an ELEMENT to be executed. The function 
	UpdateEventVariables is called if the fChangeVars is set, otherwise
	it is not called.

	Input: Actual User Agent, the element in which the event takes place 
		   (CARD), the type of the event and a boolean.
	Output: Pointer to an ELEMENT of one of the following types: PREV, 
			REFRESH, NOOP, GO or TEXT (in the case of an URL). If no 
			action, NULL is returned.
==========================================================================*/
pELEMENTTYPE WML_HandleEvent (pUA pUser, pELEMENTTYPE pElement, INT8 iEvent, 
							  BOOL fChangeVars);

/*========================================================================
	WML_HandleMMIAction
==========================================================================
    Returns the task for the specified element (DO, OPTION or A). The 
	function UpdateEventVariables is called if the fChangeVars is set, 
	otherwise it is not called.

	Input: Pointer to the User Agent the actual element and a boolean
	Output: Pointer to an ELEMENT of one of the following types: PREV, 
			REFRESH, NOOP, GO or TEXT (in the case of an URL). If no 
			action, NULL is returned.
==========================================================================*/
pELEMENTTYPE WML_HandleMMIAction (pUA pUser, pELEMENTTYPE pElement, BOOL fChangeVars);



							  


/*========================================================================

	TIMER ELEMENT FUNCTIONS

=========================================================================*/

/*========================================================================
	WML_GetTimer
==========================================================================
    Returns the value of the timer element.

	Input: Pointer to ELEMENT of type TIMER and User Agent
	Output: UINT32
==========================================================================*/
UINT32 WML_GetTimer (pUA pUser, pELEMENTTYPE pTimer);


/*========================================================================
	WML_StoreTimer
==========================================================================
	Sets a new value to the variable specified by the timer element. The 
	value is converted from an UINT32 to a string (WCHAR *)

	Input: Pointer to ELEMENT of type TIMER, User Agent and the new value 
		   (UINT32)
	Output: TRUE if OK, FALSE otherwise
==========================================================================*/
BOOL WML_StoreTimer (pUA pUser, pELEMENTTYPE pTimer, UINT32 iValue);





							  
/*========================================================================

	WML ELEMENT FUNCTIONS 

=========================================================================*/

/*========================================================================
	WML_GetNextElement
==========================================================================
	The function returns the next element on the same level as the 
	specified element. 

	NOTE! All concecutive Type_Inline_Text, Type_Table_Text, Type_Entity,
	and Type_Ext are treated as ONE element to conform with the 
	WML_GetString and WML_GetStringLength functions.

	Input: ELEMENTTYPE*
	Output: ELEMENTTYPE* or NULL
==========================================================================*/
pELEMENTTYPE WML_GetNextElement (pELEMENTTYPE pElement);


/*========================================================================
	WML_GetCard
==========================================================================
    Returns the named CARD in the specified DECK. If the CARD is not 
	found, the first card is returned.

	Input: Pointer to User Agent and the Name of the Card
	Output: Pointer to ELEMENT of CARD, NULL if	no card found.
==========================================================================*/
pELEMENTTYPE WML_GetCard (pUA pUser, WCHAR *pchName);


/*========================================================================
	WML_GetNextCard
==========================================================================
    Returns the next CARD for the specified User Agent, and sets it to be 
	the Current Card. If the current card is the last, the attribute
	pCurrentCard in pUser is not changed.

	Input: Pointer to the User Agent
	Output: Pointer to ELEMENT of CARD, NULL if not found.
==========================================================================*/
pELEMENTTYPE WML_GetNextCard (pUA pUser);


/*========================================================================
	WML_GetCardTitle
==========================================================================
	Returns a COPY of the title of the specified CARD.

	Input: Pointer to CARD and the User Agent
	Output: Pointer to WCHAR
==========================================================================*/
WCHAR* WML_GetCardTitle (pUA pUser, pELEMENTTYPE pCARD);


/*========================================================================
	WML_GetTemplateDO
==========================================================================
	Returns the first TEMPLATEDO element in the specified CARD.

	Input: Pointer to CARD
	Output: Pointer to TEMPLATEDOTYPE, NULL if none.
==========================================================================*/
pTEMPLATEDOTYPE WML_GetTemplateDO (pELEMENTTYPE pCARD);


/*========================================================================
	WML_GetNextTemplateDO
==========================================================================
	Returns the next TEMPLATEDO element.

	Input: Pointer to TEMPLATEDO
	Output: Pointer to TEMPLATEDOTYPE, NULL if no more.
==========================================================================*/
pTEMPLATEDOTYPE WML_GetNextTemplateDO (pTEMPLATEDOTYPE pTemplateDO);


/*========================================================================
	WML_GetDOFromTemplate
==========================================================================
    Returns the pointer to the DO element in the TEMPLATEDOTYPE struct.

	Input: Pointer to TEMPLATEDO
	Output: Pointer to ELEMENT.
==========================================================================*/
pELEMENTTYPE WML_GetDOFromTemplate (pTEMPLATEDOTYPE pTemplateDO);


/*========================================================================
	WML_CheckAccessElement
==========================================================================
	Checks the ACCESS element against an URL. If the check is OK, TRUE is 
	returned, otherwise FALSE is returned.

	Input: ACCESS element, URL (BYTE *)
	Output: TRUE/FALSE
==========================================================================*/
BOOL WML_CheckAccessElement (pELEMENTTYPE pAccess, BYTE *pbURL, BYTE *pbDefaultDomain);


/*========================================================================
	WML_NewContext
==========================================================================
	This function empties the variable table and removes all history 
	entries but the newest.

	Input: User agent
	Output: -
==========================================================================*/
void WML_NewContext (pUA pUser);


/*========================================================================
	UApragmaFromScript
==========================================================================
	Script function

	Input: -
	Output: -
==========================================================================*/
void UApragmaFromScript(pUA userAgent, WCHAR** ppwchPropertyName, 
						WCHAR** ppwchContent, WCHAR** ppwchScheme );


/*========================================================================
	WML_IsPEmpty
==========================================================================
	Examines if a p element is insignificant  (NULL, empty or just white 
	space).

	Input: User agent and PELEMENT
	Output: TRUE if insignificant, FALSE otherwise
==========================================================================*/
BOOL WML_IsPEmpty (pUA pUser, pELEMENTTYPE pPElement);


/*========================================================================
	WML_TrimTextWCHAR
	WML_TrimTextBYTE
==========================================================================
    Removes all insignificant white space in a null-terminated text. The 
	text is modified. The iMode parameter specifies which of the leading 
	and trailing white space that should be removed. (E.g., if LEFT is 
	specified, all leading white space are removed.)

	Input: WCHAR* / BYTE*
	Output: TRUE if text ends with a white space, FALSE otherwise
==========================================================================*/
BOOL WML_TrimTextWCHAR (WCHAR *pchText, UINT8 iMode);
BOOL WML_TrimTextBYTE (BYTE *pbText, UINT8 iMode);


/*========================================================================
	WML_GetTextEncodForm 
==========================================================================
	Returns the actual text encoding format (UTF-8 or UCS_2) in IANA code.

	Input: Pointer to User Agent
	Output: Integer (consult PortingGuide)
==========================================================================*/
INT16 WML_GetTextEncodForm (pUA pUser);


/*========================================================================
	WML_GetString
==========================================================================
    The function returns a COPY of the string created of all concecutive 
	elements of the type Type_Inline_Text, Type_Table_Text, Type_Entity,
	or Type_Ext. (The variables in the string are set)

	Input: Pointer to ELEMENTTYPE of type Type_Inline_Text, Type_Entity,
		   Type_Table_Text, or Type_ExtType_Text and a User Agent
	Output: WCHAR* or NULL
==========================================================================*/
WCHAR *WML_GetString (pUA pUser, pELEMENTTYPE pElement);


/*========================================================================
	WML_GetStringLength
==========================================================================
    The function returns the length of the string created of all 
	concecutive elements of the type Type_Inline_Text, Type_Table_Text, 
	Type_Entity, or Type_Ext. (The variables in the string are set)

	Input: Pointer to ELEMENTTYPE of type Type_Inline_Text, Type_Entity,
		   Type_Table_Text, or Type_ExtType_Text and a User Agent
	Output: UINT32
==========================================================================*/
UINT32 WML_GetStringLength (pUA pUser, pELEMENTTYPE pElement);


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -