|
1 /* |
|
2 * Copyright (c) 2005-2007 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: File sharing view of Home Network application |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 // INCLUDE FILES |
|
24 // system |
|
25 #include <aknlists.h> |
|
26 #include <akntitle.h> |
|
27 #include <AknProgressDialog.h> |
|
28 #include <StringLoader.h> |
|
29 #include <featmgr.h> |
|
30 #include <hlplch.h> |
|
31 #include <eikprogi.h> |
|
32 #include <aknnotewrappers.h> |
|
33 #include <aknmessagequerydialog.h> //displayinfol |
|
34 #include <akninputblock.h> // CAknInputBlock |
|
35 #include <bautils.h> // BaflUtils |
|
36 |
|
37 // internal interfaces |
|
38 #include "cupnpmultiselectionui.h" |
|
39 #include "upnpfilesharingengine.h" |
|
40 #include "upnpfilesharingengineobserver.h" |
|
41 |
|
42 // this component |
|
43 #include <upnpsharingui.rsg> |
|
44 #include "upnpsharingui.hrh" |
|
45 #include "upnpappfilesharinglist.h" |
|
46 #include "upnpappfilesharingdialog.h" |
|
47 |
|
48 |
|
49 _LIT( KComponentLogfile, "upnpsharingui.txt"); |
|
50 #include "upnplog.h" |
|
51 |
|
52 // CONSTANTS |
|
53 const TInt KHomeConnectUID3 = 0x10208A0A; // needed for help context |
|
54 _LIT( KUPNP_HLP_SHARE_CONTENT, "UPNP_HLP_SHARE_CONTENT" ); |
|
55 // Filename of rsc file |
|
56 _LIT( KSharingUiRscFile, "\\resource\\upnpsharingui.rsc" ); |
|
57 |
|
58 |
|
59 // ============================ MEMBER FUNCTIONS ============================ |
|
60 |
|
61 |
|
62 // -------------------------------------------------------------------------- |
|
63 // CUPnPAppFileSharingDialog::NewL |
|
64 // Two-phased constructor. |
|
65 // -------------------------------------------------------------------------- |
|
66 // |
|
67 EXPORT_C CUPnPAppFileSharingDialog* CUPnPAppFileSharingDialog::NewL( |
|
68 TInt aMenuResource, |
|
69 CUPnPFileSharingEngine& aEng ) |
|
70 { |
|
71 __LOG("CUPnPAppFileSharingDialog::NewL"); |
|
72 |
|
73 CUPnPAppFileSharingDialog* self = |
|
74 new (ELeave) CUPnPAppFileSharingDialog( aEng ); |
|
75 CleanupStack::PushL(self); |
|
76 self->ConstructL( aMenuResource ); |
|
77 CleanupStack::Pop( self ); |
|
78 return self; |
|
79 } |
|
80 |
|
81 // -------------------------------------------------------------------------- |
|
82 // Constructor |
|
83 // -------------------------------------------------------------------------- |
|
84 // |
|
85 CUPnPAppFileSharingDialog::CUPnPAppFileSharingDialog( |
|
86 CUPnPFileSharingEngine& aEng ) |
|
87 : iFileSharingEngine( aEng ) |
|
88 , iFeatureManagerInitialized( EFalse ) |
|
89 { |
|
90 } |
|
91 |
|
92 // -------------------------------------------------------------------------- |
|
93 // CUPnPAppFileSharingDialog::ConstructL |
|
94 // Symbian 2nd phase constructor can leave. |
|
95 // -------------------------------------------------------------------------- |
|
96 // |
|
97 void CUPnPAppFileSharingDialog::ConstructL( TInt aMenuResource ) |
|
98 { |
|
99 __LOG("CUPnPAppFileSharingDialog::ConstructL"); |
|
100 |
|
101 iFileSharingEngine.SetObserver(this); |
|
102 |
|
103 if ( aMenuResource == 0 ) |
|
104 { |
|
105 aMenuResource = R_SHARINGUI_MENUBAR; |
|
106 } |
|
107 |
|
108 // determine resource file location |
|
109 iCoeEnv = CEikonEnv::Static(); |
|
110 RFs& fileSession = iCoeEnv->FsSession(); |
|
111 TFileName rscFileName( KSharingUiRscFile ); |
|
112 TFileName dllName; |
|
113 Dll::FileName( dllName ); |
|
114 TBuf<2> drive = dllName.Left( 2 ); // Drive letter followed by ':' |
|
115 rscFileName.Insert( 0, drive ); |
|
116 BaflUtils::NearestLanguageFile( fileSession, rscFileName ); |
|
117 if ( !BaflUtils::FileExists( fileSession, rscFileName ) ) |
|
118 { |
|
119 User::Leave( KErrNotFound ); |
|
120 } |
|
121 // load the resource file |
|
122 iResFileOffset = iCoeEnv->AddResourceFileL( rscFileName ); |
|
123 FeatureManager::InitializeLibL(); |
|
124 iFeatureManagerInitialized = ETrue; |
|
125 |
|
126 CAknDialog::ConstructL( aMenuResource ); |
|
127 } |
|
128 |
|
129 // -------------------------------------------------------------------------- |
|
130 // Destructor |
|
131 // -------------------------------------------------------------------------- |
|
132 // |
|
133 CUPnPAppFileSharingDialog::~CUPnPAppFileSharingDialog() |
|
134 { |
|
135 __LOG("CUPnPAppFileSharingDialog::~CUPnPAppFileSharingDialog"); |
|
136 |
|
137 iFileSharingEngine.SetObserver( NULL ); |
|
138 |
|
139 // unload resource file |
|
140 if ( iResFileOffset ) |
|
141 { |
|
142 iCoeEnv->DeleteResourceFile( iResFileOffset ); |
|
143 iResFileOffset = 0; |
|
144 } |
|
145 |
|
146 if( iFeatureManagerInitialized ) |
|
147 { |
|
148 FeatureManager::UnInitializeLib(); |
|
149 } |
|
150 } |
|
151 |
|
152 // -------------------------------------------------------------------------- |
|
153 // CUPnPAppFileSharingDialog::ExecuteSharingDialogLD() |
|
154 // Executes the dialog using the component's own resource |
|
155 // -------------------------------------------------------------------------- |
|
156 // |
|
157 EXPORT_C TInt CUPnPAppFileSharingDialog::ExecuteSharingDialogLD() |
|
158 { |
|
159 return ExecuteLD( R_SHARINGUI_DIALOG ); |
|
160 } |
|
161 |
|
162 |
|
163 // -------------------------------------------------------------------------- |
|
164 // CUPnPAppFileSharingDialog::OkToExitL(TInt aButtonId) |
|
165 // called by framework when the softkey is pressed |
|
166 // -------------------------------------------------------------------------- |
|
167 // |
|
168 TBool CUPnPAppFileSharingDialog::OkToExitL(TInt aButtonId) |
|
169 { |
|
170 __LOG("CUPnPAppFileSharingDialog::OkToExitL"); |
|
171 |
|
172 TBool retval(EFalse); |
|
173 if (aButtonId == EAknSoftkeyOptions) |
|
174 { |
|
175 DisplayMenuL(); |
|
176 } |
|
177 else if (aButtonId == EAknSoftkeyBack) |
|
178 { |
|
179 iTitlePane->SetTextToDefaultL(); |
|
180 retval = ETrue; //back to previous dialog |
|
181 } |
|
182 else if ( aButtonId == EAknSoftkeyChange ) |
|
183 { |
|
184 // msk event |
|
185 TKeyEvent tmpEvent; |
|
186 tmpEvent.iCode = EKeyOK; |
|
187 tmpEvent.iModifiers = 0; |
|
188 tmpEvent.iRepeats = 0; |
|
189 tmpEvent.iScanCode = 0; |
|
190 TEventCode eventType = EEventKey; |
|
191 OfferKeyEventL( tmpEvent, eventType ); |
|
192 } |
|
193 return retval; |
|
194 } |
|
195 |
|
196 // -------------------------------------------------------------------------- |
|
197 // CUPnPAppFileSharingDialog::DynInitMenuPaneL |
|
198 // Dynamically initalizes menu pane |
|
199 // -------------------------------------------------------------------------- |
|
200 // |
|
201 void CUPnPAppFileSharingDialog::DynInitMenuPaneL( TInt aResourceId, |
|
202 CEikMenuPane* aMenuPane ) |
|
203 { |
|
204 __LOG("CUPnPAppMainDialog::CUPnPAppFileSharingDialog"); |
|
205 |
|
206 if (aResourceId == R_SHARINGUI_MENU && |
|
207 !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
208 { |
|
209 aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue ); |
|
210 } |
|
211 } |
|
212 |
|
213 |
|
214 // -------------------------------------------------------------------------- |
|
215 // CUPnPAppFileSharingDialog::PreLayoutDynInitL() |
|
216 // called by framework before dialog is shown |
|
217 // -------------------------------------------------------------------------- |
|
218 // |
|
219 void CUPnPAppFileSharingDialog::PreLayoutDynInitL() |
|
220 { |
|
221 __LOG("CUPnPAppFileSharingDialog::PreLayoutDynInitL"); |
|
222 |
|
223 iFileSharingList->LoadDataFromEngineL(); |
|
224 |
|
225 // set dialog title |
|
226 iStatusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
227 iTitlePane = (CAknTitlePane*)iStatusPane->ControlL( |
|
228 TUid::Uid(EEikStatusPaneUidTitle)); |
|
229 iTitlePane->SetTextL(*StringLoader::LoadLC( R_SHARINGUI_TITLE_TEXT ) ); |
|
230 CleanupStack::PopAndDestroy(); |
|
231 } |
|
232 |
|
233 // -------------------------------------------------------------------------- |
|
234 // CUPnPAppFileSharingDialog::ProcessCommandL() |
|
235 // called by framework when menu command is selected |
|
236 // -------------------------------------------------------------------------- |
|
237 // |
|
238 void CUPnPAppFileSharingDialog::ProcessCommandL(TInt aCommand) |
|
239 { |
|
240 __LOG("CUPnPAppFileSharingDialog::ProcessCommandL"); |
|
241 |
|
242 HideMenu(); |
|
243 |
|
244 switch ( aCommand ) |
|
245 { |
|
246 case ESharingUiCmdRefresh: |
|
247 { |
|
248 TInt selectedItem = iFileSharingList-> |
|
249 ListBox()->CurrentItemIndex(); |
|
250 iFileSharingEngine.RefreshSharedMediaL( EImageAndVideo ); |
|
251 iFileSharingEngine.RefreshSharedMediaL( EPlaylist ); |
|
252 DisplayInfoL( R_SHARINGUI_UPDATING_CONTENT_HEADER, |
|
253 R_SHARINGUI_UPDATING_CONTENT_NOTE_TEXT, |
|
254 R_SHARINGUI_INFO_QUERY ); |
|
255 break; |
|
256 } |
|
257 case ESharingUiCmdAppChange: |
|
258 { |
|
259 TInt selectedItem = iFileSharingList->ListBox()->CurrentItemIndex(); |
|
260 if ( selectedItem == ESharingUiSettingItemVisibility ) |
|
261 { |
|
262 iFileSharingList->EditItemL(selectedItem, ETrue); |
|
263 } |
|
264 else |
|
265 { |
|
266 RunMultiselectionDialogL(); |
|
267 } |
|
268 break; |
|
269 } |
|
270 |
|
271 case EAknCmdExit: |
|
272 { |
|
273 User::Exit(KErrNone); |
|
274 break; |
|
275 } |
|
276 |
|
277 case EAknCmdHelp: |
|
278 { |
|
279 HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), |
|
280 iEikonEnv->EikAppUi()->AppHelpContextL() ); |
|
281 break; |
|
282 } |
|
283 |
|
284 default: |
|
285 { |
|
286 __LOG("CUPnPAppFileSharingDialog::ProcessCommandL Unknown cmd"); |
|
287 } |
|
288 } |
|
289 |
|
290 CAknDialog::ProcessCommandL(aCommand); |
|
291 } |
|
292 |
|
293 // -------------------------------------------------------------------------- |
|
294 // CUPnPAppSettingsDialog::OfferKeyEventL() |
|
295 // called by framework when key is pressed |
|
296 // -------------------------------------------------------------------------- |
|
297 // |
|
298 TKeyResponse CUPnPAppFileSharingDialog::OfferKeyEventL( |
|
299 const TKeyEvent &aKeyEvent, TEventCode aType ) |
|
300 { |
|
301 __LOG("CUPnPAppFileSharingDialog::OfferKeyEventL"); |
|
302 |
|
303 TKeyResponse retval = EKeyWasNotConsumed; |
|
304 switch ( aKeyEvent.iCode ) |
|
305 { |
|
306 case EKeyDownArrow: |
|
307 case EKeyUpArrow: |
|
308 { |
|
309 if (aType == EEventKey) |
|
310 { |
|
311 retval = iFileSharingList->OfferKeyEventL( aKeyEvent, aType ); |
|
312 } |
|
313 break; |
|
314 } |
|
315 |
|
316 case EKeyOK: |
|
317 { |
|
318 if ( aType == EEventKey ) |
|
319 { |
|
320 TInt selectedItem = |
|
321 iFileSharingList->ListBox()->CurrentItemIndex(); |
|
322 if ( selectedItem == ESharingUiSettingItemVisibility ) |
|
323 { |
|
324 retval = iFileSharingList->OfferKeyEventL(aKeyEvent, aType); |
|
325 } |
|
326 else |
|
327 { |
|
328 RunMultiselectionDialogL(); |
|
329 retval = EKeyWasConsumed; |
|
330 } |
|
331 } |
|
332 break; |
|
333 } |
|
334 |
|
335 default: |
|
336 { |
|
337 retval = CAknDialog::OfferKeyEventL(aKeyEvent, aType); |
|
338 break; |
|
339 } |
|
340 } |
|
341 |
|
342 return retval; |
|
343 } |
|
344 |
|
345 // -------------------------------------------------------------------------- |
|
346 // CUPnPAppFileSharingDialog::HandleSharingStatus |
|
347 // Function informs when file sharing was enabled or disabled |
|
348 // -------------------------------------------------------------------------- |
|
349 // |
|
350 void CUPnPAppFileSharingDialog::HandleSharingStatus( |
|
351 CUPnPFileSharingEngine& aEngine, |
|
352 TInt aError, |
|
353 TBool aPhase ) |
|
354 { |
|
355 __LOG( "[CUPnPAppFileSharingDialog]\t CUPnPAppFileSharingDialog::\ |
|
356 HandleSharingStatus begin"); |
|
357 |
|
358 iFileSharingList->HandleSharingStatus( aEngine, aError, aPhase ); |
|
359 |
|
360 if( !aError ) |
|
361 { |
|
362 TInt strId( R_UPNP_PHONE_HIDDEN_TEXT ); |
|
363 if( aPhase ) |
|
364 { |
|
365 strId = R_UPNP_PHONE_VISIBLE_TEXT; |
|
366 } |
|
367 |
|
368 TRAP_IGNORE( |
|
369 HBufC* str = StringLoader::LoadLC( strId ); |
|
370 CAknInformationNote* note = new ( ELeave ) CAknInformationNote; |
|
371 note->ExecuteLD( *str ); |
|
372 CleanupStack::PopAndDestroy( str ) ); |
|
373 } |
|
374 |
|
375 __LOG( "[CUPnPAppFileSharingDialog]\t CUPnPAppFileSharingDialog::\ |
|
376 HandleSharingStatus end"); |
|
377 } |
|
378 |
|
379 // -------------------------------------------------------------------------- |
|
380 // CUPnPAppFileSharingDialog::HandleSharingProgress |
|
381 // Informs about status of the sharing progress |
|
382 // -------------------------------------------------------------------------- |
|
383 // |
|
384 void CUPnPAppFileSharingDialog::HandleSharingProgress( |
|
385 CUPnPFileSharingEngine& /*aEngine*/, |
|
386 const RArray<TUpnpProgressInfo>& aProgress ) |
|
387 { |
|
388 __LOG( "[CUPnPAppFileSharingDialog]\t CUPnPAppFileSharingDialog::\ |
|
389 HandleSharingProgress begin"); |
|
390 |
|
391 TRAPD( err, |
|
392 CAknInputBlock::NewLC(); |
|
393 iFileSharingList->SetFilesharingTextsL( aProgress ); |
|
394 CleanupStack::PopAndDestroy() ); |
|
395 if ( err != KErrNone ) |
|
396 { |
|
397 //show some critical errors using |
|
398 //default symbian error notes |
|
399 CActiveScheduler::Current()->Error( err ); |
|
400 } |
|
401 |
|
402 __LOG( "[CUPnPAppFileSharingDialog]\t CUPnPAppFileSharingDialog::\ |
|
403 HandleSharingProgress end"); |
|
404 } |
|
405 |
|
406 // -------------------------------------------------------------------------- |
|
407 // CUPnPAppFileSharingDialog::HandleSharingDone |
|
408 // Function informs when file sharing is done |
|
409 // -------------------------------------------------------------------------- |
|
410 // |
|
411 void CUPnPAppFileSharingDialog::HandleSharingDone( |
|
412 CUPnPFileSharingEngine& /*aEngine*/, TInt aError ) |
|
413 { |
|
414 __LOG( "[CUPnPAppFileSharingDialog]\t CUPnPAppFileSharingDialog::\ |
|
415 HandleSharingDone begin"); |
|
416 |
|
417 //Show information note that sharing is completed |
|
418 if ( aError == KErrInUse || |
|
419 aError == KErrNoMemory || |
|
420 aError == KErrDiskFull ) |
|
421 { |
|
422 //show some critical errors using |
|
423 //default symbian error notes |
|
424 CActiveScheduler::Current()->Error( aError ); |
|
425 } |
|
426 |
|
427 __LOG( "[CUPnPAppFileSharingDialog]\t CUPnPAppFileSharingDialog::\ |
|
428 HandleSharingDone end"); |
|
429 } |
|
430 |
|
431 // -------------------------------------------------------------------------- |
|
432 // CUPnPAppFileSharingDialog::HandleSharingConnectionLost |
|
433 // Callback to inform if connection has been lost |
|
434 // -------------------------------------------------------------------------- |
|
435 // |
|
436 void CUPnPAppFileSharingDialog::HandleSharingConnectionLost( |
|
437 CUPnPFileSharingEngine& aEngine ) |
|
438 { |
|
439 __LOG("CUPnPAppFileSharingDialog::HandleSharingConnectionLost"); |
|
440 |
|
441 TRAPD( err, |
|
442 CAknInputBlock::NewLC(); |
|
443 iFileSharingList->HandleSharingConnectionLost( aEngine ); |
|
444 CleanupStack::PopAndDestroy() ); //CAknInputBlock |
|
445 if ( err != KErrNone ) |
|
446 { |
|
447 //show some critical errors using |
|
448 //default symbian error notes |
|
449 CActiveScheduler::Current()->Error( err ); |
|
450 } |
|
451 } |
|
452 |
|
453 // -------------------------------------------------------------------------- |
|
454 // CUPnPAppFileSharingDialog::RunMultiselectionDialogL(); |
|
455 // Opens album selection dialog and sends selected albums |
|
456 // to engine |
|
457 // -------------------------------------------------------------------------- |
|
458 // |
|
459 void CUPnPAppFileSharingDialog::RunMultiselectionDialogL(void) |
|
460 { |
|
461 __LOG("CUPnPAppFileSharingDialog::RunMultiselectionDialogL"); |
|
462 |
|
463 CUPnPMultiselectionUi* multiselectionDialog; |
|
464 |
|
465 TInt selectedItem = iFileSharingList->ListBox()->CurrentItemIndex(); |
|
466 |
|
467 TInt visualSharingState; |
|
468 |
|
469 |
|
470 THomeConnectMediaType mediaType; |
|
471 if ( selectedItem == ESharingUiSettingItemVisual ) |
|
472 { |
|
473 mediaType = |
|
474 EImageAndVideo; |
|
475 } |
|
476 |
|
477 else |
|
478 { |
|
479 mediaType = |
|
480 EPlaylist; |
|
481 } |
|
482 CArrayFix<TInt>* markedItems = new(ELeave) CArrayFixFlat<TInt>(3); |
|
483 CleanupStack::PushL( markedItems ); |
|
484 multiselectionDialog = CUPnPMultiselectionUi::NewL( |
|
485 mediaType, |
|
486 &iFileSharingEngine, |
|
487 visualSharingState, |
|
488 markedItems ); |
|
489 CleanupStack::PushL( multiselectionDialog ); |
|
490 TInt ret = multiselectionDialog->ExecuteDlgLD(); |
|
491 |
|
492 CleanupStack::PopAndDestroy( multiselectionDialog ); |
|
493 |
|
494 multiselectionDialog = NULL; |
|
495 |
|
496 // Set title back |
|
497 iTitlePane->SetTextL(*StringLoader::LoadLC( R_SHARINGUI_TITLE_TEXT )); |
|
498 CleanupStack::PopAndDestroy(); |
|
499 |
|
500 if ( ret ) |
|
501 { |
|
502 __LOG("CUPnPAppFileSharingDialog::RunMultiselectionDialogL: \ |
|
503 Calling ShareMediaFilesL.."); |
|
504 // set selections |
|
505 iFileSharingEngine.SetSelectionIndexesL( mediaType, *markedItems ); |
|
506 |
|
507 // Share files asynchronously |
|
508 iFileSharingEngine.ShareMediaL( mediaType ); |
|
509 |
|
510 DisplayInfoL( R_SHARINGUI_UPDATING_CONTENT_HEADER, |
|
511 R_SHARINGUI_UPDATING_CONTENT_NOTE_TEXT, |
|
512 R_SHARINGUI_INFO_QUERY ); |
|
513 } |
|
514 CleanupStack::PopAndDestroy( markedItems ); |
|
515 |
|
516 } |
|
517 |
|
518 // -------------------------------------------------------------------------- |
|
519 // CUPnPAppFileSharingDialog::GetHelpContext |
|
520 // -------------------------------------------------------------------------- |
|
521 // |
|
522 void CUPnPAppFileSharingDialog::GetHelpContext( |
|
523 TCoeHelpContext& aContext) const |
|
524 { |
|
525 __LOG("CUPnPAppMainDialog::CUPnPAppFileSharingDialog"); |
|
526 |
|
527 aContext.iMajor = TUid::Uid( KHomeConnectUID3 ); |
|
528 aContext.iContext = KUPNP_HLP_SHARE_CONTENT; |
|
529 } |
|
530 |
|
531 // -------------------------------------------------------------------------- |
|
532 // CUPnPAppFileSharingDialog::CreateCustomControlL |
|
533 // From CAknDialog |
|
534 // -------------------------------------------------------------------------- |
|
535 // |
|
536 SEikControlInfo CUPnPAppFileSharingDialog::CreateCustomControlL( |
|
537 TInt aControlType) |
|
538 { |
|
539 __LOG( "[CUPnPAppFileSharingDialog]\t CreateCustomControlL"); |
|
540 iFileSharingList = CUPnPAppFileSharingList::NewL( |
|
541 &iFileSharingEngine ); |
|
542 |
|
543 SEikControlInfo controlInfo; |
|
544 controlInfo.iControl = NULL; |
|
545 controlInfo.iTrailerTextId = 0; |
|
546 controlInfo.iFlags = 0; |
|
547 |
|
548 if ( aControlType == KAknCtLastControlId ) |
|
549 { |
|
550 controlInfo.iControl = iFileSharingList; |
|
551 } |
|
552 iFileSharingEngine.RequestSharingProgressL(); |
|
553 |
|
554 return controlInfo; |
|
555 } |
|
556 |
|
557 // -------------------------------------------------------------------------- |
|
558 // CUPnPAppFileSharingDialog::DisplayInfoL(); |
|
559 // Shows message query to user |
|
560 // -------------------------------------------------------------------------- |
|
561 // |
|
562 void CUPnPAppFileSharingDialog::DisplayInfoL(TInt aHeaderResourceId, |
|
563 TInt aMessageResourceId, |
|
564 TInt aDialogResourceId) |
|
565 { |
|
566 HBufC* noteHeader = StringLoader::LoadL( |
|
567 aHeaderResourceId); |
|
568 CleanupStack::PushL(noteHeader); |
|
569 HBufC* noteMsg = StringLoader::LoadL( |
|
570 aMessageResourceId); |
|
571 CleanupStack::PushL(noteMsg); |
|
572 |
|
573 CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*noteMsg); |
|
574 |
|
575 dlg->PrepareLC(aDialogResourceId); |
|
576 dlg->QueryHeading()->SetTextL(*noteHeader); |
|
577 dlg->RunLD(); |
|
578 |
|
579 CleanupStack::PopAndDestroy(noteMsg); |
|
580 CleanupStack::PopAndDestroy(noteHeader); |
|
581 } |
|
582 |
|
583 // -------------------------------------------------------------------------- |
|
584 // CUPnPAppFileSharingDialog::UpdateFileSharingListL(); |
|
585 // Get the pointer of iFileSharingList,update the visibity of item |
|
586 // -------------------------------------------------------------------------- |
|
587 // |
|
588 EXPORT_C void CUPnPAppFileSharingDialog::UpdateFileSharingListL() |
|
589 { |
|
590 if( iFileSharingList ) |
|
591 { |
|
592 iFileSharingList->UpdateVisibitySettingItemL(); |
|
593 } |
|
594 |
|
595 } |
|
596 // End of File |