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

📄 wap_types.h

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

/*******************************************************************************

					CONDAT (UK)

********************************************************************************                                                                              

 This software product is the property of Condat (UK) Ltd and may not be
 disclosed to any third party without the express permission of the owner.                                 
                                                                              
********************************************************************************

 $Project name:                                                   
 $Project code:	                                                           
 $Module:		
 $File:		    wap_types.h
 $Revision:		                                                      
                                                                              
 $Author:		Condat(UK)                                                         
 $Date:		                                                          
                                                                               
********************************************************************************
                                                                              
 Description:
 	Structures and constants common to both WAP and MMI task.
    
                        
********************************************************************************

 $History: wap_types.h

	20/05/2003 - SPR#1934 - SH - Synchronised latest with 1.7.0 version.
	   
 $End

*******************************************************************************/

#if defined (NEW_FRAME)

#include "typedefs.h"
#include "vsi.h"
#include "custom.h"
#include "gsm.h"

#else

#include "stddefs.h"
#include "custom.h"
#include "gsm.h"
#include "vsi.h"

#endif

#define GWC_VERSION 408

#undef TRACE_WAP_CODEC
#define TRACE_WAP_WAPMMI
#undef TRACE_WAP_UDP
#undef TRACE_WAP_GLE
#undef TRACE_WAP_FRAME
#undef TRACE_WAP_AUS
#undef TRACE_WAP_AUS_CLNT

#define TRACE_ATBWAPACI
#define TRACE_ATBWAPAUI
#define TRACE_AUIWAP						

#define WAP_cache_size	4096			/* Amount of RAM used for WAP cache */

/* These are the only display constants directly
 * accessed by the WAP task.  All other constants in ATBWapAUI.h */
 
#define WAP_CHECKBOX_WIDTH		6		/* Width of checkbox */
#define WAP_CHECKBOX_HEIGHT		6		/* Height of checkbox */
#define WAP_CHECKBOX_TOP		1		/* Space from top of line to top of checkbox */
#define WAP_CHECKBOX_RIGHT		2		/* Space between right of checkbox and left of text */
#define WAP_CHECKBOX_INDENT		2		/* Indentation to draw inner square */

/* T_WAP_RES
 *
 * The two possible function outcomes, OK and fail.
*/

typedef enum
{
	WAP_FAIL,
	WAP_OK
} T_WAP_RES;

/* WAP_SELECTED_TYPE
 *
 * Specifies which type of element we have currently selected
 */

enum
{
	WAP_TEXT_NORM = 1,			/* Normal text */
	WAP_TEXT_INPUT,				/* An input element */
	WAP_TEXT_KEY,				/* A key */
	WAP_TEXT_OPTION,			/* An option */
	WAP_TEXT_OPTIONGROUP, 		/* An option group title */          
	WAP_TEXT_SELECT,			/* A select */
	WAP_SELECTABLE_IMAGE		/* A selectable image */
};

/* WAP_KEY_TYPE
 *
 * Specifies a type of WAP key (PREV, ACCEPT etc)
 */

enum
{
	WAP_KEY_ACCEPT,
	WAP_KEY_PREV,
	WAP_KEY_HELP,
	WAP_KEY_RESET,
	WAP_KEY_OPTIONS,
	WAP_KEY_DELETE,
	WAP_KEY_UNKNOWN
};


/* General type
 *
 * For use with events that only have 'object_id' parameter.
 */

typedef struct
{
	UBYTE object_id;
}
	T_MMI_WAP_CLOSE_VIEW_IND,
	T_MMI_WAP_DRAW_CARD_REQ,
	T_WAP_MMI_CARD_DRAW_COMPLETED_IND;

/* T_MMI_WAP_START_IND/T_MMI_WAP_TERMINATE_IND
 * 
 * Dummy empty structures, required by wap_codec to send start & termination events.
 */

typedef struct
{
	UBYTE dummy;
} T_MMI_WAP_READY_IND,
T_MMI_WAP_START_IND,
T_MMI_WAP_CACHE_PREPARE_IND;
typedef struct
{
	UBYTE access_type;
} 
T_MMI_WAP_TERMINATE_IND;



