18 |
18 |
19 |
19 |
20 |
20 |
21 // INCLUDE FILES |
21 // INCLUDE FILES |
22 #include <e32std.h> |
22 #include <e32std.h> |
23 #include "CSOSEmergencyNumberPolicyHandler.h" |
23 #include "CSOSEmergencyNumberPolicyHandler.h" |
24 #include "CSosEnPolicySatRefresh.h" |
24 #include "CSosEnPolicySatRefresh.h" |
25 |
25 |
26 #include <RSatRefresh.h> |
26 #include <RSatRefresh.h> |
27 #include <RSatSession.h> |
27 #include <RSatSession.h> |
28 |
28 |
29 #include <startupdomainpskeys.h> // Property values |
29 #include <startupdomainpskeys.h> // Property values |
30 |
30 |
31 // Constants |
31 // Constants |
32 _LIT( KENPolicyPanicCategory, "ENPolicyFault" ); |
32 _LIT( KENPolicyPanicCategory, "ENPolicyFault" ); |
38 // C++ default constructor can NOT contain any code, that |
38 // C++ default constructor can NOT contain any code, that |
39 // might leave. |
39 // might leave. |
40 // ----------------------------------------------------------------------------- |
40 // ----------------------------------------------------------------------------- |
41 // |
41 // |
42 CSosEnPolicySatRefresh::CSosEnPolicySatRefresh( CSosEmergencyNumberPolicyHandler& aCSosEmergencyNumberPolicyHandler ): |
42 CSosEnPolicySatRefresh::CSosEnPolicySatRefresh( CSosEmergencyNumberPolicyHandler& aCSosEmergencyNumberPolicyHandler ): |
43 CActive( EPriorityStandard ), iCSosEmergencyNumberPolicyHandler ( aCSosEmergencyNumberPolicyHandler ) |
43 CActive( EPriorityStandard ), iCSosEmergencyNumberPolicyHandler ( aCSosEmergencyNumberPolicyHandler ) |
44 { |
44 { |
45 CActiveScheduler::Add( this ); |
45 CActiveScheduler::Add( this ); |
46 } |
46 } |
47 |
47 |
48 // ----------------------------------------------------------------------------- |
48 // ----------------------------------------------------------------------------- |
102 // CSosEnPolicySatRefresh::AllowRefresh |
102 // CSosEnPolicySatRefresh::AllowRefresh |
103 // Refresh query. Determines whether it allow the refresh to happen. |
103 // Refresh query. Determines whether it allow the refresh to happen. |
104 // ----------------------------------------------------------------------------- |
104 // ----------------------------------------------------------------------------- |
105 // |
105 // |
106 TBool CSosEnPolicySatRefresh::AllowRefresh( TSatRefreshType /*aType*/, const TSatRefreshFiles& /*aFiles*/ ) |
106 TBool CSosEnPolicySatRefresh::AllowRefresh( TSatRefreshType /*aType*/, const TSatRefreshFiles& /*aFiles*/ ) |
107 { |
107 { |
108 // Refresh is always allowed |
108 // Refresh is always allowed |
109 return ETrue; |
109 return ETrue; |
110 } |
110 } |
111 |
111 |
112 // ----------------------------------------------------------------------------- |
112 // ----------------------------------------------------------------------------- |
113 // CSosEnPolicySatRefresh::Refresh |
113 // CSosEnPolicySatRefresh::Refresh |
114 // Notification of refresh. In this method the client should not close |
114 // Notification of refresh. In this method the client should not close |
115 // or cancel the RSatRefresh subsession. |
115 // or cancel the RSatRefresh subsession. |
116 // ----------------------------------------------------------------------------- |
116 // ----------------------------------------------------------------------------- |
117 // |
117 // |
118 void CSosEnPolicySatRefresh::Refresh( TSatRefreshType /*aType*/, const TSatRefreshFiles& /*aFiles*/ ) |
118 void CSosEnPolicySatRefresh::Refresh( TSatRefreshType /*aType*/, const TSatRefreshFiles& /*aFiles*/ ) |
119 { |
119 { |
120 // Reload SIM Topics in case of refresh |
120 // Reload SIM Topics in case of refresh |
121 iCSosEmergencyNumberPolicyHandler.CpsssmHandleSimStatusEvent( CSosEmergencyNumberPolicyHandler::ESosEnPolicySimEmergencyNumberRead ); |
121 iCSosEmergencyNumberPolicyHandler.CpsssmHandleSimStatusEvent( CSosEmergencyNumberPolicyHandler::ESosEnPolicySimEmergencyNumberRead ); |
122 iSatRefresh->RefreshEFRead( EFalse ); |
122 iSatRefresh->RefreshEFRead( EFalse ); |
123 } |
123 } |
124 |
124 |
125 |
125 |
126 // ----------------------------------------------------------------------------- |
126 // ----------------------------------------------------------------------------- |
127 // CSosEnPolicySimStatusMonitor::IssueRequest |
127 // CSosEnPolicySimStatusMonitor::IssueRequest |
128 // |
128 // |
129 // Issue notify request to System agent. |
129 // Issue notify request to System agent. |
153 case KErrCancel: |
153 case KErrCancel: |
154 return; |
154 return; |
155 case KErrNone: |
155 case KErrNone: |
156 { |
156 { |
157 iSatSession->ConnectL(); |
157 iSatSession->ConnectL(); |
158 iSatRefresh->OpenL( *iSatSession ); |
158 iSatRefresh->OpenL( *iSatSession ); |
159 TSatRefreshFiles file; |
159 TSatRefreshFiles file; |
160 file.Append( KEccEf ); |
160 file.Append( KEccEf ); |
161 iSatRefresh->NotifyFileChangeL( file ); |
161 iSatRefresh->NotifyFileChangeL( file ); |
162 break; |
162 break; |
163 } |
163 } |
164 default: |
164 default: |
165 break; |
165 break; |
166 } |
166 } |
167 } |
167 } |
168 else |
168 else |
169 { |
169 { |
170 IssueRequest(); |
170 IssueRequest(); |
171 } |
171 } |
172 } |
172 } |
173 |
173 |
174 // ----------------------------------------------------------------------------- |
174 // ----------------------------------------------------------------------------- |
175 //CSosEnPolicySatRefresh::DoCancel |
175 //CSosEnPolicySatRefresh::DoCancel |