comparison src/aci2/bmi/mmimmsmenu.c @ 3:93999a60b835

src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2016 00:29:36 +0000
parents
children
comparison
equal deleted inserted replaced
2:c41a534f33c6 3:93999a60b835
1 /*******************************************************************************
2
3 TI (Shanghai)
4
5 ********************************************************************************
6
7 This software product is the property of TI (Shanghai) Ltd and may not be
8 disclosed to any third party without the express permission of the owner.
9
10 ********************************************************************************
11
12 $Project name: TISHMMS Project
13 $Project code: BMI (6349)
14 $Module: MMS
15 $File: mmimmsmenu.h
16 $Revision: 1.0
17
18 $Author: Yan Bin(bin-yan@ti.com)
19 $Date: 26/08/03
20
21 ********************************************************************************
22
23 Description:
24
25 This module provides definitions of the types and
26 constants which are shared across the MMS
27 application modules.
28
29 ********************************************************************************
30 $History: MmiMMSMenu.c
31
32 May 11 2005 REF: MMI-SPR-29887 x0012849
33 To Implement the deferred MMS retrieval.
34 CRR: 25291 - xrashmic 14 Oct 2004
35 Description: The sent EMS is stored in unsent folder.
36 Solution: The Outbox has been removed, instead we now have Sent folder for the sent EMS
37
38 CRR 25277: 06 Oct 2004 - xpradipg
39 Description: Recieving an ems when inbox is open
40 Solution: A refresh event is sent to the Inbox list which inturn updates
41 the list
42
43 xrashmic 19 Aug, 2004 Bug: 2, 3, 36 and 42
44 All the status screen, .i.e sending, receiving etc. are displayed separatly for the MMS module.
45 Previously the WAP screens were being used.
46
47 26/08/03 Original TI(Shanghai) BMI version.
48
49 $End
50
51 *******************************************************************************/
52
53 #define MMI_MMSMENU_C
54
55 #define ENTITY_MFW
56
57 /* includes */
58 #include <string.h>
59 #include <stdio.h>
60 #include <stdlib.h>
61
62 #if defined (NEW_FRAME)
63
64 #include "typedefs.h"
65 #include "vsi.h"
66 #include "pei.h"
67 #include "custom.h"
68 #include "gsm.h"
69
70 #else
71
72 #include "STDDEFS.H"
73 #include "custom.h"
74 #include "gsm.h"
75 #include "vsi.h"
76
77 #endif
78 #include "prim.h"
79
80 #include "mfw_mfw.h"
81 #include "mfw_win.h"
82 //#include "mfw_edt.h"
83 #include "mfw_tim.h"
84 #include "mfw_phb.h"
85 #include "ksd.h"
86 #include "psa.h"
87 #include "mfw_sms.h"
88 #include "mfw_smsi.h"
89 #include "mfw_icn.h"
90 #include "mfw_mnu.h"
91 #include "mfw_lng.h"
92 #include "mfw_sat.h"
93 #include "mfw_kbd.h"
94 #include "mfw_nm.h"
95
96
97 #include "dspl.h"
98
99 #include "MmiMain.h"
100 #include "MmiDummy.h"
101 #include "MmiMmi.h"
102
103 #include "MmiDialogs.h"
104 #include "MmiLists.h"
105 #include "MmiMenu.h"
106 #include "MmiSoftKeys.h"
107 //#include "MmiEditor.h"
108 #include "MmiBookShared.h"
109 #include "mmimmsmenu.h"
110 #include "mmimmsbox.h"
111 //#include "mmismssend.h"
112 //#include "mmiSmsIdle.h"
113
114 #include "cus_aci.h"
115
116 #include "mfw_ffs.h"
117 //#include "pcm.h"
118
119 #include "mmiColours.h"
120
121 extern T_MFW_HND MMSCreate_start(T_MFW_HND parent_window, MfwMnuAttr *menuAttr);
122
123 //xrashmic 19 Aug, 2004 Bug: 2, 3, 36 and 42
124 int MMSactive=FALSE;
125 //CRR 25277: 06 Oct 2004 - xpradipg
126 //stores the window handle for the MMS Inbox listing
127 MfwHnd mmsboxwinhnd;
128 /*******************************************************************************
129
130 $Function: M_exeMMSCreate
131
132 $Description: This function is called when the user press Create MMS in the
133 main MMS menu
134
135 $Returns: Execution status
136
137 $Arguments: m - menu handler
138 i - Menu item selected
139
140 *******************************************************************************/
141
142 int M_exeMMSCreate(MfwMnu* m, MfwMnuItem* i)
143 {
144 T_MFW_HND win = mfwParent(mfw_header());
145 //xrashmic 19 Aug, 2004 Bug: 2, 3, 36 and 42
146 //This flag is set as soon as we enter the MMS create screen. So that all the status/error information
147 // is passed to the MMS module.
148 MMSactive=TRUE;
149 #ifdef FF_MMI_MMS
150 /* Call the function that manages Create MMS */
151 MMSCreate_start(win, NULL);
152 #endif
153
154 return 1;
155 }
156
157 /*******************************************************************************
158
159 $Function: M_exeEMSCreate pinghua add for EMS test add
160
161 $Description: This function is called when the user press Create MMS in the
162 main MMS menu
163
164 $Returns: Execution status
165
166 $Arguments: m - menu handler
167 i - Menu item selected
168
169 *******************************************************************************/
170
171 int M_exeEMSCreate(MfwMnu* m, MfwMnuItem* i)
172 {
173 T_MFW_HND win = mfwParent(mfw_header());
174
175 /* Call the function that manages Create EMS */
176 EMSCreate_start(win, NULL);
177 //T_MFW_HND EMSCreate_start(T_MFW_HND parent_window, MfwMnuAttr *menuAttr);
178
179 return 1;
180 }
181
182 /*******************************************************************************
183
184 $Function: M_exeMMSInbox
185
186 $Description: This function is called when the user press MMS inbox in the
187 main MMS menu
188
189 $Returns: Execution status
190
191 $Arguments: m - menu handler
192 i - Menu item selected
193
194 *******************************************************************************/
195
196 int M_exeMMSInbox(MfwMnu* m, MfwMnuItem* i)
197 {
198 T_MFW_HND win = mfwParent(mfw_header());
199
200 /* Call the function that manages Inbox */
201 //CRR 25277: 06 Oct 2004 - xpradipg
202 //The Inbox window handle is being assigned
203 mmsboxwinhnd = MMSBox_start(win, (MfwMnuAttr*)MMS_INBOX);
204
205 return 1;
206 }
207
208 /*******************************************************************************
209
210 $Function: M_exeMMSUnsent
211
212 $Description: This function is called when the user press MMS outbox in the
213 main MMS menu
214
215 $Returns: Execution status
216
217 $Arguments: m - menu handler
218 i - Menu item selected
219
220 *******************************************************************************/
221 int M_exeMMSUnsent(MfwMnu* m, MfwMnuItem* i)
222 {
223 T_MFW_HND win = mfwParent(mfw_header());
224
225 /* Call the function that manages Create MMS */
226 MMSBox_start(win, (MfwMnuAttr*)MMS_UNSENT);
227
228 return 1;
229 }
230
231 /*******************************************************************************
232
233 $Function: M_exeMMSSent
234
235 $Description: This function is called when the user press MMS Sent in the
236 main MMS menu.
237 CRR: 25291 - xrashmic 14 Oct 2004
238 The Outbox has been removed, instead we now have Sent folder in MMS
239
240 $Returns: Execution status
241
242 $Arguments: m - menu handler
243 i - Menu item selected
244
245 *******************************************************************************/
246 int M_exeMMSSent(MfwMnu* m, MfwMnuItem* i)
247 {
248 T_MFW_HND win = mfwParent(mfw_header());
249
250 /* Call the function that manages Create MMS */
251 MMSBox_start(win, (MfwMnuAttr*)MMS_SENT);
252
253 return 1;
254 }
255
256 /*******************************************************************************
257
258 $Function: M_exeMMSSettings
259
260 $Description: This function is called when the user press MMS settings in the
261 main MMS menu
262
263 $Returns: Execution status
264
265 $Arguments: m - menu handler
266 i - Menu item selected
267
268 *******************************************************************************/
269 int M_exeMMSSettings(MfwMnu* m, MfwMnuItem* i)
270 {
271 T_MFW_HND win = mfwParent(mfw_header());
272
273
274 #ifdef FF_MMI_MMS
275 /* Call the function that manages Create MMS */
276 MMSSetting_start(win, NULL);
277 #endif
278
279 return 1;
280 }
281 // May 11 2005 REF: MMI-SPR-29887 x0012849
282 // New Function is added.
283 /*******************************************************************************
284 $Function: MmsRetrievalTypeRequest
285
286 $Description: This function is called when the user press MMS Retrieval Type in the
287 main MMS menu
288 $Returns: 1 always
289 $Arguments: m - menu handler
290 i - Menu item selected
291
292 *******************************************************************************/
293 int MmsRetrievalTypeRequest(MfwMnu* m, MfwMnuItem* i)
294 {
295 int index = m->lCursor[m->level];
296 T_DISPLAY_DATA DisplayInfo;
297 T_MFW_HND win = mfwParent(mfw_header());
298 int TextId2;
299 int8 Result;
300 BOOL RetrievalType=FALSE;
301 TRACE_FUNCTION("MmsRetrievalTypeRequest");
302 switch(index)
303 {
304 case 0:
305 Result=flash_mms_retrieval_type_write( 0);
306 if(0 == Result)
307 TextId2 = TxtChanged ;
308 else
309 TextId2 = TxtFailed;
310 break;
311 case 1:
312 Result=flash_mms_retrieval_type_write( 1);
313 if(0 == Result)
314 TextId2 = TxtChanged ;
315 else
316 TextId2 = TxtFailed;
317 break;
318 case 2:
319 flash_mms_retrieval_type_read(&RetrievalType);
320 if(0 == RetrievalType) // immediate
321 TextId2 = TxtImmediate;
322 else
323 TextId2 = TxtDeferred;
324 break;
325 default:
326 break;
327 }
328 dlg_initDisplayData_TextId( &DisplayInfo, TxtSoftOK, TxtNull,TxtRetrieveCondition, TextId2, COLOUR_POPUP);
329 dlg_initDisplayData_events( &DisplayInfo, (T_VOID_FUNC)NULL, THREE_SECS, KEY_LEFT );
330 info_dialog(win,&DisplayInfo);
331 return 1;
332 }
333 #undef MMI_MMSMENU_C
334