commondrm/drmutility/src/DrmUtilityGlobalNoteWrapper.cpp
branchRCL_3
changeset 26 1221b68b8a5f
parent 16 457cd4423b8c
child 27 1481bf457703
equal deleted inserted replaced
25:50c53e893c3f 26:1221b68b8a5f
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include <StringLoader.h>
    21 #include <StringLoader.h>
    22 #include <AknGlobalConfirmationQuery.h>
    22 #include <AknGlobalConfirmationQuery.h>
    23 #include <AknGlobalListQuery.h>
    23 #include <AknGlobalListQuery.h>
    24 #include <AknGlobalMsgQuery.h>
       
    25 #include <badesca.h>
    24 #include <badesca.h>
    26 #include <avkon.hrh> // EAknSoftkeyNo
    25 #include <avkon.hrh> // EAknSoftkeyNo
    27 #include <drmutility.rsg>
    26 #include <drmutility.rsg>
    28 
    27 
    29 #include <AknMediatorFacade.h>
    28 #include <AknMediatorFacade.h>
    88 
    87 
    89 // Destructor
    88 // Destructor
    90 DRM::CDrmUtilityGlobalNoteWrapper::~CDrmUtilityGlobalNoteWrapper()
    89 DRM::CDrmUtilityGlobalNoteWrapper::~CDrmUtilityGlobalNoteWrapper()
    91     {
    90     {
    92     Cancel(); // Cancel active object
    91     Cancel(); // Cancel active object
    93     delete iGlobalMsgQuery;	
       
    94     }
    92     }
    95 
    93 
    96 // -----------------------------------------------------------------------------
    94 // -----------------------------------------------------------------------------
    97 // CDrmUtilityGlobalNoteWrapper::ShowNoteL
    95 // CDrmUtilityGlobalNoteWrapper::ShowNoteL
    98 // -----------------------------------------------------------------------------
    96 // -----------------------------------------------------------------------------
   179 
   177 
   180     StringLoader::Format( iTextBuffer, srcBuffer, aValuePos, aValue );
   178     StringLoader::Format( iTextBuffer, srcBuffer, aValuePos, aValue );
   181     srcBuffer = iTextBuffer;
   179     srcBuffer = iTextBuffer;
   182     StringLoader::Format( iTextBuffer, srcBuffer, aStringPos, aString );
   180     StringLoader::Format( iTextBuffer, srcBuffer, aStringPos, aString );
   183     return DoShowNoteL( aResourceId, aString, aValue );
   181     return DoShowNoteL( aResourceId, aString, aValue );
   184     }
       
   185 
       
   186 // -----------------------------------------------------------------------------
       
   187 // CDrmUtilityGlobalNoteWrapper::ShowNoteL
       
   188 // -----------------------------------------------------------------------------
       
   189 //
       
   190 void DRM::CDrmUtilityGlobalNoteWrapper::ShowMessageQueryL(
       
   191     TInt aMessageResourceId,
       
   192     TInt aHeaderResourceId,
       
   193     const TDesC& aString)
       
   194     {
       
   195     TBuf<KDRMNoteBufferMaxSize> messageBuffer(
       
   196         iResourceReader->ReadResourceString( aMessageResourceId ) );
       
   197 
       
   198     StringLoader::Format( iFinalMessageBuffer, messageBuffer, -1, aString );
       
   199     
       
   200     iHeaderBuffer = iResourceReader->ReadResourceString( aHeaderResourceId );
       
   201     
       
   202     CAknGlobalMsgQuery* iGlobalMsgQuery = CAknGlobalMsgQuery::NewL();
       
   203     
       
   204     iStatus = KRequestPending;
       
   205     iGlobalMsgQuery->ShowMsgQueryL(iStatus, iFinalMessageBuffer, 
       
   206           R_AVKON_SOFTKEYS_OK_EMPTY, iHeaderBuffer, KNullDesC);
       
   207           
       
   208     SetActive();
       
   209     iWait.Start();
       
   210     }
   182     }
   211 
   183 
   212 // -----------------------------------------------------------------------------
   184 // -----------------------------------------------------------------------------
   213 // CDrmUtilityGlobalNoteWrapper::ShowPreviewListQueryL
   185 // CDrmUtilityGlobalNoteWrapper::ShowPreviewListQueryL
   214 // -----------------------------------------------------------------------------
   186 // -----------------------------------------------------------------------------
   331 // -----------------------------------------------------------------------------
   303 // -----------------------------------------------------------------------------
   332 //
   304 //
   333 void DRM::CDrmUtilityGlobalNoteWrapper::RunL()
   305 void DRM::CDrmUtilityGlobalNoteWrapper::RunL()
   334     {
   306     {
   335     iWait.AsyncStop();
   307     iWait.AsyncStop();
   336     if(iGlobalMsgQuery)
       
   337     		{
       
   338     		iGlobalMsgQuery->CancelMsgQuery();
       
   339     		}
       
   340     }
   308     }
   341 
   309 
   342 // -----------------------------------------------------------------------------
   310 // -----------------------------------------------------------------------------
   343 // CDrmUtilityGlobalNoteWrapper::DoShowNoteL
   311 // CDrmUtilityGlobalNoteWrapper::DoShowNoteL
   344 // -----------------------------------------------------------------------------
   312 // -----------------------------------------------------------------------------