38 #include <csxhelp/sms.hlp.hrh> |
38 #include <csxhelp/sms.hlp.hrh> |
39 #include <messagingvariant.hrh> |
39 #include <messagingvariant.hrh> |
40 #include <RCustomerServiceProfileCache.h> |
40 #include <RCustomerServiceProfileCache.h> |
41 #include <centralrepository.h> // CRepository |
41 #include <centralrepository.h> // CRepository |
42 #include <messaginginternalcrkeys.h> // Keys |
42 #include <messaginginternalcrkeys.h> // Keys |
|
43 #include <MessagingInternalPSKeys.h> |
43 |
44 |
44 // locals |
45 // locals |
45 #include "smsui.pan" // for panics |
46 #include "smsui.pan" // for panics |
46 #include "SmumSettingsDialogGSM.h" // CSmumMainSettingsDialogGSM |
47 #include "SmumSettingsDialogGSM.h" // CSmumMainSettingsDialogGSM |
47 #include "SmumServiceCentreItemDialog.h"// CSmumAddEditServiceCentreDialog |
48 #include "SmumServiceCentreItemDialog.h"// CSmumAddEditServiceCentreDialog |
111 SMUMLOGGER_ENTERFN(" CSmumMainSettingsDialogGSM::~CSmumMainSettingsDialogGSM"); |
112 SMUMLOGGER_ENTERFN(" CSmumMainSettingsDialogGSM::~CSmumMainSettingsDialogGSM"); |
112 if ( iListBox ) |
113 if ( iListBox ) |
113 { |
114 { |
114 iListBox->SetScrollBarFrame( NULL, CEikListBox::EOwnedExternally ); |
115 iListBox->SetScrollBarFrame( NULL, CEikListBox::EOwnedExternally ); |
115 } |
116 } |
|
117 // To remove sending options from Message Settings |
|
118 RProperty::Delete( KPSUidMuiu, KMuiuRemoveMsgSentSettings ); |
116 delete iPreviousTitleText; |
119 delete iPreviousTitleText; |
117 delete iSettingsArrayIndex; |
120 delete iSettingsArrayIndex; |
118 delete iCentralRapository; |
121 delete iCentralRapository; |
119 delete iIdle; |
122 delete iIdle; |
120 // iSettingsArray, iListBox, iSettings(reference), iSettingsForReadingSCList, |
123 // iSettingsArray, iListBox, iSettings(reference), iSettingsForReadingSCList, |
157 if ( SmumUtil::CheckVariationFlagsL( KCRUidMuiuVariation, KMuiuSmsFeatures ) & |
160 if ( SmumUtil::CheckVariationFlagsL( KCRUidMuiuVariation, KMuiuSmsFeatures ) & |
158 KSmsFeatureIdSimServiceCentresOnly ) |
161 KSmsFeatureIdSimServiceCentresOnly ) |
159 { |
162 { |
160 iUseSimSCsOnly = ETrue; |
163 iUseSimSCsOnly = ETrue; |
161 } |
164 } |
|
165 // Define the property to remove sending options from Message Settings |
|
166 TInt r = RProperty::Define( KPSUidMuiu, KMuiuRemoveMsgSentSettings, RProperty::EInt ); |
|
167 if ( r != KErrAlreadyExists ) |
|
168 { |
|
169 User::LeaveIfError( r ); |
|
170 } |
|
171 // Initialise the value of key as 0 |
|
172 RProperty::Set( KPSUidMuiu, KMuiuRemoveMsgSentSettings, 0) ; |
|
173 |
162 SMUMLOGGER_LEAVEFN(" CSmumMainSettingsDialogGSM::ConstructL"); |
174 SMUMLOGGER_LEAVEFN(" CSmumMainSettingsDialogGSM::ConstructL"); |
163 } |
175 } |
164 |
176 |
165 // ---------------------------------------------------- |
177 // ---------------------------------------------------- |
166 // CSmumMainSettingsDialogGSM::OkToExitL |
178 // CSmumMainSettingsDialogGSM::OkToExitL |
297 void CSmumMainSettingsDialogGSM::PreLayoutDynInitL() |
309 void CSmumMainSettingsDialogGSM::PreLayoutDynInitL() |
298 { |
310 { |
299 SMUMLOGGER_ENTERFN(" CSmumMainSettingsDialogGSM::PreLayoutDynInitL"); |
311 SMUMLOGGER_ENTERFN(" CSmumMainSettingsDialogGSM::PreLayoutDynInitL"); |
300 // Creating correct listbox depending Settings vs Sending Options |
312 // Creating correct listbox depending Settings vs Sending Options |
301 iListBox = STATIC_CAST( CEikTextListBox*, Control( ESmsSettingsListBoxId )); |
313 iListBox = STATIC_CAST( CEikTextListBox*, Control( ESmsSettingsListBoxId )); |
|
314 |
|
315 // To remove sending options from Message Settings ,set the key value as 1 |
|
316 TInt err = RProperty::Set( KPSUidMuiu, KMuiuRemoveMsgSentSettings, 1 ) ; |
|
317 User::LeaveIfError(err); |
|
318 |
302 iSettingsArray = CSmumSettingsArray::NewL( iTypeOfSettings ? |
319 iSettingsArray = CSmumSettingsArray::NewL( iTypeOfSettings ? |
303 R_SMS_SENDING_OPTIONS_ITEMS : R_SMS_MAIN_SETTINGS_ITEMS ); |
320 R_SMS_SENDING_OPTIONS_ITEMS : R_SMS_MAIN_SETTINGS_ITEMS ); |
304 |
321 |
305 // The count of setting items depends of setting type |
322 // The count of setting items depends of setting type |
306 TInt numberOfSettingItems = iTypeOfSettings ? |
323 TInt numberOfSettingItems = iTypeOfSettings ? |
307 ESmumSendOptReplyViaSameCentreLBI + 1 : ESmumReplyViaSameCentreLBI + 1; |
324 ESmumSendOptReplyViaSameCentreLBI : ESmumReplyViaSameCentreLBI ; |
308 iSettingsArrayIndex = new(ELeave) CArrayFixFlat<TInt>( numberOfSettingItems ); |
325 iSettingsArrayIndex = new(ELeave) CArrayFixFlat<TInt>( numberOfSettingItems ); |
309 // Iterate through settings |
326 // Iterate through settings |
310 for (TInt count = 0; count < numberOfSettingItems; count++) |
327 for (TInt count = 0; count < numberOfSettingItems; count++) |
311 { |
328 { |
312 iSettingsArrayIndex->AppendL( count ); // Indicates that setting is present |
329 iSettingsArrayIndex->AppendL( count ); // Indicates that setting is present |
573 } |
590 } |
574 SetItem( index, choicelistIndex); |
591 SetItem( index, choicelistIndex); |
575 } |
592 } |
576 } |
593 } |
577 |
594 |
578 // Message conversion |
|
579 if ( iCSPFeatures & EProtocolIDSupport ) |
|
580 { |
|
581 if ( !iSettingsArrayIndex->Find ( iTypeOfSettings ? |
|
582 ESmumSendOptMessageConversionLBI : ESmumMessageConversionLBI, key, index ) ) |
|
583 { |
|
584 // Message Conversion |
|
585 switch(iSettings.MessageConversion()) |
|
586 { |
|
587 case ESmsConvPIDNone: |
|
588 choicelistIndex = ESmumConversionNone; |
|
589 break; |
|
590 case ESmsConvFax: |
|
591 choicelistIndex = ESmumConversionFax; |
|
592 break; |
|
593 case ESmsConvPaging: |
|
594 choicelistIndex = ESmumConversionPaging; |
|
595 break; |
|
596 case ESmsConvX400: |
|
597 case ESmsConvErmes: |
|
598 case ESmsConvSpeech: |
|
599 default: |
|
600 #if defined (_DEBUG) |
|
601 Panic( ESmsetdlgUnknownConversion ); |
|
602 #else |
|
603 // drop through in release version |
|
604 choicelistIndex = ESmumConversionNone; |
|
605 #endif |
|
606 break; |
|
607 } |
|
608 SetItem( index, choicelistIndex); |
|
609 } |
|
610 } |
|
611 |
|
612 // Preferred Connection |
595 // Preferred Connection |
613 if ( !iTypeOfSettings ) |
596 if ( !iTypeOfSettings ) |
614 { |
597 { |
615 if ( !iSettingsArrayIndex->Find ( ESmumPreferredConnectionLBI, key, index ) ) |
598 if ( !iSettingsArrayIndex->Find ( ESmumPreferredConnectionLBI, key, index ) ) |
616 { |
599 { |
751 break; |
734 break; |
752 } |
735 } |
753 iSettings.SetValidityPeriod( validityPeriod ); |
736 iSettings.SetValidityPeriod( validityPeriod ); |
754 } |
737 } |
755 } |
738 } |
756 |
739 |
757 // Message Conversion |
|
758 if ( iCSPFeatures & EProtocolIDSupport ) |
|
759 { |
|
760 if ( !iSettingsArrayIndex->Find ( iTypeOfSettings ? |
|
761 ESmumSendOptMessageConversionLBI : ESmumMessageConversionLBI, key, index ) ) |
|
762 { |
|
763 TInt choicelistIndex = KErrNotFound; |
|
764 switch( Item( index )) |
|
765 { |
|
766 case ESmumConversionNone: |
|
767 choicelistIndex = ESmsConvPIDNone; |
|
768 break; |
|
769 case ESmumConversionFax: |
|
770 choicelistIndex = ESmsConvFax; |
|
771 break; |
|
772 case ESmumConversionPaging: |
|
773 choicelistIndex = ESmsConvPaging; |
|
774 break; |
|
775 default: |
|
776 #if defined ( _DEBUG ) |
|
777 Panic( ESmsetdlgUnknownConversion ); |
|
778 #else |
|
779 // drop through in release version |
|
780 choicelistIndex = ESmsConvPIDNone; |
|
781 #endif |
|
782 break; |
|
783 } |
|
784 iSettings.SetMessageConversion(STATIC_CAST( |
|
785 TSmsPIDConversion, |
|
786 choicelistIndex )); |
|
787 } |
|
788 } |
|
789 |
|
790 // Preferred Connection |
740 // Preferred Connection |
791 if ( !iTypeOfSettings ) |
741 if ( !iTypeOfSettings ) |
792 { |
742 { |
793 if ( !iSettingsArrayIndex->Find ( ESmumPreferredConnectionLBI, key, index ) ) |
743 if ( !iSettingsArrayIndex->Find ( ESmumPreferredConnectionLBI, key, index ) ) |
794 { |
744 { |
1162 "DeleteVariatedSettings - EReplyPathSupport") |
1112 "DeleteVariatedSettings - EReplyPathSupport") |
1163 DeleteSettingItemFromArrays( iTypeOfSettings ? |
1113 DeleteSettingItemFromArrays( iTypeOfSettings ? |
1164 ESmumSendOptReplyViaSameCentreLBI : ESmumReplyViaSameCentreLBI ); |
1114 ESmumSendOptReplyViaSameCentreLBI : ESmumReplyViaSameCentreLBI ); |
1165 needToBeCompressed = ETrue; |
1115 needToBeCompressed = ETrue; |
1166 } |
1116 } |
1167 if ( !( iCSPFeatures & EProtocolIDSupport )) |
|
1168 { |
|
1169 SMUMLOGGER_WRITE( |
|
1170 "DeleteVariatedSettings - EProtocolIDSupport") |
|
1171 DeleteSettingItemFromArrays( iTypeOfSettings ? |
|
1172 ESmumSendOptMessageConversionLBI : ESmumMessageConversionLBI ); |
|
1173 needToBeCompressed = ETrue; |
|
1174 } |
|
1175 if ( !( iCSPFeatures & EValidityPeriodSupport )) |
1117 if ( !( iCSPFeatures & EValidityPeriodSupport )) |
1176 { |
1118 { |
1177 SMUMLOGGER_WRITE( |
1119 SMUMLOGGER_WRITE( |
1178 "DeleteVariatedSettings - EValidityPeriodSupport") |
1120 "DeleteVariatedSettings - EValidityPeriodSupport") |
1179 DeleteSettingItemFromArrays( iTypeOfSettings ? |
1121 DeleteSettingItemFromArrays( iTypeOfSettings ? |