diff -r 1f002146abb4 -r cee7e9e0906c satengine/SatServer/Engine/src/CSatCommandContainer.cpp --- a/satengine/SatServer/Engine/src/CSatCommandContainer.cpp Tue Jul 06 14:53:02 2010 +0300 +++ b/satengine/SatServer/Engine/src/CSatCommandContainer.cpp Wed Aug 18 10:19:22 2010 +0300 @@ -20,12 +20,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include "MSatSystemState.h" #include "TSatSystemStateFactory.h" @@ -52,16 +52,14 @@ #include "csatmultimodeapi.h" #include "csatsactivewrapper.h" -// Drive letter for resource file -_LIT( KResourceDrive, "Z:" ); -// SatServer's resource file -_LIT( KSatServerRsc, "SatServer.rsc" ); - +_LIT( KResourceDrive, "z:\\resource\\qt\\translations" ); +_LIT( KSatServerRsc, "satapp_"); +_LIT( KSatLogTitle, "txt_simatk_title_sim_services"); +_LIT( KSatCmccTitle, "txt_simatk_titlw_cmcc_sim_services"); const TUid KSatInterfaceDefinitionUid = { 0x1000f001 }; const TInt KSizeOfBuf = 50; -const TInt8 KCreateSatAppNamePop( 2 ); // Important plugins UIDs. These are started on startup // Implementation UID is from the .rss @@ -395,7 +393,7 @@ iIsCmccSim = ETrue; // Update default name read in ConstructL. - TRAPD( err, CreateSatAppNameL( R_QTN_SAT_CMCC_TITLE ) ); + TRAPD( err, CreateSatAppNameL( KSatCmccTitle ) ); LOG2( NORMAL, "SATENGINE: Error: %i", err ) if ( KErrNone == err ) { @@ -627,7 +625,7 @@ { LOG( NORMAL, "SATENGINE: CSatCommandContainer::RestoreSatAppNameL name reset" ) - CreateSatAppNameL( R_QTN_SAT_LOG_TITLE ); + CreateSatAppNameL( KSatLogTitle ); } LOG( NORMAL, "SATENGINE: CSatCommandContainer::RestoreSatAppNameL exiting" ) } @@ -902,7 +900,7 @@ LOG( NORMAL, "SATENGINE: CSatCommandContainer::ConstructL calling" ) iIsCmccSim = EFalse; - CreateSatAppNameL( R_QTN_SAT_LOG_TITLE ); + CreateSatAppNameL( KSatLogTitle ); // Register for ui events in order to keep track if user or command // has launched the ui. @@ -991,52 +989,22 @@ // (other items were commented in a header). // ----------------------------------------------------------------------------- // -void CSatCommandContainer::CreateSatAppNameL( const TInt aResourceId ) +void CSatCommandContainer::CreateSatAppNameL( const TDesC& aResourceId ) { LOG( NORMAL, "SATENGINE: CSatCommandContainer::CreateSatAppNameL calling" ) - - // Open the RFs session. - RFs fs; - - User::LeaveIfError( fs.Connect() ); - - // Push close operation in tbe cleanup stack - CleanupClosePushL( fs ); - - RResourceFile resFile; - // Backslashes are already defined in resource file, not needed here. - TBuf buf( KResourceDrive ); - buf.Append( KDC_RESOURCE_FILES_DIR ); - buf.Append( KSatServerRsc ); - - TFileName fileName( buf ); - - BaflUtils::NearestLanguageFile( fs, fileName ); - - // Open the resource file - resFile.OpenL( fs, fileName ); + delete iSatAppName; + iSatAppName = NULL; + const TBool textResolver = HbTextResolverSymbian::Init( + KSatServerRsc, KResourceDrive ); + LOG2(NORMAL,"SATENGINE: CSatCommandContainer::\ + CreateSatAppNameL textResolver = %d", textResolver ) + LOG2(NORMAL,"SATENGINE: CSatCommandContainer::\ + CreateSatAppNameL aResourceId = %S", &aResourceId ) - // Push close operation in the cleanup stack - CleanupClosePushL( resFile ); - - resFile.ConfirmSignatureL( ESatSResourceSignature ); - - // Reads a resource structure with memory allocation. - HBufC8* dataBuffer = resFile.AllocReadLC( aResourceId ); - - TResourceReader resReader; - resReader.SetBuffer( dataBuffer ); - - // Reads a string with memory allocation - iSatAppName = resReader.ReadHBufCL(); + iSatAppName = HbTextResolverSymbian::LoadL( aResourceId ); + LOG2(NORMAL,"SATENGINE: CSatCommandContainer::\ + CreateSatAppNameL iSatAppName = %S", iSatAppName ) iSatBipName.Copy( SatAppName() ); - - // dataBuffer - CleanupStack::PopAndDestroy( dataBuffer ); - // resFile, Calls resFile.Close() - // fs, Calls fs.Close - CleanupStack::PopAndDestroy( KCreateSatAppNamePop ); - LOG( NORMAL, "SATENGINE: CSatCommandContainer::CreateSatAppNameL exiting" ) }