j2me_custom.h
8.56 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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
/*****************************************************************************
* 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) 2002
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* j2me_custom.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* This file is intends for customization of default Java midletsuites
*
* 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!
* 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 _J2ME_CUSTOM_H
#define _J2ME_CUSTOM_H
/*************************************************************************
* Include Customize Options
*************************************************************************/
/*************************************************************************
* Constant Definition
*************************************************************************/
// 20100430: Changed
#define J2ME_JSR_75_MAX_FIX_FILE_HANDLE_COUNT (4)
#define J2ME_JSR_75_MAX_SHARED_FILE_HANDLE_COUNT (6)
#define J2ME_JSR_75_FILE_HANDLER_RESERVE_COUNT (J2ME_JSR_75_MAX_FIX_FILE_HANDLE_COUNT * MAX_VM_INSTANCE_NUM)
#if (defined(__IJET_VM__) || defined(__NEMO_VM__)) && !defined(J2ME_SLIM_MEMORY_SUPPORT)
#define OGDR_SECURITY_SETTING
#endif /* __IJET_VM__ or __NEMO_VM__ */
#define DEBUG_ENABLE
typedef enum {
GAMETYPE_JAVA_GAME,
GAMETYPE_INFUSIO_EUREKA,
GAMETYPE_INFUSIO_AP,
GAMETYPE_SURFKITCHEN,
GAMETYPE_MUSICWAV,
GAMETYPE_INVALID_TYPE
} game_type_enum;
#ifdef SUPPORT_SURFKITCHEN
#define ALIAS_DRIVE_COUNT 3 /* Number of alias drives */
#else
#define ALIAS_DRIVE_COUNT 2 /* Number of alias drives */
#endif
#define SUPPORT_SURFKIT_DRIVE 1 /* 1 means support "surfkit" alias drive. Do NOT forget to configure SUPPORT_SURFKIT_DRIVE in DRAGONFLY_BB.mak also. */ /* Dennis Shih */
/*************************************************************************
* Structure Definition
*************************************************************************/
typedef struct j2me_virtual_file_info_struct_t
{
const int virtual_file_count;
const char **virtual_file_name;
const unsigned char **virtual_file_data;
const int *virtual_file_size;
} j2me_virtual_file_info_struct;
typedef struct j2me_normal_file_info_struct_t
{
const int normal_file_count;
const char **normal_file_name;
const unsigned char **normal_file_data;
const int *normal_file_size;
} j2me_normal_file_info_struct;
typedef struct j2me_custom_file_info_struct_t
{
const int default_mids_count;
j2me_virtual_file_info_struct virtual_file_info;
j2me_normal_file_info_struct normal_file_info;
} j2me_custom_file_info_struct;
typedef struct confpropty_setting_struct_t
{
char *key;
char *value;
} confpropty_setting_struct;
/* Normal midletsuite execuite VM run with normal heap/runtime memory size, however,
installation/update/list/getinfo etc use basice memory size if with application
shared memory support */
typedef struct j2me_custom_resource_info_struct_t
{
unsigned max_storage_space; /* maximum storage space limitation */
unsigned javaheap_space_size; /* java heap space size */
/* If with Application Shared Memory Management, needn't static memory */
long *javaheap_space; /* java heap space memory region */
unsigned javaruntimemem_space_size; /* java runtime memory pool size */
long *javaruntimemem_space; /* java runtime memory pool region */
char storage_drive; /* java storage drive/path */
confpropty_setting_struct *default_imp_property;
confpropty_setting_struct *default_app_property;
unsigned int max_installed_mids;
/*
* The original implementation on our platform for handling MT call on installing is as follows:
* when installing Java game, incomming call will suspend the installation and the installation will be resumed after the incomming call finished.
* But for passing the 7.1.5 test case of CMCC 1.0 spec, we'll add a compile option.
* When the compile option is ON, MTcall on installating will terminate the installation and the data for the installation will be cleaned up.
* The compile option definition will be "CMCC_7_1_5".
*/
char is_cmcc_715;
char* alias_drive[ALIAS_DRIVE_COUNT]; /* Dennis Shih */
int alias_drive_type[ALIAS_DRIVE_COUNT]; /* Dennis Shih */
} j2me_custom_resource_info_struct;
/* Custom event handling */
typedef int (*j2me_custom_handler_ptr) (void *param);
#define J2ME_CUSTOM_NULL_HANDLER (0)
#define J2ME_CUSTOM_EVENT_HANDLER (1)
#define J2ME_CUSTOM_EXTEND_HANDLER (2)
/* Customer can extend define their specific handler id in custom\j2me\j2me_custom.param.h */
/*************************************************************************
* External Declaration
*************************************************************************/
extern j2me_custom_file_info_struct *j2me_custom_file_info_ptr;
extern int j2me_default_game_count;
extern int virtual_file_count;
extern int game_j2me_default_game_count;
extern int game_virtual_file_count;
#ifdef __SUPPORT_INFUSIO__
extern j2me_custom_file_info_struct *eureka_custom_file_info_ptr;
extern int eureka_default_game_count;
extern int eureka_virtual_file_count;
#endif /* __SUPPORT_INFUSIO__ */
#ifdef SUPPORT_SURFKITCHEN
extern j2me_custom_file_info_struct *surfkitchen_custom_file_info_ptr;
extern int surfkitchen_default_game_count;
extern int surfkitchen_virtual_file_count;
#endif /* SUPPORT_SURFKITCHEN */
#ifdef SUPPORT_MUSICWAV
extern j2me_custom_file_info_struct *musicwav_custom_file_info_ptr;
extern int musicwav_default_game_count;
extern int musicwav_virtual_file_count;
#endif /* SUPPORT_MUSICWAV */
extern int j2me_custom_handler(unsigned int handle_id, void *param);
extern char* _jvm_get_dir_path(void);
extern j2me_custom_file_info_struct* _jvm_get_builtin_file_info(void);
#if defined(__MVM__)
#define __SUPPORT_NATIVE_INSTALLER__
// 20090330 Dennis BEGIN ----------
#ifdef __SUPPORT_NATIVE_INSTALLER__
#define __TCK_USE_NATIVE_INSTALLER__
#else
#undef __TCK_USE_NATIVE_INSTALLER__
#endif /* __SUPPORT_NATIVE_INSTALLER__ */
// 20090330 Dennis END ----------
#endif /* __IJET_VM__ or _MVM__ */
extern char* j2me_get_midp_version(void);
extern char* j2me_get_cldc_version(void);
extern char* j2me_get_platform_id_prop_name(void);
extern char* j2me_get_platform_id_prop_value(void);
extern char* j2me_get_cellid_prop_name(void);
extern char* j2me_get_rat_prop_name(void);
extern char* j2me_get_lac_prop_name(void);
extern char* j2me_get_hmcc_prop_name(void);
extern char* j2me_get_cmcc_prop_name(void);
extern char* j2me_get_hmnc_prop_name(void);
extern char* j2me_get_cmnc_prop_name(void);
#endif /* _J2ME_CUSTOM_H */