IdleToolbarGprot.h
10.2 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
/*****************************************************************************
* 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:
* ---------
* IdleToolbarGprot.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* This file provides the exported interface for the applications involved in
* the OP12 Toolbar.
*
* 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!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifndef _MMI_IDLE_TOOLBAR_GPROT_H
#define _MMI_IDLE_TOOLBAR_GPROT_H
#include "MMI_features.h"
#ifdef __MMI_OP12_TOOLBAR__
#include "MMIDataType.h"
#include "custom_mmi_default_value.h"
/**********************************************************************
* Default constants and values
**********************************************************************/
/* Max number of new messages of a certain kind. */
#define MMI_TB_MAX_NEW_MESSAGE_NUM 4
/* Max number of missed calls. */
#define MMI_TB_MAX_NEW_MISSED_CALL_NUM 19
/**********************************************************************
* Type definitions
**********************************************************************/
/* Function prototype for the query function to get the information of the
event. */
typedef void (*mmi_tb_query_func_t)(S32 num);
/* Function prototype for the handler to process the event on the toolbar when
the user presses a key. */
typedef void (*mmi_tb_evnt_cbf_t)(U16 key_code, U16 key_type, void *user_data);
/* Function prototype for the handler to process the events which is in the
folding state. */
typedef void (*mmi_tb_multi_evnt_cbf_t)(U16 key_code, U16 key_type);
/**********************************************************************
* Enum definitions
**********************************************************************/
/* This enum defines the result of the query. */
typedef enum
{
MMI_TB_RESULT_OK, /* OK */
MMI_TB_RESULT_NOT_READY, /* APP is not ready and will update later */
MMI_TB_RESULT_UPDATE /* APP actively updates its content */
} mmi_tb_result_enum;
/* This enum defines the event type. */
typedef enum
{
MMI_TB_EVNT_MSG_BEGIN,
MMI_TB_EVNT_NEW_SMS = MMI_TB_EVNT_MSG_BEGIN, /* SMS */
MMI_TB_EVNT_NEW_MMS, /* MMS */
MMI_TB_EVNT_NEW_VOICE_MAIL, /* Voice mail */
MMI_TB_EVNT_NEW_EMAIL, /* Email */
MMI_TB_EVNT_NEW_IM, /* Instatn messaging */
MMI_TB_EVNT_NEW_WAP_PUSH, /* WAP push */
MMI_TB_EVNT_NEW_CELL_BROADCAST, /* Cell broadcast */
MMI_TB_EVNT_MSG_END,
MMI_TB_EVNT_MISSED_CALL = MMI_TB_EVNT_MSG_END, /* Missed call */
MMI_TB_EVNT_NUM
} mmi_tb_evnt_enum;
/**********************************************************************
* Structure definitions
**********************************************************************/
/* This structure defines the event shown on the toolbar. */
typedef struct
{
S8 *subject; /* Subject */
U16 icon; /* Icon ID */
MMI_BOOL is_time_present; /* Is the time present for the event */
MYTIME time; /* Time of the event */
void *user_data; /* User data associated with this event */
} mmi_tb_evnt_struct;
/**********************************************************************
* Public APIs
**********************************************************************/
/*****************************************************************************
* FUNCTION
* mmi_tb_evnt_answer
* DESCRIPTION
* This function is called by APP to provide the answer about new events.
* PARAMETERS
* type [IN] Event type
* result [IN] Result of answer
* total_num [IN] Total number of new events
* num_of_data [IN] The sizeof evnt array
* evnt [IN] Array of events required by the toolbar
* single_hdlr [IN] Handler to process a single event
* multi_hdlr [IN] Handler to process multiple event
* RETURNS
* void
*****************************************************************************/
extern void mmi_tb_evnt_answer(
mmi_tb_evnt_enum type,
mmi_tb_result_enum result,
S32 total_num,
S32 num_of_evnt,
mmi_tb_evnt_struct *evnt,
mmi_tb_evnt_cbf_t single_hdlr,
mmi_tb_multi_evnt_cbf_t multi_hdlr);
/*****************************************************************************
* FUNCTION
* mmi_tb_entry_toolbar_setting
* DESCRIPTION
* This function shows the toolbar setting screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void mmi_tb_entry_toolbar_setting(void);
/*****************************************************************************
* FUNCTION
* mmi_tb_proc_message_um
* DESCRIPTION
* This function processes a folded menu item for SMS/MMS shown in the message
* moudle.
* PARAMETERS
* key_code [IN] Key code
* key_type [IN] Key type
* RETURNS
* void
*****************************************************************************/
extern void mmi_tb_proc_message_um(U16 key_code, U16 key_type);
/*****************************************************************************
* FUNCTION
* mmi_tb_is_set_on
* DESCRIPTION
* This function checks whether the user switches on the toolbar. Note that
* even though the user switches on the toolbar, it does not mean the toolbar
* is enable because the SIM card might not be inserted or it is in flight
* mode. To know whether the toolbar is used or not actually, mmi_tb_is_enable
* should be used.
* PARAMETERS
* void
* RETURNS
* If toolbar is set on, return MMI_TRUE; otherwise, return MMI_FALSE.
*****************************************************************************/
extern MMI_BOOL mmi_tb_is_open(void);
/*****************************************************************************
* FUNCTION
* mmi_tb_is_set_on
* DESCRIPTION
* This function checks whether the user switches on the toolbar. Note that
* even though the user switches on the toolbar, it does not mean the toolbar
* is enable because the SIM card might not be inserted or it is in flight
* mode. To know whether the toolbar is used or not actually, mmi_tb_is_enable
* should be used.
* PARAMETERS
* void
* RETURNS
* If toolbar is set on, return MMI_TRUE; otherwise, return MMI_FALSE.
*****************************************************************************/
extern MMI_BOOL mmi_tb_is_set_on(void);
/*****************************************************************************
* FUNCTION
* mmi_tb_is_enable
* DESCRIPTION
* This function checks whether the toolbar is enable.
* PARAMETERS
* void
* RETURNS
* On enable, return MMI_TRUE; otherwise, return MMI_FALSE.
*****************************************************************************/
extern MMI_BOOL mmi_tb_is_enable(void);
/*****************************************************************************
* FUNCTION
* mmi_tb_initialization
* DESCRIPTION
* This function initializes the OP12 toolbar context.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void mmi_tb_initialization(void);
#endif /* __MMI_OP12_TOOLBAR__ */
#endif /* _MMI_IDLE_TOOLBAR_GPROT_H */