dsdcmoadapter/src/nsmldsctrldcmoadapter.cpp
branchRCL_3
changeset 25 4f0867e42d62
parent 24 8e7494275d3a
equal deleted inserted replaced
24:8e7494275d3a 25:4f0867e42d62
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 //SYSTEM INCLUDES
    18 //SYSTEM INCLUDES
    19 #include <centralrepository.h>
    19 #include <centralrepository.h>
       
    20 #include <dcmo.rsg>
    20 #include <e32base.h>
    21 #include <e32base.h>
    21 #include <stringresourcereader.h> 
    22 #include <stringresourcereader.h> 
    22 #include <f32file.h> 
    23 #include <f32file.h> 
    23 #include <data_caging_path_literals.hrh>
    24 #include <data_caging_path_literals.hrh>
    24 
    25 
    25 //USER INCLUDES
    26 //USER INCLUDES
    26 #include "nsmldsctrldcmoadapter.h"
    27 #include "nsmldsctrldcmoadapter.h"
    27 #include "hbtextresolversymbian.h"
       
    28 
    28 
    29 // CONSTANTS
    29 // CONSTANTS
    30 const TUid KCRUidDSDCMOConfig = { 0x20022FC0 };
    30 const TUid KCRUidDSDCMOConfig = { 0x20022FC0 };
    31 const TInt KNsmlDesktopSync = 0; // 0x0000000 defined in DS cenrep
    31 const TInt KNsmlDesktopSync = 0; // 0x0000000 defined in DS cenrep
    32 
    32 
    33 // Name of the Plug-in adapter
    33 // Name of the Plug-in adapter
    34 _LIT(KNsmlDesktopSyncTitle, "Desktop Sync"); 
    34 _LIT(KNsmlDesktopSyncTitle, "Desktop Sync"); 
    35 // Description for Desktop Sync adapter
    35 // Description for Desktop Sync adapter
    36 _LIT(KNsmlDSDCMODescription, "Used to enable/disable the Desktop Sync." );
    36 _LIT(KNsmlDSDCMODescription, "Used to enable/disable the Desktop Sync." ); //use Nsml?????
    37 // Filename in which title is present
    37 // Path used for fetching the string to be displayed
    38 _LIT( KdcmoResourceFileName, "deviceupdates_" );
    38 _LIT( KRuntimeResourceFileName, "z:dcmo.rsc" );
    39 // Path to the translation file
       
    40 _LIT( KdcmoResourceFilePath, "z:/resource/qt/translations/" );	
       
    41 
    39 
    42 // ============================ MEMBER FUNCTIONS ===============================
    40 // ============================ MEMBER FUNCTIONS ===============================
    43 
    41 
    44 // -----------------------------------------------------------------------------
    42 // -----------------------------------------------------------------------------
    45 // CNsmlDsCtrlDCMOAdapter::NewL
    43 // CNsmlDsCtrlDCMOAdapter::NewL
   215 // - Get localised name of the Plug-in
   213 // - Get localised name of the Plug-in
   216 // -----------------------------------------------------------------------------
   214 // -----------------------------------------------------------------------------
   217 //
   215 //
   218 void CNsmlDsCtrlDCMOAdapter::GetLocalizedNameL (HBufC*& aLocName)
   216 void CNsmlDsCtrlDCMOAdapter::GetLocalizedNameL (HBufC*& aLocName)
   219 {
   217 {
   220 	TBool result = HbTextResolverSymbian::Init(KdcmoResourceFileName, KdcmoResourceFilePath );				
   218 	TFileName myFileName;
   221 	_LIT(KTextDesktopSync, "txt_device_update_info_desktop_sync");
   219 	TParse parseObj;
   222 	aLocName = HbTextResolverSymbian::LoadL(KTextDesktopSync);
   220 	parseObj.Set( KRuntimeResourceFileName(), &KDC_RESOURCE_FILES_DIR,NULL );
   223 }
   221 	myFileName = parseObj.FullName();
       
   222 	CStringResourceReader* readPluginName = CStringResourceReader::NewL( myFileName );
       
   223 	CleanupStack::PushL(readPluginName);
       
   224 	TPtrC buf;
       
   225 	buf.Set(readPluginName->ReadResourceString(R_DM_RUN_TIME_VAR_DESKTOP_SYNC));
       
   226 	aLocName = buf.AllocL() ; 
       
   227 	CleanupStack::PopAndDestroy(readPluginName);
       
   228 }