AMDef.h
9.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*******************************************************************************
* Filename:
* ---------
* AMDef.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* AM header file.
*
* Author:
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#ifndef AM_DEF_H
#define AM_DEF_H
// #define AM_TEST
#include "kal_public_api.h"
#include "kal_public_defs.h"
#include "fs_type.h"
#include "MMI_features.h"
#include "MMIDataType.h"
#include "liblist.h"
#include "AMGprot.h"
#include "AMProxy.h"
#define MMI_AM_ASSERT ASSERT
#define MMI_AM_LOG
#define MMI_AM_LOAD_RES_BUF_SIZE (4*1024) /* mmi_am_mre_load_resource_from_file() buffer size */
#define MMI_AM_MAX_APP_FILE_NAME 42 /* short file name use 8.3 format , the same to FMGR_MAX_FILE_LEN+1 */
#define MMI_AM_MAX_APP_FILE_PATH 52 /* ex: C:\mre\app1.vxp */
#define MMI_AM_MAX_APP_QUICK_START_PATH 260
#define MMI_AM_SEARCH_APP_TIMER_DELAY 0 /* search app timer delay */
#define MMI_AM_MAX_SHORTCUT_APP_FILE_PATH 60 /* shortcut app file name */
#define MMI_AM_MRE_FOLDER_SIZE 7 /* Ex: c:/mre/ */
#define MMI_AM_ASYN_SEARCH_NUM 25 /* The number of applications for each search */
#define MMI_AM_MAX_APP_NUM 200 /* the max value of am can display */
#define MMI_AM_VXP_MAX_FILE_NUM 5000 /* the max value of vxp files in mre folder */
#define MMI_AM_APP_ICON_W 45 /* app icon width */
#define MMI_AM_APP_ICON_H 45 /* app icon height */
#define MMI_AM_ROM_DIR 64 /* @ */
#define MMI_AM_MRE_HOME_DIR "mre"
#define MMI_AM_AS_FILE_NAME "phsh.vxp" /* AppStore file name */
#define MMI_AM_AS_TEMP_FILE_NAME "phsh.pht" /* AppStore temp file name */
#define MMI_AM_APP_LOGO "_MREApplogo30.img"
#define MMI_AM_APP_V20_LOGO "_MREApplogo.img"
#define MMI_AM_TEMP_SUFFIX "tmp" /* download temp file suffix */
#ifndef WIN32
#define MMI_AM_SEARCH_PATTERN "*.vxp" /* mre app file suffix */
#else
#define MMI_AM_SEARCH_PATTERN "*.dll" /* mre app file suffix */
#endif
#define MMI_AM_DOWNLOAD_LIST "download_list.dat" /* downloaded app list writed by AS */
#define MMI_AM_ICON_SIZE 4*1024 /* the maximum size of a icon */
#define MMI_AM_DOWNLOAD_BLOCK_SIZE 20*1024 /* 20K for VIP */
/*****************************************************************************
* Typedef
*****************************************************************************/
/* Search vxp files states */
typedef enum
{
SEARCH_NONE,
SEARCHING,
SEARCHING_CARD, /* Searching for plug in memory card */
SEARCH_DONE
} mmi_am_search_state_enum;
/* AM Shortcut App struct, excluding AppStore */
typedef struct
{
MMI_BOOL is_downloaded; /* is the app downloaded */
MMI_BOOL is_hs_shortcut; /* is the app set as home screen shortcut */
MMI_BOOL is_bg_started; /* is the app background start */
U16 icon_id; /* app icon resource id */
U16 name_id; /* app name resource id */
U8 *p_name; /* app name pointer (ZiMo) */
U32 name_size;
U32 name_len;
U16 path[MMI_AM_MAX_SHORTCUT_APP_FILE_PATH]; /* app full path */
} mmi_am_shortcut_app_struct;
/* AM AppStore struct */
typedef struct
{
MMI_BOOL is_downloaded; /* is the app downloaded */
MMI_BOOL is_hs_shortcut; /* is the app set as home screen shortcut */
MMI_BOOL is_bg_started; /* is the app background start */
U16 icon_id; /* app icon resource id */
U16 name_id; /* app name resource id */
U8 *p_name; /* app name pointer (ZiMo) */
U32 name_size;
U32 name_len;
U16 path[MMI_AM_MAX_SHORTCUT_APP_FILE_PATH]; /* app full path */
} mmi_am_appstore_struct;
/* AM Rom App struct */
typedef struct
{
S32 idx; /* display index in Category214 (rom app arrange after shortcup app) */
MMI_BOOL is_hs_shortcut; /* is the app set as home screen shortcut */
MMI_BOOL is_bg_started; /* is the app background start */
U8 *p_icon; /* app icon pointer (gif) */
U32 icon_size;
U8 *p_name; /* app name pointer */
U32 name_size;
U32 name_len;
U16 path[MMI_AM_MAX_APP_FILE_PATH]; /* app full path, Ex: C:\mre\0X12345678.rom */
} mmi_am_rom_app_struct;
/* filename and modify time struct */
typedef struct
{
U16 path[MMI_AM_MAX_APP_FILE_PATH]; /* app full path */
FS_DOSDateTime time; /* app file modify time */
} mmi_am_vxp_file_struct;
/* AM context struct */
typedef struct
{
void *dyn_mem_pool;
MMI_BOOL has_small_font; /* Are there Chinese small fonts(14 pixels). */
MMI_BOOL is_goback; /* is go back from app */
KAL_ADM_ID adm_pool_id; /* ADM pool id */
MMI_BOOL is_launch_vas; /* is launch AppStore */
MMI_BOOL is_card_plug_in; /* is memory card plug in */
MMI_BOOL is_card_plug_out; /* is memory card plug out */
MMI_BOOL is_app_in_card; /* using for memory card plug out */
MMI_BOOL is_alloc_asm_fail; /* allocate memory fail */
MMI_BOOL is_prompt_update_cdr; /* prompt user to update cdr */
MMI_BOOL is_launch_app; /* launch an application */
/* AM app lists */
mmi_am_appstore_struct appstore_list; /* AppStore list */
mmi_am_shortcut_app_struct *shortcut_app_list;
S32 shortcut_app_num; /* include AppStore */
mmi_am_rom_app_struct *rom_app_list;
S32 rom_app_num;
S32 vxp_app_num;
/* vxp file info list */
mre_list_t *vxp_file_list; /* all download app file info - mmi_am_vxp_file_struct */
/* mre folder handle */
FS_HANDLE card_mre_folder_hdl;
FS_HANDLE phone_mre_folder_hdl;
/* lf added for dla 2010-11-25 -s */
void *dla_h;
/* lf added for dla 2010-11-25 -e */
} mmi_am_cntx_struct;
/* AM async search struct */
typedef struct
{
S32 search_hdl; /* current search file handle */
mmi_am_search_state_enum search_state; /* state of search vxp files */
S8 cur_driver; /* current search driver */
} mmi_am_async_search_struct;
extern mmi_am_rom_app_struct *mmi_am_get_rom_appinfo_by_idx(S32 idx);
extern void mmi_am_delete_node_from_vxplist_by_index(S32 idx);
#endif /* AM_DEF_H */