commondrm/drmutility/src/drmutilityui.cpp
branchRCL_3
changeset 32 457cd4423b8c
parent 18 8a03a285ab14
child 71 1221b68b8a5f
equal deleted inserted replaced
25:04da681812a9 32:457cd4423b8c
    30 #include <stringresourcereader.h>
    30 #include <stringresourcereader.h>
    31 #include <aknnotewrappers.h>
    31 #include <aknnotewrappers.h>
    32 #include <AknGlobalNote.h>
    32 #include <AknGlobalNote.h>
    33 #include <AknQueryDialog.h>
    33 #include <AknQueryDialog.h>
    34 #include <aknlistquerydialog.h>
    34 #include <aknlistquerydialog.h>
       
    35 #include <aknmessagequerydialog.h> 
    35 
    36 
    36 // secondary display support
    37 // secondary display support
    37 #include <AknMediatorFacade.h>
    38 #include <AknMediatorFacade.h>
    38 #include <featmgr.h>
    39 #include <featmgr.h>
    39 #include <aknSDData.h>
    40 #include <aknSDData.h>
   229 
   230 
   230     iNoteList.ResetAndDestroy();
   231     iNoteList.ResetAndDestroy();
   231     iNoteList.Close();
   232     iNoteList.Close();
   232 
   233 
   233     FeatureManager::UnInitializeLib();
   234     FeatureManager::UnInitializeLib();
       
   235     delete iNoteWrapper;	
       
   236     	
   234     }
   237     }
   235 
   238 
   236 // -----------------------------------------------------------------------------
   239 // -----------------------------------------------------------------------------
   237 // CDrmUtilityUI::DisplayQueryWithIdL
   240 // CDrmUtilityUI::DisplayQueryWithIdL
   238 // -----------------------------------------------------------------------------
   241 // -----------------------------------------------------------------------------
   767     return 0;
   770     return 0;
   768     }
   771     }
   769 
   772 
   770 #endif  // RD_DRM_PREVIEW_RIGHT_FOR_AUDIO
   773 #endif  // RD_DRM_PREVIEW_RIGHT_FOR_AUDIO
   771 
   774 
       
   775 EXPORT_C TInt DRM::CDrmUtilityUI::DisplayMessageQueryL( TInt aMessage, TInt aHeader, const TDesC& aString)
       
   776     {
       
   777     TInt buttonCode = 0;
       
   778 		if ( iCoeEnv )
       
   779 	    	{
       
   780 		    CAknMessageQueryDialog* messageQuery = new (ELeave) CAknMessageQueryDialog();
       
   781 		    messageQuery->PrepareLC(R_DRMUTILITY_SYNC_DIALOG);
       
   782 		    		    
       
   783 		    HBufC* headerStringholder ( StringLoader::LoadLC( aHeader, iCoeEnv ) );
       
   784         
       
   785 		    messageQuery->QueryHeading()->SetTextL(*headerStringholder);
       
   786  				CleanupStack::PopAndDestroy(); // headerStringholder
       
   787  				 				
       
   788  				HBufC* messageStringholder ( StringLoader::LoadLC( aMessage, aString, iCoeEnv ) );
       
   789  				
       
   790  				messageQuery->SetMessageTextL(*messageStringholder);
       
   791  				CleanupStack::PopAndDestroy(); // messageStringholder
       
   792 		    
       
   793 		    buttonCode =  messageQuery->RunLD();
       
   794 		    }
       
   795 		else
       
   796 		  	{
       
   797 		  	if(!iNoteWrapper)
       
   798 		  			{
       
   799 		    		iNoteWrapper = DRM::CDrmUtilityGlobalNoteWrapper::NewL( iUtilityStringResourceReader );
       
   800         		}
       
   801         		
       
   802         iNoteWrapper->ShowMessageQueryL(aMessage, aHeader, aString);
       
   803 				}
       
   804 		return buttonCode;
       
   805     }
       
   806 
       
   807 
   772 // -----------------------------------------------------------------------------
   808 // -----------------------------------------------------------------------------
   773 // CDrmUtilityUI::CreateNoteForResourceL
   809 // CDrmUtilityUI::CreateNoteForResourceL
   774 // -----------------------------------------------------------------------------
   810 // -----------------------------------------------------------------------------
   775 //
   811 //
   776 CAknResourceNoteDialog* DRM::CDrmUtilityUI::CreateNoteForResourceL(
   812 CAknResourceNoteDialog* DRM::CDrmUtilityUI::CreateNoteForResourceL(