--- a/commondrm/drmutility/src/DrmUtilityGlobalNoteWrapper.cpp Tue Aug 31 15:29:38 2010 +0300
+++ b/commondrm/drmutility/src/DrmUtilityGlobalNoteWrapper.cpp Wed Sep 01 12:21:16 2010 +0100
@@ -21,6 +21,7 @@
#include <StringLoader.h>
#include <AknGlobalConfirmationQuery.h>
#include <AknGlobalListQuery.h>
+#include <AknGlobalMsgQuery.h>
#include <badesca.h>
#include <avkon.hrh> // EAknSoftkeyNo
#include <drmutility.rsg>
@@ -89,6 +90,7 @@
DRM::CDrmUtilityGlobalNoteWrapper::~CDrmUtilityGlobalNoteWrapper()
{
Cancel(); // Cancel active object
+ delete iGlobalMsgQuery;
}
// -----------------------------------------------------------------------------
@@ -182,6 +184,32 @@
}
// -----------------------------------------------------------------------------
+// CDrmUtilityGlobalNoteWrapper::ShowNoteL
+// -----------------------------------------------------------------------------
+//
+void DRM::CDrmUtilityGlobalNoteWrapper::ShowMessageQueryL(
+ TInt aMessageResourceId,
+ TInt aHeaderResourceId,
+ const TDesC& aString)
+ {
+ TBuf<KDRMNoteBufferMaxSize> messageBuffer(
+ iResourceReader->ReadResourceString( aMessageResourceId ) );
+
+ StringLoader::Format( iFinalMessageBuffer, messageBuffer, -1, aString );
+
+ iHeaderBuffer = iResourceReader->ReadResourceString( aHeaderResourceId );
+
+ CAknGlobalMsgQuery* iGlobalMsgQuery = CAknGlobalMsgQuery::NewL();
+
+ iStatus = KRequestPending;
+ iGlobalMsgQuery->ShowMsgQueryL(iStatus, iFinalMessageBuffer,
+ R_AVKON_SOFTKEYS_OK_EMPTY, iHeaderBuffer, KNullDesC);
+
+ SetActive();
+ iWait.Start();
+ }
+
+// -----------------------------------------------------------------------------
// CDrmUtilityGlobalNoteWrapper::ShowPreviewListQueryL
// -----------------------------------------------------------------------------
//
@@ -305,6 +333,10 @@
void DRM::CDrmUtilityGlobalNoteWrapper::RunL()
{
iWait.AsyncStop();
+ if(iGlobalMsgQuery)
+ {
+ iGlobalMsgQuery->CancelMsgQuery();
+ }
}
// -----------------------------------------------------------------------------