15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 //SYSTEM INCLUDES |
18 //SYSTEM INCLUDES |
19 #include <centralrepository.h> |
19 #include <centralrepository.h> |
20 #include <dcmo.rsg> |
|
21 #include <e32base.h> |
20 #include <e32base.h> |
22 #include <stringresourcereader.h> |
21 #include <stringresourcereader.h> |
23 #include <f32file.h> |
22 #include <f32file.h> |
24 #include <data_caging_path_literals.hrh> |
23 #include <data_caging_path_literals.hrh> |
25 |
24 |
26 //USER INCLUDES |
25 //USER INCLUDES |
27 #include "nsmldsctrldcmoadapter.h" |
26 #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." ); //use Nsml????? |
36 _LIT(KNsmlDSDCMODescription, "Used to enable/disable the Desktop Sync." ); |
37 // Path used for fetching the string to be displayed |
37 // Filename in which title is present |
38 _LIT( KRuntimeResourceFileName, "z:dcmo.rsc" ); |
38 _LIT( KdcmoResourceFileName, "deviceupdates_" ); |
|
39 // Path to the translation file |
|
40 _LIT( KdcmoResourceFilePath, "z:/resource/qt/translations/" ); |
39 |
41 |
40 // ============================ MEMBER FUNCTIONS =============================== |
42 // ============================ MEMBER FUNCTIONS =============================== |
41 |
43 |
42 // ----------------------------------------------------------------------------- |
44 // ----------------------------------------------------------------------------- |
43 // CNsmlDsCtrlDCMOAdapter::NewL |
45 // CNsmlDsCtrlDCMOAdapter::NewL |
213 // - Get localised name of the Plug-in |
215 // - Get localised name of the Plug-in |
214 // ----------------------------------------------------------------------------- |
216 // ----------------------------------------------------------------------------- |
215 // |
217 // |
216 void CNsmlDsCtrlDCMOAdapter::GetLocalizedNameL (HBufC*& aLocName) |
218 void CNsmlDsCtrlDCMOAdapter::GetLocalizedNameL (HBufC*& aLocName) |
217 { |
219 { |
218 TFileName myFileName; |
220 TBool result = HbTextResolverSymbian::Init(KdcmoResourceFileName, KdcmoResourceFilePath ); |
219 TParse parseObj; |
221 _LIT(KTextDesktopSync, "txt_device_update_info_desktop_sync"); |
220 parseObj.Set( KRuntimeResourceFileName(), &KDC_RESOURCE_FILES_DIR,NULL ); |
222 aLocName = HbTextResolverSymbian::LoadL(KTextDesktopSync); |
221 myFileName = parseObj.FullName(); |
223 } |
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 } |
|