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

📄 atbdata.h

📁 GSM手机设计软件代码
💻 H
字号:
/********************************************************************************                                                                              

 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:		    ATBData.h
 $Revision:		                                                      
                                                                              
 $Author:		Condat(UK)                                                         
 $Date:		                                                          
                                                                               
********************************************************************************
                                                                              
 Description:
 	Common data for the ATB.
    
                        
********************************************************************************

 $History: ATBData.h

	15/05/2003 - SPR#1983 - SH - Updated to latest from 1.6.3 version.
	   
 $End

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


#ifndef ATBDATA
#define ATBDATA

#define URL_MAX_LEN 			100		/* Max no. of characters for URL */
#define NUMBER_PADDING 			4		/* History list has a number in front of it; this is how long this is in characters, including "." and " " */
#define PROFILENAME_MAX_LEN		12		/* Max no. of characters for profile title */
#define OPTIONS_MAX_LEN 		12		/* ...options menu entries */
#define NUMBER_MAX_LEN    		20		/* ...dialup number */
#define IPADDRESS_MAX_LEN		15		/* ...IP address */
#define SOFTKEY_MAX_LEN			20		/* ...soft key text */
#define INPUT_MAX_LEN			100		/* ...standard WML editor */
#define USERNAME_MAX_LEN 		20		/* ...ISP username */
#define PASSWORD_MAX_LEN 		20		/* ...ISP password */
#define CARD_TITLE_MAX_LEN		20		/* ...title of card */
#define TEXT_MAX_LEN			255		/* ...any text on the WAP card */
#define ERROR_MAX_LEN			50		/* ...error messages */

#define MAX_BOOKMARKS			15		/* maximum number of bookmarks */
#define MAX_HISTORY 			10		/* maximum number of history entries */
#define MAX_PROFILES 			5		/* Maximum number of profiles */

#define WAP_OBJECT_ID 1					/* Default View ID */
#define WAP_CHANNEL_ID 1				/* Default Channel ID */

/*
*		Status values
*/

enum
{
	ATB_WAP_NO_STATUS = 0,			/* Idle */
	ATB_WAP_DOWNLOADING,			/* Card is downloading */
	ATB_WAP_ONLINE_CONNECTION_CLOSED,		/* Connection has been closed */
	ATB_WAP_CONNECTING,				/* Connecting to WAP gateway */
	ATB_WAP_LOGGING_IN,				/* Logging in */
	ATB_WAP_ATTACHING,				/* Attaching GPRS */
	ATB_WAP_ATTACH_FAILED,			/* GPRS Attach failed */
	ATB_WAP_CARD_READING,			/* Card is being read in from cache or network */
	ATB_WAP_PLEASE_WAIT,			/* Please wait window */
	ATB_WAP_ACTIVATE_FAILED,		/* PDP Context Activation Failed */
	ATB_WAP_SHUTTING_DOWN,			/* WAP is shutting down */
	ATB_WAP_ERROR, 					/* General GPRS Error */
	ATB_WAP_DEACTIVATING			/* Waiting for a context to deactivate */
};

#define WAP_STATUS_SAVEHISTORY			0x00000001		/* Whether history list is saved */
#define WAP_STATUS_SCALEIMAGES			0x00000002		/* Whether images are scaled to fit the screen */

/* Extra error codes */

#define ERROR_GPRS_NOT_SUPPORTED				-1
#define ERROR_CALL_DISCONNECTED					-2
#define ERROR_COMMUNICATION_SERVER				-3  /* Corresponds to error type 7 */
#define ERROR_COMMUNICATION_GATEWAY				-4	/* Corresponds to error type 8 */
#define ERROR_UNEXPECTED						-5 /* Corresponds to error type 9 */
#define ERROR_SECURITY							-6 /* Corresponds to error type 16 */

/* Text Strings
*		
*  These are strings that the ATB will request from AUI.
*/

typedef enum
{
	WAP_STRING_DOWNLOADING,
	WAP_STRING_UPDATING,
	WAP_STRING_UNTITLED
};


/* Type of list
 *
 * As well as a generic type, lists are for bookmarks, history, profiles, options menu and
 * for URLs.  A URL list is associated with each of the bookmarks and history lists.
 */

typedef enum
{
	WAP_GENERIC_LIST,
	WAP_BOOKMARKS_LIST,
	WAP_HISTORY_LIST,
	WAP_PROFILES_LIST,
	WAP_PROFILES_SETUP,
	WAP_OPTIONS_LIST,
	WAP_URL_LIST
} WAP_LIST_TYPE;


/* T_WAP_LIST
 *
 * This is a generic list type for ATB and AUI.  The size of the list and the size of the entries
 * are stored so that the list can be handled by standard routines.  The generic list handling routines
 * have function names starting "ATB_wap_entry_".
 */
 