/* T_MMI_WAP_READY_CNF
 * 
 * Indicate that a WAP operation is complete.
 */
typedef struct
{
	UBYTE event_id;
}
T_WAP_MMI_READY_CNF;


/* T_MMI_WAP_NEW_VIEW_IND
 * 
 * Create a new view with the width, height and object_id provided.
 */
 
typedef struct
{
	UBYTE 	    object_id;						/* The current session */
	UBYTE		uaMode;							/* User agent mode */
	USHORT 		view_width;						/* Width in pixels of the view */
	USHORT 		view_height;					/* Height in pixels of the view */
	UBYTE		font_height;					/* Height in pixels of a character in the font */
	U32			font_width_length;				/* Length of the font table (should be 256) */
	UBYTE		*font_width;					/* Pointer to the table of character widths */
	UBYTE		unicode_width;					/* Fixed width of unicode font */
	UBYTE		unicode_height;					/* Fixed height of unicode font */
} T_MMI_WAP_NEW_VIEW_IND;


/* Config Types
 *
 * The two configuration types, IntConfig and StrConfig
 */

typedef enum
{
	WAP_IntConfig,
	WAP_StrConfig
} T_WAP_CONFIG_TYPE;

/* Param types
 *
 * The AUS browser has its own "ConfigInt" type which is passed as param
 * in the event MMI_WAP_CONNECTION_CONFIGURE_IND.  However, other
 * param values are required for additional configurations.  These are defined here
 * and start at 1000 to avoid conflict with the AUS values.
 */
 
typedef enum
{
	WAP_additionalConfig = 1000,		/* Use this value to check whether a param is AUS or ours. */
	WAP_setPort1,
	WAP_setPort2
};



/* T_MMI_WAP_CONFIGURE_IND
 * 
 * Configuration information to send to the browser
 */
 
typedef struct
{
	UBYTE 	    			object_id;		/* The current session */
	UBYTE					type;			/* Type of the configuration parameter */
	USHORT					param;			/* Parameter to be changed */
	U32						intvalue;		/* Value for integer type configuration */
	U32						length;			/* Length of the value string */
	CHAR					*strvalue;		/* Value for string type configuration */
} T_MMI_WAP_CONFIGURE_IND;


/* T_MMI_WAP_CONNECTION_CONFIGURE_IND
 * 
 * Configuration information about connection to send to the browser
 */

typedef struct
{
	UBYTE 	    object_id;						/* The current session */
	UBYTE		type;							/* Type of the configuration parameter */
	UBYTE		channel_id;						/* Defines on which channel the configuration should be applied */
	USHORT		param;							/* Parameter to be changed */
	U32			intvalue;						/* Value for integer type configuration */
	U32			length;							/* Length of the value string */
	CHAR		*strvalue;						/* Value for string type configuration */
} T_MMI_WAP_CONNECTION_CONFIGURE_IND;


/* T_MMI_WAP_DOWNLOAD_URL_IND
 * 
 * Information about a URL to download
 */

typedef struct
{
	UBYTE 	    object_id;						/* The current session */
	U32			url_length;						/* location length*/
	CHAR		*Url;							/* location to go to*/
	BOOL		reload;							/* if true, searches the network for this URL*/
} T_MMI_WAP_DOWNLOAD_URL_IND;


/* Browse control types
 *
 * For use with T_MMI_WAP_BROWSE_CONTROL_IND
 */

typedef enum
{
	WAP_DOWNLOAD_STOP,
	WAP_CARD_REFRESH,
	WAP_CARD_DISPLAY,
	WAP_CARD_GO_BACK,
	WAP_KEY_UP,
	WAP_KEY_DOWN,
	WAP_KEY_LEFT,
	WAP_KEY_RIGHT,
	WAP_KEY_SELECT,
	WAP_KEY_CANCEL,
	WAP_KEY_SCROLL,
	WAP_BLOCK_VIEW,
	WAP_UNBLOCK_VIEW
} WAP_CONTROL_TYPES;


/* T_MMI_WAP_BROWSE_CONTROL_IND
 * 
 * Sends some control command to the browser
 */

