|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDES |
|
22 #include "createMceTestSettingsDialog.h" |
|
23 |
|
24 // CONSTANTS |
|
25 |
|
26 const TInt KBufLength = 100; |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS ============================== |
|
29 |
|
30 // ---------------------------------------------------------------------------- |
|
31 // CCreateMceSettingsDialog::CCreateMceSettingsDialog( ) |
|
32 // . |
|
33 // ---------------------------------------------------------------------------- |
|
34 // |
|
35 CCreateMceSettingsDialog::CCreateMceSettingsDialog( |
|
36 CMCETestUIEngine& aEngine): |
|
37 iEngine(aEngine) |
|
38 |
|
39 { |
|
40 |
|
41 // No implementation required |
|
42 } |
|
43 |
|
44 // ---------------------------------------------------------------------------- |
|
45 // CCreateMceSettingsDialog::PreLayoutDynInitL() |
|
46 // . |
|
47 // ---------------------------------------------------------------------------- |
|
48 // |
|
49 void CCreateMceSettingsDialog::PreLayoutDynInitL() |
|
50 { |
|
51 CAknForm::PreLayoutDynInitL(); |
|
52 CAknPopupFieldText* popupFieldText = |
|
53 static_cast <CAknPopupFieldText*> (Control(EMceSettingsFCSession)); |
|
54 if(iEngine.IsFCSession()) |
|
55 { |
|
56 popupFieldText->SetCurrentValueIndex(1); |
|
57 } |
|
58 else |
|
59 { |
|
60 popupFieldText->SetCurrentValueIndex(0); |
|
61 } |
|
62 |
|
63 CAknPopupFieldText* popupFieldText10 = |
|
64 static_cast <CAknPopupFieldText*> (Control(EMceSettingsAudioPriority)); |
|
65 if( iEngine.iPriorityType == 1 ) |
|
66 { |
|
67 popupFieldText10->SetCurrentValueIndex(0); |
|
68 } |
|
69 else if( iEngine.iPriorityType == 2 ) |
|
70 { |
|
71 popupFieldText10->SetCurrentValueIndex(1); |
|
72 } |
|
73 else |
|
74 { |
|
75 popupFieldText10->SetCurrentValueIndex(2); |
|
76 } |
|
77 |
|
78 CAknPopupFieldText* popupFieldText11 = |
|
79 static_cast <CAknPopupFieldText*> (Control(EMceSettingsMultiCodecSupport)); |
|
80 if(iEngine.iMultiCodecSupport) |
|
81 { |
|
82 popupFieldText11->SetCurrentValueIndex(1); |
|
83 } |
|
84 else |
|
85 { |
|
86 popupFieldText11->SetCurrentValueIndex(0); |
|
87 } |
|
88 CAknPopupFieldText* popupFieldText7 = |
|
89 static_cast <CAknPopupFieldText*> (Control(EMceSettingsVoipSession)); |
|
90 if(iEngine.iVoIPFlag) |
|
91 { |
|
92 popupFieldText7->SetCurrentValueIndex(1); |
|
93 } |
|
94 else |
|
95 { |
|
96 popupFieldText7->SetCurrentValueIndex(0); |
|
97 } |
|
98 CAknPopupFieldText* popupFieldText1 = |
|
99 static_cast <CAknPopupFieldText*> (Control(ESessionDialogSessionRtcp)); |
|
100 if(iEngine.iRtcpFlag) |
|
101 { |
|
102 popupFieldText1->SetCurrentValueIndex(1); |
|
103 } |
|
104 else |
|
105 { |
|
106 popupFieldText1->SetCurrentValueIndex(0); |
|
107 } |
|
108 |
|
109 CAknPopupFieldText* popupFieldText2 = |
|
110 static_cast <CAknPopupFieldText*> (Control(ESessionDialogSessionAccContactKoppa)); |
|
111 if(iEngine.iKoppaFlag) |
|
112 { |
|
113 popupFieldText2->SetCurrentValueIndex(1); |
|
114 } |
|
115 else |
|
116 { |
|
117 popupFieldText2->SetCurrentValueIndex(0); |
|
118 } |
|
119 |
|
120 CAknPopupFieldText* popupFieldText3 = |
|
121 static_cast <CAknPopupFieldText*> (Control(ESessionDialogBundle)); |
|
122 |
|
123 if(iEngine.iBundle) |
|
124 { |
|
125 popupFieldText3->SetCurrentValueIndex(1); |
|
126 } |
|
127 else |
|
128 { |
|
129 popupFieldText3->SetCurrentValueIndex(0); |
|
130 } |
|
131 |
|
132 CAknPopupFieldText* popupFieldText4 = |
|
133 static_cast <CAknPopupFieldText*> (Control(EMceSettingsSDP)); |
|
134 |
|
135 if(iEngine.iSdp) |
|
136 { |
|
137 popupFieldText4->SetCurrentValueIndex(1); |
|
138 } |
|
139 else |
|
140 { |
|
141 popupFieldText4->SetCurrentValueIndex(0); |
|
142 } |
|
143 |
|
144 |
|
145 CAknPopupFieldText* popupFieldText5 = |
|
146 static_cast <CAknPopupFieldText*> (Control(EMceSettings180Precondition)); |
|
147 |
|
148 if(iEngine.i180PreCondition) |
|
149 { |
|
150 popupFieldText5->SetCurrentValueIndex(1); |
|
151 } |
|
152 else |
|
153 { |
|
154 popupFieldText5->SetCurrentValueIndex(0); |
|
155 } |
|
156 |
|
157 CAknPopupFieldText* popupFieldText8 = |
|
158 static_cast <CAknPopupFieldText*> (Control(EMceSettingsHoldWithAddress)); |
|
159 |
|
160 if( iEngine.iHoldWithAddress ) |
|
161 { |
|
162 popupFieldText8->SetCurrentValueIndex(1); |
|
163 } |
|
164 else |
|
165 { |
|
166 popupFieldText8->SetCurrentValueIndex(0); |
|
167 } |
|
168 |
|
169 |
|
170 CAknPopupFieldText* popupFieldText6 = |
|
171 static_cast <CAknPopupFieldText*> (Control(EMceSettingsCodemeniconAuto)); |
|
172 |
|
173 if(iEngine.iAutoResponse) |
|
174 { |
|
175 popupFieldText6->SetCurrentValueIndex(1); |
|
176 } |
|
177 else |
|
178 { |
|
179 popupFieldText6->SetCurrentValueIndex(0); |
|
180 } |
|
181 CAknPopupFieldText* popupFieldText9 = |
|
182 static_cast <CAknPopupFieldText*> (Control(EMceSettingsSecureSessionAVP)); |
|
183 |
|
184 if(iEngine.iSecureSessionAVP) |
|
185 { |
|
186 popupFieldText9->SetCurrentValueIndex(1); |
|
187 } |
|
188 else |
|
189 { |
|
190 popupFieldText9->SetCurrentValueIndex(0); |
|
191 } |
|
192 |
|
193 CAknPopupFieldText* popupFieldText12 = |
|
194 static_cast <CAknPopupFieldText*> (Control(EMceSecPreconditions)); |
|
195 |
|
196 if(iEngine.iSecPreconditions) |
|
197 { |
|
198 popupFieldText12->SetCurrentValueIndex(1); |
|
199 } |
|
200 else |
|
201 { |
|
202 popupFieldText12->SetCurrentValueIndex(0); |
|
203 } |
|
204 |
|
205 popupFieldText = |
|
206 static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoViewFinder)); |
|
207 |
|
208 if(iEngine.iInSessionSettings.videoSinkDisplay == TSessionParams::EMceCameraPrimary ) |
|
209 { |
|
210 popupFieldText->SetCurrentValueIndex(0); |
|
211 } |
|
212 else |
|
213 { |
|
214 popupFieldText->SetCurrentValueIndex(1); |
|
215 } |
|
216 |
|
217 popupFieldText = |
|
218 static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoCamera)); |
|
219 |
|
220 if(iEngine.iInSessionSettings.iCameraSetting == TSessionParams::EMceViewFinderDisabled ) |
|
221 { |
|
222 popupFieldText->SetCurrentValueIndex(0); |
|
223 } |
|
224 else |
|
225 { |
|
226 popupFieldText->SetCurrentValueIndex(1); |
|
227 } |
|
228 |
|
229 } |
|
230 |
|
231 // ---------------------------------------------------------------------------- |
|
232 // CCreateMceSettingsDialog::OkToExitL( TInt ) |
|
233 // . |
|
234 // ---------------------------------------------------------------------------- |
|
235 // |
|
236 |
|
237 TBool CCreateMceSettingsDialog::OkToExitL( TInt aKey ) |
|
238 { |
|
239 if ( aKey == EEikCmdCanceled ) |
|
240 { |
|
241 // Cancel pressed. Just exit. |
|
242 return ETrue; |
|
243 } |
|
244 CAknPopupFieldText* popupFieldText = |
|
245 static_cast <CAknPopupFieldText*> (Control(EMceSettingsFCSession)); |
|
246 |
|
247 if( popupFieldText->CurrentValueIndex() == 0) |
|
248 { |
|
249 iEngine.SetFCSession(EFalse); |
|
250 } |
|
251 else |
|
252 { |
|
253 iEngine.SetFCSession(ETrue); |
|
254 } |
|
255 CAknPopupFieldText* popupFieldText7 = |
|
256 static_cast <CAknPopupFieldText*> (Control(EMceSettingsVoipSession)); |
|
257 |
|
258 CAknPopupFieldText* popupFieldText11 = |
|
259 static_cast <CAknPopupFieldText*> (Control(EMceSettingsMultiCodecSupport)); |
|
260 |
|
261 if( popupFieldText11->CurrentValueIndex() == 0) |
|
262 { |
|
263 iEngine.iMultiCodecSupport = EFalse; |
|
264 } |
|
265 else |
|
266 { |
|
267 iEngine.iMultiCodecSupport = ETrue; |
|
268 } |
|
269 |
|
270 CAknPopupFieldText* popupFieldText10 = |
|
271 static_cast <CAknPopupFieldText*> (Control(EMceSettingsAudioPriority)); |
|
272 if( popupFieldText10->CurrentValueIndex() == 0 ) |
|
273 { |
|
274 iEngine.iPriorityType = KPoCPriority; |
|
275 } |
|
276 else if( popupFieldText10->CurrentValueIndex() == 1) |
|
277 { |
|
278 iEngine.iPriorityType = KVoIPPriority; |
|
279 } |
|
280 else |
|
281 { |
|
282 iEngine.iPriorityType = KVSPriority; |
|
283 } |
|
284 |
|
285 if( popupFieldText7->CurrentValueIndex()) |
|
286 { |
|
287 iEngine.iVoIPFlag = ETrue; |
|
288 } |
|
289 else |
|
290 { |
|
291 iEngine.iVoIPFlag = EFalse; |
|
292 } |
|
293 |
|
294 CAknPopupFieldText* popupFieldText1 = |
|
295 static_cast <CAknPopupFieldText*> (Control(ESessionDialogSessionRtcp)); |
|
296 if(popupFieldText1->CurrentValueIndex()) |
|
297 { |
|
298 iEngine.iRtcpFlag = ETrue; |
|
299 } |
|
300 else |
|
301 { |
|
302 iEngine.iRtcpFlag = EFalse; |
|
303 } |
|
304 |
|
305 CAknPopupFieldText* popupFieldText2 = |
|
306 static_cast <CAknPopupFieldText*> (Control(ESessionDialogSessionAccContactKoppa)); |
|
307 if(popupFieldText2->CurrentValueIndex()) |
|
308 { |
|
309 iEngine.iKoppaFlag = ETrue; |
|
310 } |
|
311 else |
|
312 { |
|
313 iEngine.iKoppaFlag = EFalse; |
|
314 } |
|
315 |
|
316 CAknPopupFieldText* popupFieldText3 = |
|
317 static_cast <CAknPopupFieldText*> (Control(ESessionDialogBundle)); |
|
318 if(popupFieldText3->CurrentValueIndex()) |
|
319 { |
|
320 iEngine.iBundle = ETrue; |
|
321 } |
|
322 else |
|
323 { |
|
324 iEngine.iBundle = EFalse; |
|
325 } |
|
326 |
|
327 CAknPopupFieldText* popupFieldText4 = |
|
328 static_cast <CAknPopupFieldText*> (Control(EMceSettingsSDP)); |
|
329 if(popupFieldText4->CurrentValueIndex()) |
|
330 { |
|
331 iEngine.iSdp = ETrue; |
|
332 } |
|
333 else |
|
334 { |
|
335 iEngine.iSdp = EFalse; |
|
336 } |
|
337 CAknPopupFieldText* popupFieldText5 = |
|
338 static_cast <CAknPopupFieldText*> (Control(EMceSettings180Precondition)); |
|
339 if(popupFieldText5->CurrentValueIndex()) |
|
340 { |
|
341 iEngine.i180PreCondition = ETrue; |
|
342 } |
|
343 else |
|
344 { |
|
345 iEngine.i180PreCondition = EFalse; |
|
346 } |
|
347 |
|
348 CAknPopupFieldText* popupFieldText8 = |
|
349 static_cast <CAknPopupFieldText*> (Control(EMceSettingsHoldWithAddress)); |
|
350 if(popupFieldText8->CurrentValueIndex()) |
|
351 { |
|
352 iEngine.iHoldWithAddress = ETrue; |
|
353 } |
|
354 else |
|
355 { |
|
356 iEngine.iHoldWithAddress = EFalse; |
|
357 } |
|
358 |
|
359 CAknPopupFieldText* popupFieldText6 = |
|
360 static_cast <CAknPopupFieldText*> (Control(EMceSettingsCodemeniconAuto)); |
|
361 if(popupFieldText6->CurrentValueIndex()) |
|
362 { |
|
363 iEngine.iAutoResponse = ETrue; |
|
364 } |
|
365 else |
|
366 { |
|
367 iEngine.iAutoResponse = EFalse; |
|
368 } |
|
369 |
|
370 |
|
371 CAknPopupFieldText* popupFieldText9 = |
|
372 static_cast <CAknPopupFieldText*> (Control(EMceSettingsSecureSessionAVP)); |
|
373 |
|
374 if(popupFieldText9->CurrentValueIndex()) |
|
375 { |
|
376 iEngine.iSecureSessionAVP = ETrue; |
|
377 } |
|
378 else |
|
379 { |
|
380 iEngine.iSecureSessionAVP = EFalse; |
|
381 } |
|
382 |
|
383 CAknPopupFieldText* popupFieldText12 = |
|
384 static_cast <CAknPopupFieldText*> (Control(EMceSecPreconditions)); |
|
385 |
|
386 if(popupFieldText12->CurrentValueIndex()) |
|
387 { |
|
388 iEngine.iSecPreconditions = ETrue; |
|
389 } |
|
390 else |
|
391 { |
|
392 iEngine.iSecPreconditions = EFalse; |
|
393 } |
|
394 |
|
395 popupFieldText = |
|
396 static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoViewFinder)); |
|
397 |
|
398 if( popupFieldText->CurrentValueIndex() ) |
|
399 { |
|
400 iEngine.iInSessionSettings.videoSinkDisplay = TSessionParams::EMceViewFinderEnabled; |
|
401 } |
|
402 else |
|
403 { |
|
404 iEngine.iInSessionSettings.videoSinkDisplay = TSessionParams::EMceViewFinderDisabled; |
|
405 } |
|
406 |
|
407 popupFieldText = |
|
408 static_cast <CAknPopupFieldText*> (Control(ESessionDialog2WayVideoCamera)); |
|
409 |
|
410 if( popupFieldText->CurrentValueIndex() ) |
|
411 { |
|
412 iEngine.iInSessionSettings.iCameraSetting = TSessionParams::EMceCameraSecondary; |
|
413 } |
|
414 else |
|
415 { |
|
416 iEngine.iInSessionSettings.iCameraSetting = TSessionParams::EMceCameraPrimary; |
|
417 } |
|
418 |
|
419 return ETrue; |
|
420 } |
|
421 |
|
422 // ---------------------------------------------------------------------------- |
|
423 // CCreateMceSettingsDialog::~CCreateMceSettingsDialog() |
|
424 // . |
|
425 // ---------------------------------------------------------------------------- |
|
426 // |
|
427 CCreateMceSettingsDialog::~CCreateMceSettingsDialog() |
|
428 { |
|
429 return; |
|
430 } |
|
431 |
|
432 // End of File |