1 /* |
|
2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Monitors sat refresh for cbsserver |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSOSENPOLICYSATREFRESH_H |
|
21 #define CSOSENPOLICYSATREFRESH_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <etelmm.h> |
|
25 #include <msatrefreshobserver.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RSatSession; |
|
29 class RSatRefresh; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Monitors sat refresh for cbsserver |
|
35 * |
|
36 */ |
|
37 class CSosEnPolicySatRefresh : public CActive, public MSatRefreshObserver |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CSosEnPolicySatRefresh* NewL( CSosEmergencyNumberPolicyHandler& aCSosEmergencyNumberPolicyHandler ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CSosEnPolicySatRefresh(); |
|
50 |
|
51 |
|
52 private: |
|
53 |
|
54 /** |
|
55 * C++ default constructor. |
|
56 */ |
|
57 CSosEnPolicySatRefresh( CSosEmergencyNumberPolicyHandler& aCSosEmergencyNumberPolicyHandler ); |
|
58 |
|
59 |
|
60 /** |
|
61 * Refresh query. Client should determine whether it allow the |
|
62 * refresh to happen. In this method the client should not close or |
|
63 * cancel the RSatRefresh subsession. |
|
64 * @since 2.6 |
|
65 * @param aType Refresh type. |
|
66 * @param aFiles Elementary files which are to be changed. |
|
67 * May be zero length. |
|
68 * @return ETrue to allow refresh, EFalse to decline refresh. |
|
69 */ |
|
70 TBool AllowRefresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ); |
|
71 |
|
72 /** |
|
73 * Notification of refresh. In this method the client should not close |
|
74 * or cancel the RSatRefresh subsession. |
|
75 * @since 2.6 |
|
76 * @param aType Type of refresh which has happened. |
|
77 * @param aFiles List of elementary files which has been changed. |
|
78 * May be zero length. |
|
79 */ |
|
80 void Refresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ); |
|
81 |
|
82 /** |
|
83 * By default Symbian 2nd phase constructor is private. |
|
84 */ |
|
85 void ConstructL(); |
|
86 |
|
87 /** |
|
88 * @Activates property listening |
|
89 * @param None. |
|
90 */ |
|
91 void IssueRequest(); |
|
92 |
|
93 private: // Functions from base classes |
|
94 |
|
95 /** |
|
96 * @see CActive::RunL() |
|
97 */ |
|
98 void DoCancel(); |
|
99 |
|
100 /** |
|
101 * @see CActive::RunL() |
|
102 */ |
|
103 void RunL(); |
|
104 |
|
105 private: // Data |
|
106 |
|
107 // Reference to cbsserver |
|
108 CSosEmergencyNumberPolicyHandler& iCSosEmergencyNumberPolicyHandler; |
|
109 // Sat session connection. |
|
110 RSatSession* iSatSession; |
|
111 // Sat refresh connection |
|
112 RSatRefresh* iSatRefresh; |
|
113 // Is refresh allowed to do. |
|
114 TBool iAllowRefresh; |
|
115 // The RProperty to listen system global state.. |
|
116 RProperty iProperty; |
|
117 }; |
|
118 |
|
119 #endif // CSOSENPOLICYSATREFRESH_H |
|
120 |
|
121 |
|
122 |
|
123 // End of File |
|