mobilemessaging/smum/src/SmumSettingsDialogGSM.cpp
branchRCL_3
changeset 54 fa1df4b99609
parent 22 52d61119153d
equal deleted inserted replaced
53:696bfeff199e 54:fa1df4b99609
   148     CAknDialog::ConstructL( R_MAIN_SMS_SETTINGS_CHOICE_MENUBAR );
   148     CAknDialog::ConstructL( R_MAIN_SMS_SETTINGS_CHOICE_MENUBAR );
   149 
   149 
   150     // Prepare FeatureManager, read values to members and uninitialize FeatureManager
   150     // Prepare FeatureManager, read values to members and uninitialize FeatureManager
   151     FeatureManager::InitializeLibL();
   151     FeatureManager::InitializeLibL();
   152     iHelpFeatureSupported = FeatureManager::FeatureSupported( KFeatureIdHelp );
   152     iHelpFeatureSupported = FeatureManager::FeatureSupported( KFeatureIdHelp );
       
   153     // REQ:417-48417 Message forward with sender info
       
   154     iForwardWithSenderSupported = FeatureManager::FeatureSupported(KFeatureIdMsgForwardWithSender);     
       
   155     // End REQ:417-48417
   153     FeatureManager::UnInitializeLib();
   156     FeatureManager::UnInitializeLib();
   154     // Read the supported settings
   157     // Read the supported settings
   155     iEmailFeatureSupported = SmumUtil::CheckEmailOverSmsSupportL();
   158     iEmailFeatureSupported = SmumUtil::CheckEmailOverSmsSupportL();
   156     ReadCspSupportBitsL();
   159     ReadCspSupportBitsL();
   157     iCentralRapository = CRepository::NewL( KCRUidSmum );
   160     iCentralRapository = CRepository::NewL( KCRUidSmum );
   622                 ESmumSendOptReplyViaSameCentreLBI : ESmumReplyViaSameCentreLBI, key, index ) )
   625                 ESmumSendOptReplyViaSameCentreLBI : ESmumReplyViaSameCentreLBI, key, index ) )
   623             {
   626             {
   624             SetItem( index, iSettings.ReplyPath() ? ESmumSettingsYes : ESmumSettingsNo );
   627             SetItem( index, iSettings.ReplyPath() ? ESmumSettingsYes : ESmumSettingsNo );
   625             }
   628             }
   626         }
   629         }
       
   630     
       
   631     // REQ:417-48417 Message forward with sender info
       
   632        if (!iTypeOfSettings && iForwardWithSenderSupported)
       
   633         {  
       
   634         if ( !iSettingsArrayIndex->Find ( ESmumForwardWithSenderInfoLBI, key, index ) )
       
   635             {
       
   636             TInt forwardWithSenderInfo;
       
   637             if ( iCentralRapository->Get( KForwardWithSenderInfo, forwardWithSenderInfo ) != KErrNone )
       
   638                 {
       
   639                 //In case of any error,set the default value to 0
       
   640                 forwardWithSenderInfo = 0;            
       
   641                 }
       
   642             SetItem(index, forwardWithSenderInfo? ESmumSettingsYes : ESmumSettingsNo);
       
   643             }                
       
   644         }
       
   645     // End REQ:417-48417
       
   646 
   627     SMUMLOGGER_LEAVEFN(" CSmumMainSettingsDialogGSM::OpeningDialogL");
   647     SMUMLOGGER_LEAVEFN(" CSmumMainSettingsDialogGSM::OpeningDialogL");
   628     }
   648     }
   629 
   649 
   630 // ----------------------------------------------------
   650 // ----------------------------------------------------
   631 // CSmumMainSettingsDialogGSM::ClosingDialogL
   651 // CSmumMainSettingsDialogGSM::ClosingDialogL
   764             ESmumSendOptReplyViaSameCentreLBI : ESmumReplyViaSameCentreLBI, key, index ) )
   784             ESmumSendOptReplyViaSameCentreLBI : ESmumReplyViaSameCentreLBI, key, index ) )
   765             {
   785             {
   766             iSettings.SetReplyPath( Item( index ) == ESmumSettingsYes );
   786             iSettings.SetReplyPath( Item( index ) == ESmumSettingsYes );
   767             }
   787             }
   768         }
   788         }
       
   789         
       
   790     // REQ:417-48417 Message forward with sender info
       
   791     if (!iTypeOfSettings && iForwardWithSenderSupported)
       
   792         {        
       
   793         if (!iSettingsArrayIndex->Find ( ESmumForwardWithSenderInfoLBI, key, index ))
       
   794             {        
       
   795             iCentralRapository->Set(KForwardWithSenderInfo , Item( index ) == ESmumSettingsYes);
       
   796             }
       
   797         }        
       
   798     // End REQ:417-48417
       
   799     
   769     SMUMLOGGER_LEAVEFN(" CSmumMainSettingsDialogGSM::ClosingDialogL");
   800     SMUMLOGGER_LEAVEFN(" CSmumMainSettingsDialogGSM::ClosingDialogL");
   770     }
   801     }
   771 
   802 
   772 // ----------------------------------------------------
   803 // ----------------------------------------------------
   773 // CSmumMainSettingsDialogGSM::SetItem
   804 // CSmumMainSettingsDialogGSM::SetItem
  1089 	            {
  1120 	            {
  1090 	            variatedValue += 2; // ESmumEmailServiceCentreLBI
  1121 	            variatedValue += 2; // ESmumEmailServiceCentreLBI
  1091 	            }					// ServiceCentreInUseLBI are removed
  1122 	            }					// ServiceCentreInUseLBI are removed
  1092             }
  1123             }
  1093         }
  1124         }
       
  1125     // REQ:417-48417 Message forward with sender info
       
  1126     if (!iTypeOfSettings)
       
  1127         {
       
  1128         if (!iForwardWithSenderSupported && variatedValue >= ESmumForwardWithSenderInfoLBI)
       
  1129             {
       
  1130             variatedValue ++; // if not support this feature, ESmumForwardWithSenderInfoLBI is removed
       
  1131             }
       
  1132         }
       
  1133     // End REQ:417-48417
  1094     return variatedValue;    
  1134     return variatedValue;    
  1095     }
  1135     }
  1096 
  1136 
  1097 // ---------------------------------------------------------------------------
  1137 // ---------------------------------------------------------------------------
  1098 // CSmumMainSettingsDialogGSM::DeleteVariatedSettings
  1138 // CSmumMainSettingsDialogGSM::DeleteVariatedSettings
  1148         {
  1188         {
  1149         DeleteSettingItemFromArrays(iTypeOfSettings ? 
  1189         DeleteSettingItemFromArrays(iTypeOfSettings ? 
  1150         	 ESmumSendOptServiceCentreInUseLBI : ESmumServiceCentreInUseLBI );
  1190         	 ESmumSendOptServiceCentreInUseLBI : ESmumServiceCentreInUseLBI );
  1151         needToBeCompressed = ETrue;
  1191         needToBeCompressed = ETrue;
  1152         }
  1192         }
       
  1193         
       
  1194     // REQ:417-48417 Message forward with sender info    
       
  1195     if (!iForwardWithSenderSupported && !iTypeOfSettings)
       
  1196         {
       
  1197         TInt index;
       
  1198         TKeyArrayFix key(0, ECmpTInt); 
       
  1199         TInt found = iSettingsArrayIndex->Find(ESmumForwardWithSenderInfoLBI, key, index);
       
  1200         if (0 == found)
       
  1201             {
       
  1202             DeleteSettingItemFromArrays(index);
       
  1203             needToBeCompressed = ETrue;
       
  1204             }
       
  1205         }
       
  1206     // End REQ:417-48417
       
  1207         
  1153     if ( needToBeCompressed )
  1208     if ( needToBeCompressed )
  1154         {
  1209         {
  1155         iSettingsArray->Compress();
  1210         iSettingsArray->Compress();
  1156         iSettingsArrayIndex->Compress();
  1211         iSettingsArrayIndex->Compress();
  1157         }
  1212         }