21 // INCLUDE FILES |
21 // INCLUDE FILES |
22 #include <bldvariant.hrh> // for feature definitions |
22 #include <bldvariant.hrh> // for feature definitions |
23 #include <e32base.h> |
23 #include <e32base.h> |
24 #include <rmmcustomapi.h> |
24 #include <rmmcustomapi.h> |
25 #include <mmtsy_names.h> |
25 #include <mmtsy_names.h> |
26 #include <PSVariables.h> |
26 #include <PSVariables.h> |
27 #include <startupdomainpskeys.h> |
27 #include <startupdomainpskeys.h> |
28 #include <centralrepository.h> // Central repository |
28 #include <centralrepository.h> // central repository |
29 #include <SSSettingsPrivateCRKeys.h> // Settings Central Repository keys. |
29 #include <sssettingsprivatecrkeys.h> // settings central repository keys. |
30 #include <telservicesinternalcrkeys.h> |
30 #include <telservicesinternalcrkeys.h> |
31 #include <telservicesvariant.hrh> |
31 #include <telservicesvariant.hrh> |
32 |
32 |
33 #include "RSSSettings.h" |
33 #include "rsssettings.h" |
34 #include "MSSSettingsObserver.h" |
34 #include "msssettingsobserver.h" |
35 #include "CSSSettingsNotifier.h" |
35 #include "csssettingsnotifier.h" |
36 #include "CSSSettingsAlsNotifier.h" |
36 #include "csssettingsalsnotifier.h" |
37 #include "SSSettingsLogger.h" |
37 #include "sssettingslogger.h" |
38 |
38 |
39 // CONSTANTS |
39 // CONSTANTS |
40 _LIT( KPanicCat, "SSSettings" ); |
40 _LIT( KPanicCat, "SSSettings" ); |
41 #define KSSSettingsTSYName KMmTsyModuleName |
41 #define KSSSettingsTSYName KMmTsyModuleName |
42 const TInt KSSSettingsTSYNameMaxLength( 80 ); |
42 const TInt KSSSettingsTSYNameMaxLength( 80 ); |
498 __ASSERT_DEBUG( aSetting <= KSSSettingsLastSetting, |
498 __ASSERT_DEBUG( aSetting <= KSSSettingsLastSetting, |
499 Panic( SSSettingsPanicInvalidRequest ) ); |
499 Panic( SSSettingsPanicInvalidRequest ) ); |
500 |
500 |
501 TInt error(KErrNone); |
501 TInt error(KErrNone); |
502 TInt value(0); |
502 TInt value(0); |
503 if ( error != KErrNone ) |
|
504 { |
|
505 return error; |
|
506 } |
|
507 |
503 |
508 // If Get fails, we try to save the default data. |
504 // If Get fails, we try to save the default data. |
509 switch ( aSetting ) |
505 switch ( aSetting ) |
510 { |
506 { |
511 case ESSSettingsCug: |
507 case ESSSettingsCug: |
704 __SSSLOGSTRING1("[SSS] RSSSettings::IsALSSupported simAlsValue value: %d", aSimAlsValue ); |
700 __SSSLOGSTRING1("[SSS] RSSSettings::IsALSSupported simAlsValue value: %d", aSimAlsValue ); |
705 __SSSLOGSTRING1("[SSS] RSSSettings::IsALSSupported alsCSPSupport value: %d", aAlsCspSupport ); |
701 __SSSLOGSTRING1("[SSS] RSSSettings::IsALSSupported alsCSPSupport value: %d", aAlsCspSupport ); |
706 __SSSLOGSTRING1("[SSS] RSSSettings::IsALSSupported alsCSPError value: %d", aAlsCspError ); |
702 __SSSLOGSTRING1("[SSS] RSSSettings::IsALSSupported alsCSPError value: %d", aAlsCspError ); |
707 |
703 |
708 // When PP ALS is on and used SIM card suppports CSP ALS then alsCSPSupport returns EFALSE and alsCSPError KErrNotSupported but ALS functionality |
704 // When PP ALS is on and used SIM card suppports CSP ALS then alsCSPSupport returns EFALSE and alsCSPError KErrNotSupported but ALS functionality |
709 // needs to be shown therefore KErrNone is returned. |
705 // needs to be shown therefore KErrNone is returned. |
710 if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == FALSE && aAlsCspError == KErrNotSupported ) |
706 if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == FALSE && aAlsCspError == KErrNotSupported ) |
711 { |
707 { |
712 error = KErrNone; |
708 error = KErrNone; |
713 } |
709 } |
714 else if ( aPpAlsValue && aSimAlsValue && aAlsCspSupport == FALSE ) |
710 else if ( aPpAlsValue && aSimAlsValue && aAlsCspSupport == FALSE ) |
715 { |
711 { |
716 error = KErrNone; |
712 error = KErrNone; |
717 } |
713 } |
718 else if ( aPpAlsValue && aSimAlsValue && aAlsCspSupport == TRUE ) |
714 else if ( aPpAlsValue && aSimAlsValue && aAlsCspSupport == TRUE ) |
719 { |
715 { |
720 error = KErrNone; |
716 error = KErrNone; |
721 } |
717 } |
722 else if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == FALSE ) |
718 else if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == FALSE ) |
723 { |
719 { |
724 error = KErrNone; |
720 error = KErrNone; |
725 } |
721 } |
726 else if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == TRUE ) |
722 else if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == TRUE ) |
727 { |
723 { |
728 error = KErrNone; |
724 error = KErrNone; |
729 } |
725 } |
730 else if ( !aPpAlsValue && aSimAlsValue && aAlsCspSupport == TRUE ) |
726 else if ( !aPpAlsValue && aSimAlsValue && aAlsCspSupport == TRUE ) |
731 { |
727 { |
732 error = KErrNone; |
728 error = KErrNone; |
733 } |
729 } |
734 else if ( !aPpAlsValue && aSimAlsValue && aAlsCspSupport == FALSE ) |
730 else if ( !aPpAlsValue && aSimAlsValue && aAlsCspSupport == FALSE ) |
735 { |
731 { |
736 error = KErrNotSupported; |
732 error = KErrNotSupported; |
737 } |
733 } |
738 else if ( !aPpAlsValue && !aSimAlsValue && aAlsCspSupport == TRUE ) |
734 else if ( !aPpAlsValue && !aSimAlsValue && aAlsCspSupport == TRUE ) |
739 { |
735 { |
740 error = KErrNone; |
736 error = KErrNone; |
741 } |
737 } |
742 |
738 |
743 return error; |
739 return error; |
744 } |
740 } |
745 |
741 |
746 // --------------------------------------------------------- |
742 // --------------------------------------------------------- |
747 // RSSSettings::Set |
743 // RSSSettings::Set |
748 // --------------------------------------------------------- |
744 // --------------------------------------------------------- |