profilesservices/ProfileEngine/WrapperSrc/CProEngToneHandler.cpp
branchRCL_3
changeset 53 8ee96d21d9bf
parent 0 8c5d936e5675
child 54 7e0eff37aedb
child 61 33e86ecbfdb4
child 68 13e71d907dc3
equal deleted inserted replaced
51:8bda91a87a00 53:8ee96d21d9bf
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include    "CProEngToneHandler.h"
    21 #include    "CProEngToneHandler.h"
       
    22 #include    "CProEngMediaVariation.h"
    22 #include    <bautils.h> // BaflUtils
    23 #include    <bautils.h> // BaflUtils
    23 #include    <AknGlobalNote.h> // CAknGlobalNote
       
    24 #include    <barsread.h>  // TResourceReader
    24 #include    <barsread.h>  // TResourceReader
    25 #include    <barsc.h>  // RResourceFile
    25 #include    <barsc.h>  // RResourceFile
    26 #include    <e32const.h> // KKilo
    26 #include    <e32const.h> // KKilo
    27 #include    "CProEngMediaVariation.h"
       
    28 #include 	<centralrepository.h>
    27 #include 	<centralrepository.h>
    29 #include    <ProfileEngineDomainCRKeys.h> // KProEngRingingToneMaxSize
    28 #include    <ProfileEngineDomainCRKeys.h> // KProEngRingingToneMaxSize
    30 #include    <ProfileEng.hrh>
    29 #include    <ProfileEng.hrh>
    31 
    30 
    32 namespace
    31 namespace
   208 
   207 
   209 // -----------------------------------------------------------------------------
   208 // -----------------------------------------------------------------------------
   210 // CProEngToneHandler::ShowErrorNoteL
   209 // CProEngToneHandler::ShowErrorNoteL
   211 // -----------------------------------------------------------------------------
   210 // -----------------------------------------------------------------------------
   212 //
   211 //
   213 void CProEngToneHandler::ShowErrorNoteL( TInt aResourceId )
   212 void CProEngToneHandler::ShowErrorNoteL( TInt /*aResourceId*/ )
   214     {
   213     {
   215 	TParse* fp = new(ELeave) TParse();
       
   216 	fp->Set(KProEngResourceFileName, &KDC_RESOURCE_FILES_DIR, NULL);
       
   217 	TFileName localizedFileName( fp->FullName() );
       
   218 	delete fp;
       
   219 
       
   220     BaflUtils::NearestLanguageFile( iFs, localizedFileName );
       
   221 
       
   222     RResourceFile resourceFile;
       
   223     resourceFile.OpenL( iFs, localizedFileName );
       
   224     CleanupClosePushL( resourceFile );
       
   225     resourceFile.ConfirmSignatureL();
       
   226 
       
   227     HBufC8* resBuf = resourceFile.AllocReadLC( aResourceId );
       
   228     TResourceReader reader;
       
   229     reader.SetBuffer( resBuf );
       
   230     TPtrC errorText( reader.ReadTPtrC() );
       
   231 
       
   232     CAknGlobalNote* note = CAknGlobalNote::NewLC();
       
   233     note->ShowNoteL( EAknGlobalInformationNote, errorText );
       
   234 
       
   235 	CleanupStack::PopAndDestroy( 3, &resourceFile );
       
   236     }
   214     }
   237 
   215 
   238 
   216 
   239 // -----------------------------------------------------------------------------
   217 // -----------------------------------------------------------------------------
   240 // CProEngToneHandler::CheckFileSizeLimitL
   218 // CProEngToneHandler::CheckFileSizeLimitL