typedef struct
{
	UBYTE 	    object_id;	
	UBYTE 		browse_command;
	USHORT		browse_parameter;
} T_MMI_WAP_BROWSE_CONTROL_IND;

/* T_WAP_MMI_CONTROL_IND
 * 
 * Status information
 */

typedef struct
{
	UBYTE 	    object_id;	
	UBYTE		status_code;					/* Contains status information */
	SHORT		error_code;						/* Contains error information */
	BOOL		play_standard_click;			/* Requests MMI to play a standard sound */
} T_WAP_MMI_CONTROL_IND;


/* T_MMI_WAP_KEY_SELECTED_IND
 * 
 * Send the id of the selected WAP key. To the AUS Browser
 */


typedef struct
{
	UBYTE 	    object_id;	
	USHORT		keyId;							/* Key Identifier */
}T_MMI_WAP_KEY_SELECTED_IND;



/* T_WAP_KEY
 * 
 * Size and position of an element, screen etc.
 */

typedef struct
{
	UBYTE 	    object_id;	
	USHORT		keyId;							/* Key identifier */
	UBYTE		key_type;						/* Key type (PREV, ACCEPT etc) */
	U32			label_length;					/* Key text length */
	USHORT		*Label;							/* Key associated text */
} T_WAP_MMI_NEW_KEY_IND;


/* T_WAP_INPUT_DIALOG
 * 
 * Properties of an input dialog
 */

typedef struct
{
	UBYTE 	    object_id;	
	UBYTE		dialog_id;						/* Identifier of the requested dialog */
	void* 		dialog_pointer;					/* Pointer to the dialog (GLE requirement) */
	BOOL		is_password;					/* True if the input is a password */
	BOOL		empty_ok;						/* True if the answer can be an empty string */
	UBYTE		visible;						/* How many characters should be visible */
	UBYTE		size;							/* How many characters can be handled */
	U32			title_length;					/* Length of the title */
	USHORT		*Title;							/* Title of the editor */
	U32			input_length;					/* Length of the text */
	USHORT		*Input;							/* Text */
	U32			format_length;					/* Length of the format field */
	USHORT		*Format;						/* Possible format of the text (date, numeric etc) */
} T_WAP_MMI_INPUT_DIALOG_REQ;


/* T_WAP_INPUT_DIALOG_CNF
 * 
 * Properties of the confirmation of an input dialog
 */

typedef struct
{
	UBYTE 	    object_id;	
	UBYTE		dialog_id;						/* Identifier of the requested dialog */
	void* 		dialog_pointer;					/* Pointer to the dialog (GLE requirement) */
	U32			text_length;					/* Length of the edited text */
	USHORT		*Text;							/* Text after being edited */
	BOOL		edited;							/* True if the text has been changed */
} T_MMI_WAP_INPUT_DIALOG_CNF;


/* T_WAP_PASSWORD_DIALOG
 * 
 * Properties of a password dialog
 */

typedef struct
{
	UBYTE 	    object_id;	
	UBYTE		dialog_id;						/* Identifier of the requested dialog */
	UBYTE		dialog_type;					/* Type of the password, depending on server, proxy etc */
	U32			realm_length;					/* SPR#2393 - Length of realm string */
	char		*Realm;							/* SPR#2393 - Realm - info string on password dialog */
} T_WAP_MMI_PASSWORD_DIALOG_REQ;


/* T_WAP_PASSWORD_DIALOG_CNF
 * 
 * Properties of the confirmation of a password dialog
 */

typedef struct
{
	UBYTE 	    object_id;	
	UBYTE		dialog_id;						/* Identifier of the requested dialog */
	U32			input_length;					/* Length of initial input string */
	CHAR		*Input;							/* The answer to the input field (user name) */
	U32			password_length;				/* Length of password string */
	CHAR		*Password;						/* The answer to the password dialog */
} T_MMI_WAP_PASSWORD_DIALOG_CNF;


/* T_WAP_CONFIRM_DIALOG
 * 
 * Properties of a confirmation dialog
 */

typedef struct
{
	UBYTE 	    object_id;	

⌨️ 快捷键说明

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