javamanager/javasettings/appmngrplugin/src/appmngr2midletsettingsutil.cpp
branchRCL_3
changeset 19 71c436fe3ce0
parent 14 04becd199f91
child 24 6c158198356e
equal deleted inserted replaced
18:9ac0a0a7da70 19:71c436fe3ce0
   380     }
   380     }
   381     if (aSettingsName == NFC_WRITE_ACCESS_SETTINGS)
   381     if (aSettingsName == NFC_WRITE_ACCESS_SETTINGS)
   382     {
   382     {
   383         return NFC_WRITE_ACCESS_SETTINGS_DISPLAY_INDEX;
   383         return NFC_WRITE_ACCESS_SETTINGS_DISPLAY_INDEX;
   384     }
   384     }
       
   385     if (aSettingsName == URL_START_SETTINGS)
       
   386     {
       
   387         return URL_START_SETTINGS_DISPLAY_INDEX;
       
   388     }
   385     return LAST_SETTINGS_DISPLAY_INDEX;
   389     return LAST_SETTINGS_DISPLAY_INDEX;
   386 }
   390 }
   387 
   391 
   388 int AppMngr2MidletSettingsUtil::findItem(std::vector<LocalizedString> aListItems, std::wstring aListItemId)
   392 int AppMngr2MidletSettingsUtil::findItem(std::vector<LocalizedString> aListItems, std::wstring aListItemId)
   389 {
   393 {
   470     }
   474     }
   471     if (aSettingsName == NFC_WRITE_ACCESS_SETTINGS)
   475     if (aSettingsName == NFC_WRITE_ACCESS_SETTINGS)
   472     {
   476     {
   473         return R_JAVA_SETTING_NFC_WRITE_ACCESS_PAGE;
   477         return R_JAVA_SETTING_NFC_WRITE_ACCESS_PAGE;
   474     }
   478     }
       
   479     if (aSettingsName == URL_START_SETTINGS)
       
   480     {
       
   481         return R_JAVA_SETTING_URL_START_PAGE;
       
   482     }
   475     return R_JAVA_SETTING_DEFAULT_PAGE;
   483     return R_JAVA_SETTING_DEFAULT_PAGE;
   476 
   484 
   477 }
   485 }
   478 
   486 
   479 const wstring AppMngr2MidletSettingsUtil::getLocalizedSettingsName(wstring aSettingsName)
   487 const wstring AppMngr2MidletSettingsUtil::getLocalizedSettingsName(wstring aSettingsName)
   480 {
   488 {
   481     HBufC* localizedName = NULL;
   489     wstring ret = aSettingsName;
   482     if (aSettingsName == ACCESS_POINT_SETTINGS)
   490     TRAP_IGNORE(
   483     {
   491         HBufC* localizedName = NULL;
   484         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NETWORK_DESTINATION);
   492         if (aSettingsName == ACCESS_POINT_SETTINGS)
   485     }
   493         {
   486     else if (aSettingsName == ON_SCREEN_KEYPAD_SETTINGS)
   494             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NETWORK_DESTINATION);
   487     {
   495         }
   488         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_KEYPAD);
   496         else if (aSettingsName == ON_SCREEN_KEYPAD_SETTINGS)
   489     }
   497         {
   490     else if (aSettingsName == SECURITY_WARNINGS_SETTINGS)
   498             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_KEYPAD);
   491     {
   499         }
   492         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_SECURITY_WARNINGS);
   500         else if (aSettingsName == SECURITY_WARNINGS_SETTINGS)
   493     }
   501         {
   494     else if (aSettingsName == NET_ACCESS_SETTINGS)
   502             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_SECURITY_WARNINGS);
   495     {
   503         }
   496         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NET_ACCESS);
   504         else if (aSettingsName == NET_ACCESS_SETTINGS)
   497     }
   505         {
   498     else if (aSettingsName == LOW_LEVEL_NET_ACCESS_SETTINGS)
   506             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NET_ACCESS);
   499     {
   507         }
   500         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOW_LEVEL_NET_ACCESS);
   508         else if (aSettingsName == LOW_LEVEL_NET_ACCESS_SETTINGS)
   501     }
   509         {
   502     else if (aSettingsName == CALL_CONTROL_SETTINGS)
   510             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOW_LEVEL_NET_ACCESS);
   503     {
   511         }
   504         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_RESTRICTED_CALL_CONTROL);
   512         else if (aSettingsName == CALL_CONTROL_SETTINGS)
   505     }
   513         {
   506     else if (aSettingsName == MESSAGING_SETTINGS)
   514             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_RESTRICTED_CALL_CONTROL);
   507     {
   515         }
   508         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_MESSAGING);
   516         else if (aSettingsName == MESSAGING_SETTINGS)
   509     }
   517         {
   510     else if (aSettingsName == RESTRICTED_MESSAGING_SETTINGS)
   518             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_MESSAGING);
   511     {
   519         }
   512         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_RESTRICTED_MESSAGING);
   520         else if (aSettingsName == RESTRICTED_MESSAGING_SETTINGS)
   513     }
   521         {
   514     else if (aSettingsName == APPLICATION_AUTO_INVOCATION_SETTINGS)
   522             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_RESTRICTED_MESSAGING);
   515     {
   523         }
   516         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_APP_AUTO_INVOCAT);
   524         else if (aSettingsName == APPLICATION_AUTO_INVOCATION_SETTINGS)
   517     }
   525         {
   518     else if (aSettingsName == LOCAL_CONNECTIVITY_SETTINGS)
   526             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_APP_AUTO_INVOCAT);
   519     {
   527         }
   520         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOCAL_CONN);
   528         else if (aSettingsName == LOCAL_CONNECTIVITY_SETTINGS)
   521     }
   529         {
   522     else if (aSettingsName == MULTIMEDIA_RECORDING_SETTINGS)
   530             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOCAL_CONN);
   523     {
   531         }
   524         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_MM_RECORD);
   532         else if (aSettingsName == MULTIMEDIA_RECORDING_SETTINGS)
   525     }
   533         {
   526     else if (aSettingsName == READ_USER_DATA_ACCESS_SETTINGS)
   534             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_MM_RECORD);
   527     {
   535         }
   528         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_READ_DATA);
   536         else if (aSettingsName == READ_USER_DATA_ACCESS_SETTINGS)
   529     }
   537         {
   530     else if (aSettingsName == WRITE_USER_DATA_ACCESS_SETTINGS)
   538             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_READ_DATA);
   531     {
   539         }
   532         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_WRITE_DATA);
   540         else if (aSettingsName == WRITE_USER_DATA_ACCESS_SETTINGS)
   533     }
   541         {
   534     else if (aSettingsName == LOCATION_SETTINGS)
   542             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_WRITE_DATA);
   535     {
   543         }
   536         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOCATION);
   544         else if (aSettingsName == LOCATION_SETTINGS)
   537     }
   545         {
   538     else if (aSettingsName == LANDMARK_SETTINGS)
   546             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LOCATION);
   539     {
   547         }
   540         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LANDMARKS);
   548         else if (aSettingsName == LANDMARK_SETTINGS)
   541     }
   549         {
   542     else if (aSettingsName == AUTHENTICATION_SETTINGS)
   550             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_LANDMARKS);
   543     {
   551         }
   544         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_AUT);
   552         else if (aSettingsName == AUTHENTICATION_SETTINGS)
   545     }
   553         {
   546     else if (aSettingsName == SMART_CARD_COMMUNICATION_SETTINGS)
   554             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_AUT);
   547     {
   555         }
   548         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_SMARTCARD);
   556         else if (aSettingsName == SMART_CARD_COMMUNICATION_SETTINGS)
   549     }
   557         {
   550     else if (aSettingsName == BROADCAST_SETTINGS)
   558             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_SMARTCARD);
   551     {
   559         }
   552         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_BROADCAST);
   560         else if (aSettingsName == BROADCAST_SETTINGS)
   553     }
   561         {
   554     else if (aSettingsName == NFC_WRITE_ACCESS_SETTINGS)
   562             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_BROADCAST);
   555     {
   563         }
   556         localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NFC_WRITE_ACCESS);
   564         else if (aSettingsName == NFC_WRITE_ACCESS_SETTINGS)
   557     }
   565         {
   558     if (localizedName != NULL)
   566             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_NFC_WRITE_ACCESS);
   559     {
   567         }
   560         wstring ret = wstring((const wchar_t*)localizedName->Ptr(), localizedName->Length());
   568         else if (aSettingsName == URL_START_SETTINGS)
   561         CleanupStack::PopAndDestroy(localizedName);
   569         {
   562         return ret;
   570             localizedName = StringLoader::LoadLC(R_JAVA_SETTING_NAME_URL_START);
   563     }
   571         }
   564     else
   572         if (localizedName != NULL)
   565     {
   573         {
   566         return aSettingsName;
   574             ret = wstring((const wchar_t*)localizedName->Ptr(), localizedName->Length());
   567     }
   575             CleanupStack::PopAndDestroy(localizedName);
       
   576         }
       
   577     );
       
   578     return ret;
   568 }
   579 }
   569 
   580 
   570 const wstring AppMngr2MidletSettingsUtil::getLocalizedSettingsInteractionMode(int aInteractionMode)
   581 const wstring AppMngr2MidletSettingsUtil::getLocalizedSettingsInteractionMode(int aInteractionMode)
   571 {
   582 {
   572     HBufC* localizedName = NULL;
   583     HBufC* localizedName = NULL;