|
1 /* |
|
2 * Copyright (c) 2002 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 // INCLUDE FILES |
|
20 #include "obexutilsuilayer.h" |
|
21 #include "obexutilslaunchwaiter.h" |
|
22 #include "obexutilsdebug.h" |
|
23 |
|
24 #include <SecondaryDisplay/obexutilssecondarydisplayapi.h> |
|
25 #include <obexutils.rsg> |
|
26 #include <aknnotewrappers.h> |
|
27 #include <AknGlobalConfirmationQuery.h> |
|
28 #include <eikon.rsg> |
|
29 #include <avkon.rsg> |
|
30 #include <muiu.mbg> |
|
31 #include <bautils.h> |
|
32 #include <featmgr.h> |
|
33 |
|
34 #include <stringresourcereader.h> |
|
35 #include <StringLoader.h> |
|
36 |
|
37 // Launching file manager related header files |
|
38 #include <AiwServiceHandler.h> // The AIW service handler |
|
39 #include <apgcli.h> |
|
40 #include <apacmdln.h> |
|
41 #include <AknLaunchAppService.h> // Used to launch file manager in embedded mode. |
|
42 |
|
43 |
|
44 const TInt KUiNumberOfZoomStates = 2; // second for the mask |
|
45 const TInt KSortNumMax = 2; |
|
46 |
|
47 |
|
48 // ============================ MEMBER FUNCTIONS =============================== |
|
49 |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // TObexUtilsUiLayer::LaunchEditorApplicationOperationL |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 EXPORT_C CMsvOperation* TObexUtilsUiLayer::LaunchEditorApplicationOperationL( |
|
56 CMsvSession& aMsvSession, |
|
57 CMsvEntry* aMessage, |
|
58 TRequestStatus& aObserverRequestStatus ) |
|
59 { |
|
60 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::LaunchEditorApplicationOperationL()")); |
|
61 CObexUtilsLaunchWaiter* waiterOperation = CObexUtilsLaunchWaiter::NewL( |
|
62 aMsvSession, |
|
63 aMessage, |
|
64 aObserverRequestStatus ); |
|
65 |
|
66 return waiterOperation; |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // TObexUtilsUiLayer::LaunchEditorApplication |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 EXPORT_C TInt TObexUtilsUiLayer::LaunchEditorApplicationL( CMsvEntry* /*aMessage*/, |
|
74 CMsvSession& /*aSession*/ ) |
|
75 { |
|
76 // Obsolete |
|
77 return KErrNotSupported; |
|
78 } |
|
79 |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // CObexUtilsMessageHandler::LaunchFileManager |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 EXPORT_C void TObexUtilsUiLayer::LaunchFileManagerL( |
|
86 TDesC& aPath, |
|
87 TInt aSortMethod, |
|
88 TBool isEmbeddedMode ) |
|
89 { |
|
90 if ( isEmbeddedMode ) |
|
91 { |
|
92 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() Embedded mode")); |
|
93 |
|
94 CAiwGenericParamList* inParams = CAiwGenericParamList::NewLC(); |
|
95 inParams->AppendL(TAiwGenericParam( EGenericParamDir, TAiwVariant( aPath ) ) ); |
|
96 inParams->AppendL(TAiwGenericParam( EGenericParamDir, TAiwVariant( aSortMethod ) ) ); |
|
97 |
|
98 CAknLaunchAppService* launchService = CAknLaunchAppService::NewL(TUid::Uid( 0x101F84EB ), // Use File Manager app UID directly |
|
99 NULL, |
|
100 inParams ); |
|
101 CleanupStack::PopAndDestroy( inParams ); |
|
102 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() Embedded mode completed ")); |
|
103 } |
|
104 else |
|
105 { |
|
106 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() ")); |
|
107 TApaAppInfo appInfo; |
|
108 RApaLsSession apaLsSession; |
|
109 User::LeaveIfError( apaLsSession.Connect() ); |
|
110 CleanupClosePushL( apaLsSession ); |
|
111 User::LeaveIfError( apaLsSession.GetAppInfo( appInfo, TUid::Uid( 0x101F84EB ) ) ); // Use File Manager app UID directly |
|
112 CApaCommandLine* apaCmdLine = CApaCommandLine::NewLC(); |
|
113 apaCmdLine->SetExecutableNameL( appInfo.iFullName ); |
|
114 apaCmdLine->SetCommandL( EApaCommandOpen ); |
|
115 apaCmdLine->SetDocumentNameL( aPath ); |
|
116 TBuf8<KSortNumMax> sortMode; |
|
117 sortMode.AppendNum( aSortMethod ); |
|
118 apaCmdLine->SetTailEndL( sortMode ); |
|
119 TThreadId dummy; |
|
120 User::LeaveIfError( apaLsSession.StartApp( *apaCmdLine, dummy ) ); |
|
121 CleanupStack::PopAndDestroy( apaCmdLine ); |
|
122 CleanupStack::PopAndDestroy( &apaLsSession ); |
|
123 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchFileManager() standalone mode completed ")); |
|
124 } |
|
125 } |
|
126 |
|
127 // ----------------------------------------------------------------------------- |
|
128 // CObexUtilsMessageHandler::LaunchEditorApplication |
|
129 // ----------------------------------------------------------------------------- |
|
130 // |
|
131 EXPORT_C void TObexUtilsUiLayer::LaunchEditorApplicationL (TMsvId& aMsvIdParent) |
|
132 { |
|
133 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchEditorApplication() ")); |
|
134 CDummySessionObserver* sessionObs = new( ELeave )CDummySessionObserver; |
|
135 CleanupStack::PushL( sessionObs ); //1st push |
|
136 CMsvSession* msvSession = CMsvSession::OpenSyncL( *sessionObs ); |
|
137 CleanupStack::PushL( msvSession ); //2nd push |
|
138 |
|
139 // 1st, 2nd push? |
|
140 CMsvEntry* parentEntry = msvSession->GetEntryL(aMsvIdParent); |
|
141 CleanupStack::PushL(parentEntry); // 3th push |
|
142 |
|
143 TRequestStatus status = KRequestPending; |
|
144 CObexUtilsLaunchWaiter* waiterOperation = CObexUtilsLaunchWaiter::NewL( |
|
145 *msvSession, |
|
146 parentEntry, |
|
147 status); |
|
148 CleanupStack::PopAndDestroy(3); // parentEntry, sessionObs, msvSession |
|
149 |
|
150 FLOG(_L("[OBEXUTILS]\t TObexUtilsMessageHandler::LaunchEditorApplication() completed ")); |
|
151 } |
|
152 |
|
153 |
|
154 // ----------------------------------------------------------------------------- |
|
155 // TObexUtilsUiLayer::ShowErrorNoteL |
|
156 // ----------------------------------------------------------------------------- |
|
157 // |
|
158 EXPORT_C void TObexUtilsUiLayer::ShowErrorNoteL( const TInt& aResourceID ) |
|
159 { |
|
160 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowErrorNoteL()")); |
|
161 |
|
162 TBuf<KObexUtilsMaxChar> textdata; |
|
163 ReadResourceL( textdata, aResourceID ); |
|
164 |
|
165 CAknErrorNote* note = new( ELeave )CAknErrorNote( ETrue ); |
|
166 CleanupStack::PushL( note ); |
|
167 PrepareDialogExecuteL( aResourceID, note ); |
|
168 CleanupStack::Pop( note ); |
|
169 note->ExecuteLD( textdata ); |
|
170 |
|
171 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowErrorNoteL() completed")); |
|
172 |
|
173 } |
|
174 |
|
175 // ----------------------------------------------------------------------------- |
|
176 // TObexUtilsUiLayer::ShowInformationNoteL |
|
177 // ----------------------------------------------------------------------------- |
|
178 // |
|
179 EXPORT_C void TObexUtilsUiLayer::ShowInformationNoteL( const TInt& aResourceID ) |
|
180 { |
|
181 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowInformationNoteL()")); |
|
182 |
|
183 TBuf<KObexUtilsMaxChar> textdata; |
|
184 ReadResourceL( textdata, aResourceID ); |
|
185 |
|
186 CAknInformationNote* note = new( ELeave )CAknInformationNote; |
|
187 CleanupStack::PushL( note ); |
|
188 PrepareDialogExecuteL( aResourceID, note ); |
|
189 CleanupStack::Pop( note ); |
|
190 note->ExecuteLD( textdata ); |
|
191 |
|
192 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowInformationNoteL() completed")); |
|
193 } |
|
194 |
|
195 // ----------------------------------------------------------------------------- |
|
196 // TObexUtilsUiLayer::ShowGlobalInformationNoteL |
|
197 // ----------------------------------------------------------------------------- |
|
198 // |
|
199 EXPORT_C void TObexUtilsUiLayer::ShowGlobalConfirmationQueryL( const TInt& aResourceID ) |
|
200 { |
|
201 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowGlobalInformationNoteL()")); |
|
202 |
|
203 TBuf<KObexUtilsMaxChar> textdata; |
|
204 TRequestStatus status; |
|
205 |
|
206 ReadResourceL( textdata, aResourceID ); |
|
207 CAknGlobalConfirmationQuery* note = CAknGlobalConfirmationQuery::NewLC(); |
|
208 |
|
209 status=KRequestPending; |
|
210 note->ShowConfirmationQueryL(status, |
|
211 textdata, |
|
212 R_AVKON_SOFTKEYS_OK_EMPTY, |
|
213 R_QGN_NOTE_ERROR_ANIM,KNullDesC, |
|
214 0, |
|
215 0, |
|
216 CAknQueryDialog::EErrorTone |
|
217 ); |
|
218 User::WaitForRequest(status); |
|
219 |
|
220 CleanupStack::PopAndDestroy(note ); |
|
221 |
|
222 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ShowGlobalInformationNoteL() completed")); |
|
223 } |
|
224 |
|
225 // ----------------------------------------------------------------------------- |
|
226 // TObexUtilsUiLayer::ShowGlobalConfirmationQueryPlainL |
|
227 // ----------------------------------------------------------------------------- |
|
228 // |
|
229 EXPORT_C TBool TObexUtilsUiLayer::ShowGlobalConfirmationQueryPlainL( const TInt& aResourceID) |
|
230 { |
|
231 CAknGlobalConfirmationQuery* pQ = CAknGlobalConfirmationQuery::NewL(); |
|
232 CleanupStack::PushL(pQ); |
|
233 HBufC* stringholder = NULL; |
|
234 stringholder = StringLoader::LoadLC( aResourceID); |
|
235 TRequestStatus status = KRequestPending; |
|
236 pQ->ShowConfirmationQueryL(status,*stringholder,R_AVKON_SOFTKEYS_YES_NO); |
|
237 User::WaitForRequest(status); |
|
238 CleanupStack::PopAndDestroy(2);//PQ and Stringholder |
|
239 return (status.Int() == EAknSoftkeyYes); |
|
240 } |
|
241 |
|
242 |
|
243 // ----------------------------------------------------------------------------- |
|
244 // TObexUtilsUiLayer::ShowGlobalFileOpenConfirmationQueryL |
|
245 // ----------------------------------------------------------------------------- |
|
246 // |
|
247 EXPORT_C TBool TObexUtilsUiLayer::ShowGlobalFileOpenConfirmationQueryL( const TInt& aResourceID, const TDesC& aFilePath) |
|
248 { |
|
249 // Read string from resource file |
|
250 TFileName fileName; |
|
251 fileName += KObexUtilsFileDrive; |
|
252 fileName += KDC_RESOURCE_FILES_DIR; |
|
253 fileName += KObexUtilsResourceFileName; |
|
254 |
|
255 CStringResourceReader* stringResourceReader = CStringResourceReader::NewL(fileName); |
|
256 CleanupStack::PushL(stringResourceReader); |
|
257 const TDesC& resString = stringResourceReader->ReadResourceString(aResourceID); |
|
258 RBuf manipString; |
|
259 manipString.Assign(resString.AllocL()); |
|
260 CleanupStack::PopAndDestroy(stringResourceReader); |
|
261 manipString.CleanupClosePushL(); |
|
262 |
|
263 // Remove bracket section |
|
264 _LIT(KPrefix, "["); |
|
265 _LIT(KSuffix, "]"); |
|
266 TInt prefixPos = manipString.Find(KPrefix); |
|
267 if (prefixPos != KErrNotFound) |
|
268 { |
|
269 TInt keyLength = 0; |
|
270 TInt suffixPos = manipString.Find(KSuffix); |
|
271 keyLength = (manipString.Mid(prefixPos)).Length()-(manipString.Mid(suffixPos)).Length()+1; |
|
272 manipString.Delete(prefixPos, keyLength); |
|
273 } |
|
274 |
|
275 // Replace "%U" string parameter with file path |
|
276 _LIT(KString, "%U"); |
|
277 TInt replacePos = manipString.Find(KString); |
|
278 if( replacePos == KErrNotFound ) |
|
279 { |
|
280 User::Leave(KErrNotFound); |
|
281 } |
|
282 const TInt minRequiredSize = manipString.Length() - KString().Length() + aFilePath.Length(); |
|
283 // ensure that the buffer is big enough (otherwise re-alloc) |
|
284 if(manipString.MaxLength() < minRequiredSize) |
|
285 { |
|
286 manipString.ReAllocL(minRequiredSize); |
|
287 } |
|
288 manipString.Replace(replacePos, KString().Length(), aFilePath); |
|
289 |
|
290 // Initiate query dialog |
|
291 TRequestStatus status = KRequestPending; |
|
292 CAknGlobalConfirmationQuery* pQ = CAknGlobalConfirmationQuery::NewL(); |
|
293 CleanupStack::PushL(pQ); |
|
294 pQ->ShowConfirmationQueryL(status, manipString, R_AVKON_SOFTKEYS_YES_NO); |
|
295 User::WaitForRequest(status); |
|
296 CleanupStack::PopAndDestroy(2, &manipString); // pQ, manipString |
|
297 return (status.Int() == EAknSoftkeyYes); |
|
298 } |
|
299 |
|
300 |
|
301 // ----------------------------------------------------------------------------- |
|
302 // TObexUtilsUiLayer::ReadResourceL |
|
303 // ----------------------------------------------------------------------------- |
|
304 // |
|
305 EXPORT_C void TObexUtilsUiLayer::ReadResourceL( TDes& aBuf, const TInt& aResourceID ) |
|
306 { |
|
307 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ReadResourceL()")); |
|
308 |
|
309 RFs fileSession; |
|
310 CleanupClosePushL<RFs>( fileSession ); |
|
311 User::LeaveIfError( fileSession.Connect() ); |
|
312 |
|
313 TFileName fileName; |
|
314 fileName += KObexUtilsFileDrive; |
|
315 fileName += KDC_RESOURCE_FILES_DIR; |
|
316 fileName += KObexUtilsResourceFileName; |
|
317 |
|
318 BaflUtils::NearestLanguageFile( fileSession, fileName ); |
|
319 |
|
320 RResourceFile resourcefile; |
|
321 CleanupClosePushL<RResourceFile>( resourcefile ); |
|
322 resourcefile.OpenL( fileSession, fileName ); |
|
323 resourcefile.ConfirmSignatureL( 0 ); |
|
324 HBufC8* readBuffer = resourcefile.AllocReadLC( aResourceID ); |
|
325 |
|
326 const TPtrC16 ptrReadBuffer( (TText16*) readBuffer->Ptr(),( readBuffer->Length() + 1 ) >> 1 ); |
|
327 HBufC16* textBuffer=HBufC16::NewLC( ptrReadBuffer.Length() ); |
|
328 *textBuffer = ptrReadBuffer; |
|
329 aBuf.Copy( *textBuffer ); |
|
330 |
|
331 CleanupStack::PopAndDestroy( 4 ); // textBuffer, fileSession, resourcefile, readBuffer |
|
332 |
|
333 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ReadResourceL() completed")); |
|
334 } |
|
335 |
|
336 // ----------------------------------------------------------------------------- |
|
337 // TObexUtilsUiLayer::OperationNotSupported |
|
338 // ----------------------------------------------------------------------------- |
|
339 // |
|
340 EXPORT_C TInt TObexUtilsUiLayer::OperationNotSupported() |
|
341 { |
|
342 return R_EIK_TBUF_NOT_AVAILABLE; |
|
343 } |
|
344 |
|
345 // ----------------------------------------------------------------------------- |
|
346 // TObexUtilsUiLayer::ContextIcon |
|
347 // ----------------------------------------------------------------------------- |
|
348 // |
|
349 EXPORT_C TInt TObexUtilsUiLayer::ContextIcon( const TMsvEntry& aContext, TContextMedia aMedia ) |
|
350 { |
|
351 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ContextIcon()")); |
|
352 |
|
353 TInt icon = 0; |
|
354 if( aMedia == EBluetooth ) |
|
355 { |
|
356 if( aContext.Unread() ) |
|
357 { |
|
358 icon = EMbmMuiuQgn_prop_mce_bt_unread - EMbmMuiuQgn_prop_mce_ir_unread; |
|
359 } |
|
360 else |
|
361 { |
|
362 icon = EMbmMuiuQgn_prop_mce_bt_read - EMbmMuiuQgn_prop_mce_ir_unread; |
|
363 } |
|
364 } |
|
365 else if( aMedia == EInfrared ) |
|
366 { |
|
367 if( aContext.Unread() ) |
|
368 { |
|
369 icon = 0; |
|
370 } |
|
371 else |
|
372 { |
|
373 icon = EMbmMuiuQgn_prop_mce_ir_read - EMbmMuiuQgn_prop_mce_ir_unread; |
|
374 } |
|
375 } |
|
376 |
|
377 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::ContextIcon() completed")); |
|
378 |
|
379 return icon; |
|
380 } |
|
381 |
|
382 // ----------------------------------------------------------------------------- |
|
383 // TObexUtilsUiLayer::UpdateBitmaps |
|
384 // ----------------------------------------------------------------------------- |
|
385 // |
|
386 EXPORT_C void TObexUtilsUiLayer::UpdateBitmaps( TUid aMedia, |
|
387 TInt& aNumberOfZoomStates, TFileName& aBitmapFile, TInt& aStartBitmap, |
|
388 TInt& aEndBitmap ) |
|
389 { |
|
390 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::UpdateBitmaps()")); |
|
391 |
|
392 aBitmapFile = KCommonUiBitmapFile; |
|
393 aNumberOfZoomStates = KUiNumberOfZoomStates; |
|
394 if( aMedia == KUidMsgTypeBt ) |
|
395 { |
|
396 aStartBitmap = EMbmMuiuQgn_prop_mce_ir_unread; |
|
397 aEndBitmap = EMbmMuiuQgn_prop_mce_bt_read_mask; |
|
398 } |
|
399 else |
|
400 { |
|
401 aStartBitmap = EMbmMuiuQgn_prop_mce_ir_unread; |
|
402 aEndBitmap = EMbmMuiuQgn_prop_mce_bt_unread_mask; |
|
403 } |
|
404 |
|
405 FLOG(_L("[OBEXUTILS]\t TObexUtilsUiLayer::UpdateBitmaps() completed")); |
|
406 } |
|
407 |
|
408 // ----------------------------------------------------------------------------- |
|
409 // TObexUtilsUiLayer::DeleteCBitMapArray |
|
410 // ----------------------------------------------------------------------------- |
|
411 // |
|
412 inline void DeleteCBitMapArray(TAny* aPtr) |
|
413 { |
|
414 if (aPtr) |
|
415 { |
|
416 TObexUtilsUiLayer::CBitmapArray* array = |
|
417 reinterpret_cast<TObexUtilsUiLayer::CBitmapArray*>(aPtr); |
|
418 array->ResetAndDestroy(); |
|
419 delete array; |
|
420 } |
|
421 } |
|
422 |
|
423 // ----------------------------------------------------------------------------- |
|
424 // TObexUtilsUiLayer::CreateAndAppendBitmapL |
|
425 // ----------------------------------------------------------------------------- |
|
426 // |
|
427 void CreateAndAppendBitmapL(const TAknsItemID& aID, |
|
428 const TInt aFileBitmapId, |
|
429 CArrayPtr<TObexUtilsUiLayer::CBitmapArray>* aIconArrays ) |
|
430 { |
|
431 TFileName muiubmpFilename; |
|
432 muiubmpFilename += KObexUtilsFileDrive; |
|
433 muiubmpFilename += KDC_APP_BITMAP_DIR; |
|
434 muiubmpFilename += KCommonUiBitmapFile; |
|
435 |
|
436 TObexUtilsUiLayer::CBitmapArray* array=NULL; |
|
437 array=new(ELeave) CArrayPtrFlat<CFbsBitmap>(KUiNumberOfZoomStates); |
|
438 CleanupStack::PushL(TCleanupItem(DeleteCBitMapArray, array)); |
|
439 |
|
440 CFbsBitmap* bitmap=0, *mask=0; |
|
441 |
|
442 //Can not use CreateIconLC since the order in which bitmap and mask are pushed into Cleanup Stack is undefined. |
|
443 AknsUtils::CreateIconL( |
|
444 AknsUtils::SkinInstance(), |
|
445 aID, |
|
446 bitmap, |
|
447 mask, |
|
448 muiubmpFilename, |
|
449 aFileBitmapId, |
|
450 aFileBitmapId+1); |
|
451 CleanupStack::PushL(mask); |
|
452 CleanupStack::PushL(bitmap); |
|
453 |
|
454 // warning: bmp is deleted by the array CleanupItem. Immediately Pop or risk double deletion upon a Leave. |
|
455 array->AppendL(bitmap); |
|
456 CleanupStack::Pop(bitmap); |
|
457 |
|
458 // warning: bmp is deleted by the array CleanupItem. Immediately Pop or risk double deletion upon a Leave. |
|
459 array->AppendL(mask); |
|
460 CleanupStack::Pop(mask); |
|
461 |
|
462 aIconArrays->AppendL(array); |
|
463 CleanupStack::Pop(array); |
|
464 } |
|
465 |
|
466 // ----------------------------------------------------------------------------- |
|
467 // TObexUtilsUiLayer::CreateIconsL |
|
468 // ----------------------------------------------------------------------------- |
|
469 // |
|
470 EXPORT_C void TObexUtilsUiLayer::CreateIconsL( |
|
471 TUid aMedia, |
|
472 CArrayPtr<TObexUtilsUiLayer::CBitmapArray>* aIconArrays ) |
|
473 { |
|
474 if( aMedia == KUidMsgTypeBt ) //Bluetooth |
|
475 { |
|
476 CreateAndAppendBitmapL( |
|
477 KAknsIIDQgnPropMceIrUnread, |
|
478 EMbmMuiuQgn_prop_mce_ir_unread, |
|
479 aIconArrays); |
|
480 CreateAndAppendBitmapL( |
|
481 KAknsIIDQgnPropMceIrRead, |
|
482 EMbmMuiuQgn_prop_mce_ir_read, |
|
483 aIconArrays); |
|
484 CreateAndAppendBitmapL( |
|
485 KAknsIIDQgnPropMceBtUnread, |
|
486 EMbmMuiuQgn_prop_mce_bt_unread, |
|
487 aIconArrays); |
|
488 CreateAndAppendBitmapL( |
|
489 KAknsIIDQgnPropMceBtRead, |
|
490 EMbmMuiuQgn_prop_mce_bt_read, |
|
491 aIconArrays); |
|
492 } |
|
493 else //Infrared |
|
494 { |
|
495 CreateAndAppendBitmapL( |
|
496 KAknsIIDQgnPropMceIrUnread, |
|
497 EMbmMuiuQgn_prop_mce_ir_unread, |
|
498 aIconArrays); |
|
499 CreateAndAppendBitmapL( |
|
500 KAknsIIDQgnPropMceIrRead, |
|
501 EMbmMuiuQgn_prop_mce_ir_read, |
|
502 aIconArrays); |
|
503 CreateAndAppendBitmapL( |
|
504 KAknsIIDQgnPropMceBtUnread, |
|
505 EMbmMuiuQgn_prop_mce_bt_unread, |
|
506 aIconArrays); |
|
507 } |
|
508 } |
|
509 |
|
510 // ----------------------------------------------------------------------------- |
|
511 // TObexUtilsUiLayer::PrepareDialogExecuteL |
|
512 // ----------------------------------------------------------------------------- |
|
513 // |
|
514 void TObexUtilsUiLayer::PrepareDialogExecuteL( const TInt& aResourceID, CEikDialog* aDialog ) |
|
515 { |
|
516 if (IsCoverDisplayL()) |
|
517 { |
|
518 TInt dialogIndex = |
|
519 ((aResourceID & KResourceNumberMask) - KFirstResourceOffset) + KEnumStart; |
|
520 aDialog->PublishDialogL( dialogIndex, KObexUtilsCategory ); |
|
521 } |
|
522 } |
|
523 |
|
524 // ----------------------------------------------------------------------------- |
|
525 // TObexUtilsUiLayer::IsCoverDisplayL() |
|
526 // ----------------------------------------------------------------------------- |
|
527 // |
|
528 TBool TObexUtilsUiLayer::IsCoverDisplayL() |
|
529 { |
|
530 TBool coverDisplay = EFalse; |
|
531 FeatureManager::InitializeLibL(); |
|
532 if ( FeatureManager::FeatureSupported( KFeatureIdCoverDisplay ) ) |
|
533 { |
|
534 coverDisplay = ETrue; |
|
535 } |
|
536 FeatureManager::UnInitializeLib(); |
|
537 return coverDisplay; |
|
538 } |
|
539 |
|
540 // End of File |