typedef struct
{
	WAP_LIST_TYPE	type;							/* Type of list */
	UBYTE			no_of_entries;					/* Number of entries stored */
	UBYTE			entry_size;						/* Entry size in characters */
	UBYTE			max_entries;					/* Maximum no. of entries */
	char			**Entry;						/* Pointers to the entries */
	BOOL			unicode;						/* TRUE if entries are unicode */
} T_WAP_LIST;


/* T_WAP_CONNECTION
 *
 * Connection type
 */
 
typedef enum
{
	WAP_TEMPORARY,
	WAP_CONTINUOUS
}T_WAP_CONNECTION;


/* T_WAP_SPEED
 *
 * Connection speed
 */
 
typedef enum
{
	WAP_ANALOGUE,
	WAP_ISDN9600,
	WAP_ISDN14400
}T_WAP_SPEED;


/* T_WAP_ACCESS
 *
 * Access type
 */

typedef enum
{
	WAP_GPRS_DATA,
	WAP_CS_DATA,
	WAP_SMS
} T_WAP_ACCESS;


/* T_WAP_PROFILE
 *
 * Structure to hold profile information.  All information here is stored in flash and
 * loaded into RAM for each session.  There may be many profiles stored in flash.
 */

typedef struct
{	
	USHORT		Title[CARD_TITLE_MAX_LEN+1];		/* The name of the profile.  */
	char		Homepage[URL_MAX_LEN+1];			/* The URL of the homepage */
	UBYTE		ConnectionType;						/* Temporary or Continuous */
	BOOL		Security;
	UBYTE		AccessType;							/* CSD or GPRS */
	USHORT		ResponseTimer;
	char		IPAddress1[IPADDRESS_MAX_LEN+1];
	char		IPAddress2[IPADDRESS_MAX_LEN+1];
	char		DialupNumber[NUMBER_MAX_LEN+1];
	USHORT		Port1;
	USHORT		Port2;
	char		APN[URL_MAX_LEN+1];
	char		Username[USERNAME_MAX_LEN+1];
	char		Password[PASSWORD_MAX_LEN+1];
	UBYTE		ConnectionSpeed;
} T_WAP_PROFILE;

/* WAP_ELEMENT_TYPE
 *
 * For buffering of WAP elements, specifies which of the four types an element is.
 */

typedef enum
{
	WAP_TEXT,
	WAP_FIELDSET,
	WAP_IMAGE,
	WAP_TABLE
} WAP_ELEMENT_TYPE;

/* T_WAP_ELEMENT
 *
 * To speed up redraws, the SEND_TEXT type events are buffered by the ATB.  This means that
 * WAP does not have to resend the entire card in the event of a redraw.  Each element is
 * stored as part of a chain, with a pointer to the next element in the chain.
 */
 
typedef struct WAP_ELEMENT
{
	WAP_ELEMENT_TYPE	type;
	void				*data;			/* Generic pointer to WAP_MMI_SEND_TEXT_IND etc */
	struct WAP_ELEMENT	*NextElement;
} T_WAP_ELEMENT;


/* T_WAP_VIEW
 *
 * Structure to hold view information.  Used to pass information between ATB and the UI.
 */

typedef struct WAP_VIEW
{
	UBYTE				object_id;				/* Object id, as used by GLE */
	UBYTE				channel;				/* channel, as used by AUS */
	UBYTE				ProfileId;				/* The id of the current profile */
	USHORT				browser_status;			/* Container of status flags. */
	T_WAP_PROFILE		*Profile;				/* Pointer to the current profile in RAM */
	T_WAP_LIST			*ProfilesList;			/* List of the names of all profiles in flash */
	UBYTE				Status;					/* Status flags (see above) */
	BOOL				CanGoBack;				/* True if the user can go "back" from the card */
	char				*URL;					/* The current URL */
	USHORT				*Title;					/* The title of the current card. */
	BOOL				CustSoftKeys;			/* True if softkeys are customised */
	USHORT				CustSoftKeyId;			/* Id of customised softkey */
	USHORT				cardWidth;				/* The width in pixels of the current card */
	USHORT				cardHeight;				/* The height in pixels of the current card */
	USHORT				cardXPosition;			/* X displacement of the view of the card */
	USHORT				cardYPosition;			/* Y displacement of the view of the card */
	BOOL				acceptUpdate;			/* TRUE if we can draw to the card */
	void				*UIdata;				/* Generic pointer for use by the User Interface */
	T_WAP_ELEMENT		*ElementHeader;			/* Pointer to the first element in the existing element chain */
	T_WAP_ELEMENT		*NewElementHeader;		/*Pointer to element chain currently being built */
	struct WAP_VIEW		*NextView;				/* Pointer to next element in the view chain */
	T_WAP_LIST			*History;				/* History */
	T_WAP_LIST			*HistoryURL;
	T_WAP_LIST			*Bookmarks;				/* ...and bookmark list */
	T_WAP_LIST			*BookmarksURL;
	SHORT				cId;					/* Call ID of CSD connection */
	BOOL				secondaryIP;			/* TRUE if secondary IP has been used */
} T_WAP_VIEW;
#endif

⌨️ 快捷键说明

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