comparison g23m/condat/ms/src/bmi/ATBData.h @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /********************************************************************************
2
3 This software product is the property of Condat (UK) Ltd and may not be
4 disclosed to any third party without the express permission of the owner.
5
6 ********************************************************************************
7
8 $Project name:
9 $Project code:
10 $Module:
11 $File: ATBData.h
12 $Revision:
13
14 $Author: Condat(UK)
15 $Date:
16
17 ********************************************************************************
18
19 Description:
20 Common data for the ATB.
21
22
23 ********************************************************************************
24
25 $History: ATBData.h
26
27 xrashmic 17 Aug, 2005 MMI-SPR-31364
28 When it is detected that a very large page is being opened, the wap adapter sends a message.
29 We need to exit wap and display a error dialog as we have memory constraints.
30
31 xrashmic 29 Jun, 2005 MMI-SPR-32462
32 Patch given by Kyle for display of table border
33 May 11 2005 REF: MMI-SPR-29887 x0012849
34 To Implement the deferred MMS retrieval.
35
36 xrashmic 23 Feb, 2005 MMI-SPR-28222
37 Display appropriate dialogs when receive MMS fails due to MMS folder being full
38
39 xrashmic 08 Feb, 2005 MMI-SPR-27853
40 Error handling in sending MMS and also displaying the progress value
41
42 xreddymn Jan-11-2005 MMI-SPR-27618:
43 Added length parameter for WAP push messages
44
45 xrashmic 19 Aug, 2004 Bug: 2, 3, 36 and 42
46
47 15/05/2003 - SPR#1983 - SH - Updated to latest from 1.6.3 version.
48
49 $End
50
51 *******************************************************************************/
52 //#define CO_UDP_IP temp till xml file ready
53
54 #ifndef ATBDATA
55 #define ATBDATA
56
57 #define URL_MAX_LEN 150 /* SPR#1824 - SH - Increased - Max no. of characters for URL */
58 #define NUMBER_PADDING 4 /* History list has a number in front of it; this is how long this is in characters, including "." and " " */
59 #define PROFILENAME_MAX_LEN 20 /* Max no. of characters for profile title. SPR#2112 - Increased to 20. */
60 #define OPTIONS_MAX_LEN 20 /* ...options menu entries. SPR#2112 - Increased to 20. */
61 #define NUMBER_MAX_LEN 20 /* ...dialup number */
62 #define IPADDRESS_MAX_LEN 15 /* ...IP address */
63 #define SOFTKEY_MAX_LEN 20 /* ...soft key text SPR#1816 - SH - Increased this a little */
64 #define INPUT_MAX_LEN 100 /* ...standard WML editor */
65 #define USERNAME_MAX_LEN 20 /* ...ISP username */
66 #define PASSWORD_MAX_LEN 20 /* ...ISP password */
67 #define CARD_TITLE_MAX_LEN 20 /* ...title of card */
68 #define TEXT_MAX_LEN 255 /* ...any text on the WAP card */
69 #define ERROR_MAX_LEN 50 /* ...error messages */
70 #define WAP_PUSH_TITLE_MAX_LEN 32 /* MMI-SPR-27618 Jan 11 2005 - xreddymn: Max number of characters displayed when listing push messages */
71
72 #define MAX_BOOKMARKS 15 /* maximum number of bookmarks */
73 #define MAX_HISTORY 10 /* maximum number of history entries */
74 #define MAX_PROFILES 9 /* SPR#1824 - SH - Increased - Maximum number of profiles */
75
76 #define WAP_OBJECT_ID 1 /* Default View ID */
77 #define WAP_CHANNEL_ID 1 /* Default Channel ID */
78
79 /* SPR#2112 - SH - Some default profile values */
80 #define WAP_DEFAULT_PORT 9201
81 #define WAP_LOCAL_PORT 3
82
83 #define WAP_DEFAULT_RESPONSE_TIME 180
84 #ifdef FF_GPF_TCPIP
85 #define WAP_DOWNLOAD_LOCAL_PORT 4
86 #define WAP_DOWNLOAD_ID 1
87 #define WAP_NO_VIEW 0xFF /* Indicates no currently open view */
88 #define WAP_DOWNLOAD_VIEW 128
89
90 /* SPR#2086 - SH - Constants for PUSH */
91
92 #define WAP_PUSH_VIEW 130
93 #define WAP_DEFAULT_PORT_PUSH 2948
94 #define WAP_PUSH_MAX_MESSAGES 15 /* Maximum number of push messages that will be shown in list */
95
96 //xrashmic 17 Aug, 2005 MMI-SPR-31364
97 void ExitWAP(BOOL value);
98 #define WAP_OUT_OF_MEM 1
99 #define WAP_NONE 0
100 #endif
101
102 /*
103 * Status values
104 */
105
106 enum
107 {
108 ATB_WAP_NO_STATUS = 0, /* Idle */
109 ATB_WAP_DOWNLOADING, /* Card is downloading */
110 ATB_WAP_ONLINE_CONNECTION_CLOSED, /* Connection has been closed */
111 ATB_WAP_CONNECTING, /* Connecting to WAP gateway */
112 ATB_WAP_LOGGING_IN, /* Logging in */
113 ATB_WAP_ATTACHING, /* Attaching GPRS */
114 ATB_WAP_ATTACH_FAILED, /* GPRS Attach failed */
115 ATB_WAP_CARD_READING, /* Card is being read in from cache or network */
116 ATB_WAP_PLEASE_WAIT, /* Please wait window */
117 ATB_WAP_ACTIVATE_FAILED, /* PDP Context Activation Failed */
118 ATB_WAP_SHUTTING_DOWN, /* WAP is shutting down */
119 ATB_WAP_ERROR, /* General GPRS Error */
120 ATB_WAP_DEACTIVATING /* Waiting for a context to deactivate */
121 };
122
123 #define WAP_STATUS_SAVEHISTORY 0x00000001 /* Whether history list is saved */
124 #define WAP_STATUS_SCALEIMAGES 0x00000002 /* Whether images are scaled to fit the screen */
125 #ifdef FF_GPF_TCPIP
126 #define WAP_STATUS_PUSHMESSAGES 0x00000004 /* SPR#2086 - Whether or not push messages are displayed on receipt */
127 #endif
128
129 /* Extra error codes */
130
131 #define ERROR_GPRS_NOT_SUPPORTED -1
132 #define ERROR_CALL_DISCONNECTED -2 /* SPR#1656 - SH - Added this */
133 #define ERROR_COMMUNICATION_SERVER -3 /* SPR#1793 - SH - Corresponds to error type 7 */
134 #define ERROR_COMMUNICATION_GATEWAY -4 /* SPR#1793 - SH - Corresponds to error type 8 */
135 #define ERROR_UNEXPECTED -5 /* SPR#1793 - SH - Corresponds to error type 9 */
136 #define ERROR_SECURITY -6 /* SPR#1793 - SH - Corresponds to error type 16 */
137
138 #if defined (FF_MMI_MMS) && defined (FF_GPF_TCPIP)
139 //xrashmic 19 Aug, 2004 Bug: 2, 3, 36 and 42
140 //xrashmic 08 Feb, 2005 MMI-SPR-27853
141 // To display the different stages of MMS sending and receiving
142 typedef enum
143 {
144 MMS_SEND_PROGRESS = -30,
145 MMS_SEND_SUCCESS,
146 MMS_SEND_FAIL,
147 MMS_RECEIVE_PROGRESS, //Need to Modify this in mms_wap_comm.c
148 MMS_RECEIVE_SUCCESS, //xrashmic 23 Feb, 2005 MMI-SPR-28222 Need to Modify this in Mms_device_driver.c
149 MMS_RECEIVE_FAIL, //xrashmic 23 Feb, 2005 MMI-SPR-28222 Need to Modify this in Mms_device_driver.c
150 MMS_PLEASEWAIT,
151 MMS_ERROR,
152 MMS_SEND_START,
153 MMS_NO_MEMORY, //xrashmic 23 Feb, 2005 MMI-SPR-28222 Need to Modify this in Mms_device_driver.c
154 MMS_NOTIFICATION_PROGRESS, // x0012849 May 11 MMI-SPR-29887 Need to Modify this in Mms_Device_Driver.c Value = -20
155 MMS_NOTIFICATION_RECEIVED // x0012849 May 11 MMI-SPR-29887 Need to Modify this in Mms_Device_cust.c Value = -19
156 }MMS_STATUS_EVENT;
157 #endif
158
159 /* Text Strings
160 *
161 * These are strings that the ATB will request from AUI.
162 */
163
164 typedef enum
165 {
166 WAP_STRING_DOWNLOADING,
167 WAP_STRING_UPDATING,
168 WAP_STRING_UNTITLED /* SPR#1816 - SH */
169 };
170
171
172 /* Type of list
173 *
174 * As well as a generic type, lists are for bookmarks, history, profiles, options menu and
175 * for URLs. A URL list is associated with each of the bookmarks and history lists.
176 */
177
178 typedef enum
179 {
180 WAP_GENERIC_LIST,
181 WAP_BOOKMARKS_LIST,
182 WAP_HISTORY_LIST,
183 WAP_PROFILES_LIST,
184 WAP_OPTIONS_LIST,
185 WAP_URL_LIST
186 #ifdef FF_GPF_TCPIP /* SPR#2086 */
187 ,WAP_PROFILES_SETUP,
188 WAP_PUSH_LIST,
189 WAP_LIST_FINAL
190 #endif
191
192 } WAP_LIST_TYPE;
193
194
195 /* T_WAP_LIST
196 *
197 * This is a generic list type for ATB and AUI. The size of the list and the size of the entries
198 * are stored so that the list can be handled by standard routines. The generic list handling routines
199 * have function names starting "ATB_wap_entry_".
200 * SPR#1816 - SH - Added unicode flag
201 */
202
203 typedef struct
204 {
205 WAP_LIST_TYPE type; /* Type of list */
206 UBYTE no_of_entries; /* Number of entries stored */
207 UBYTE entry_size; /* Entry size in characters */
208 UBYTE max_entries; /* Maximum no. of entries */
209 char **Entry; /* Pointers to the entries */
210 BOOL unicode; /* TRUE if entries are unicode */
211 } T_WAP_LIST;
212
213
214 /* T_WAP_CONNECTION
215 *
216 * Connection type
217 */
218
219 typedef enum
220 {
221 WAP_TEMPORARY,
222 WAP_CONTINUOUS
223 }T_WAP_CONNECTION;
224
225
226 /* T_WAP_SPEED
227 *
228 * SPR#1827 - SH - Connection speed
229 */
230
231 typedef enum
232 {
233 WAP_ANALOGUE,
234 WAP_ISDN9600,
235 WAP_ISDN14400
236 }T_WAP_SPEED;
237
238
239 /* T_WAP_ACCESS
240 *
241 * Access type
242 */
243
244 typedef enum
245 {
246 WAP_GPRS_DATA = 0,
247 WAP_CS_DATA,
248 WAP_SMS
249 } T_WAP_ACCESS;
250
251
252 /* T_WAP_PROFILE
253 *
254 * Structure to hold profile information. All information here is stored in flash and
255 * loaded into RAM for each session. There may be many profiles stored in flash.
256 */
257
258 typedef struct
259 {
260 USHORT Title[CARD_TITLE_MAX_LEN+1]; /* The name of the profile. SPR#1816 - SH - Now unicode */
261 char Homepage[URL_MAX_LEN+1]; // The URL of the homepage
262 UBYTE ConnectionType; // Temporary or Continuous
263 BOOL Security;
264 UBYTE AccessType; /* CSD or GPRS */
265 USHORT ResponseTimer;
266 char IPAddress1[IPADDRESS_MAX_LEN+1];
267 char IPAddress2[IPADDRESS_MAX_LEN+1];
268 char DialupNumber[NUMBER_MAX_LEN+1];
269 USHORT Port1;
270 USHORT Port2;
271 char APN[URL_MAX_LEN+1];
272 char Username[USERNAME_MAX_LEN+1];
273 char Password[PASSWORD_MAX_LEN+1];
274 UBYTE ConnectionSpeed; /* SPR#1827 - SH - Store connection speed */
275 //xpradipg - Aug 4: Added four new members to the structure to extend the menu to accomdate
276 // WAP 2.0 menu items
277 #ifdef FF_GPF_TCPIP
278
279 char NameServer1[IPADDRESS_MAX_LEN+1];
280 char NameServer2[IPADDRESS_MAX_LEN+1];
281 BOOL PPGAuthentication;
282 BOOL WirelessProfiledHTTP;
283 #endif
284
285 } T_WAP_PROFILE;
286
287
288
289 #ifdef FF_GPF_TCPIP
290 //TISHMMS Project
291 typedef struct
292 {
293 char MmscAddress[URL_MAX_LEN+1]; // The MMS address
294 //UINT8_M4_E_IMAGE_SCALE_RULE_ENUM ucImageScaleRule; //M4_E_IMAGE_SCALE_RULE
295 //BOOL bIsDeliverReportNeed;
296 //BOOL bIsReadReplyNeed;
297 //M_TRISTATE_OPTION MmsHideOrigin;
298 //MM_S_TIME_STAMP MmsExpiryTime;//liuyu how to implement it?
299
300 //BOOL bIsStoreSent;
301 //BOOL bIsPayForReply;
302 //MM_E_PRIORITY MmsPriority;
303 //BOOL bIsReportsAllowed;
304 } T_MMS_PROFILE;
305 #endif
306
307 /* WAP_ELEMENT_TYPE
308 *
309 * For buffering of WAP elements, specifies which of the four types an element is.
310 */
311
312 typedef enum
313 {
314 WAP_TEXT,
315 WAP_FIELDSET,
316 WAP_IMAGE,
317 WAP_TABLE,
318 WAP_BORDER //kyle 29 Jun, 2005 MMI-SPR-32462
319 #ifdef FF_GPF_TCPIP
320 ,
321 WAP_PLUGIN_IMAGE//xrashmic 21 Jan, 2005 MMI-SPR-28223
322 #endif
323 } WAP_ELEMENT_TYPE;
324
325 /* T_WAP_ELEMENT
326 *
327 * To speed up redraws, the SEND_TEXT type events are buffered by the ATB. This means that
328 * WAP does not have to resend the entire card in the event of a redraw. Each element is
329 * stored as part of a chain, with a pointer to the next element in the chain.
330 */
331
332 typedef struct WAP_ELEMENT
333 {
334 WAP_ELEMENT_TYPE type;
335 void *data; /* Generic pointer to WAP_MMI_SEND_TEXT_IND etc */
336 struct WAP_ELEMENT *NextElement;
337 } T_WAP_ELEMENT;
338
339
340 /* T_WAP_VIEW
341 *
342 * Structure to hold view information. Used to pass information between ATB and the UI.
343 */
344
345 typedef struct WAP_VIEW
346 {
347 UBYTE object_id; /* Object id, as used by GLE */
348 UBYTE channel; /* channel, as used by AUS */
349 UBYTE ProfileId; /* The id of the current profile */
350 USHORT browser_status; /* Container of status flags. */
351 T_WAP_PROFILE *Profile; /* Pointer to the current profile in RAM */
352 T_WAP_LIST *ProfilesList; /* List of the names of all profiles in flash */
353 #ifdef CO_UDP_IP
354 UBYTE Status; /* Status flags (see above) */
355 #endif
356 BOOL CanGoBack; /* True if the user can go "back" from the card */
357 char *URL; /* The current URL */
358 USHORT *Title; /* The title of the current card. */
359 BOOL CustSoftKeys; /* True if softkeys are customised */
360 USHORT CustSoftKeyId; /* Id of customised softkey */
361 USHORT cardWidth; /* The width in pixels of the current card */
362 USHORT cardHeight; /* The height in pixels of the current card */
363 USHORT cardXPosition; /* X displacement of the view of the card */
364 USHORT cardYPosition; /* Y displacement of the view of the card */
365 BOOL acceptUpdate; /* TRUE if we can draw to the card */
366 void *UIdata; /* Generic pointer for use by the User Interface */
367 T_WAP_ELEMENT *ElementHeader; /* Pointer to the first element in the existing element chain */
368 T_WAP_ELEMENT *NewElementHeader; /*Pointer to element chain currently being built */
369 struct WAP_VIEW *NextView; /* Pointer to next element in the view chain */
370 T_WAP_LIST *History; /* History */
371 T_WAP_LIST *HistoryURL;
372 T_WAP_LIST *Bookmarks; /* ...and bookmark list */
373 T_WAP_LIST *BookmarksURL;
374 SHORT cId; /* Call ID of CSD connection */
375 BOOL secondaryIP; /* TRUE if secondary IP has been used */
376 } T_WAP_VIEW;
377 #endif