|
1 /* |
|
2 * Copyright (c) 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: The Refresh handler to inform SAT refresses. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSSSETTINGSREFRESHHANDLER_H |
|
21 #define CSSSETTINGSREFRESHHANDLER_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <MSSSettingsRefreshHandler.h> |
|
26 #include <msatrefreshobserver.h> |
|
27 #include <MSSSettingsRefreshObserver.h> |
|
28 #include <RSSSettings.h> |
|
29 #include <RCustomerServiceProfileCache.h> |
|
30 #include <RSatRefresh.h> |
|
31 #include <RSatSession.h> |
|
32 #include <cenrepnotifyhandler.h> |
|
33 #include "CSSSettingsActiveObject.h" |
|
34 |
|
35 // DATA TYPES |
|
36 |
|
37 // The needed functionality. |
|
38 enum TSSSettingsRefreshFunction |
|
39 { |
|
40 ESSSettingsAllowRefresh = 0, // AllowRefresh functionality. |
|
41 ESSSettingsRefresh = 1, // Refresh functionality. |
|
42 }; |
|
43 |
|
44 |
|
45 // FORWARD DECLARATIONS |
|
46 class CSSSettingsNotifyInfo; |
|
47 |
|
48 |
|
49 // CLASS DECLARATION |
|
50 |
|
51 /** |
|
52 * The Refresh handler to inform SAT refreshes. |
|
53 * This class is extended for BT SAP functionality from 3.0. |
|
54 * |
|
55 * @lib SsSettings.lib |
|
56 * @since 2.8 |
|
57 */ |
|
58 class CSSSettingsRefreshHandler : |
|
59 public CBase, |
|
60 public MSSSettingsRefreshHandler, |
|
61 public MSatRefreshObserver, |
|
62 public MSSSettingsPubSubNotify |
|
63 { |
|
64 public: // Constructors and destructor |
|
65 |
|
66 /** |
|
67 * Two-phased constructor. |
|
68 */ |
|
69 static CSSSettingsRefreshHandler* NewL(); |
|
70 |
|
71 /** |
|
72 * Destructor. |
|
73 */ |
|
74 virtual ~CSSSettingsRefreshHandler(); |
|
75 |
|
76 |
|
77 public: // Functions from base classes |
|
78 |
|
79 /** |
|
80 * @see MSSSettingsRefreshHandler::NotifyFileChangeL. |
|
81 */ |
|
82 void NotifyFileChangeL( |
|
83 MSSSettingsRefreshObserver& aObserver, |
|
84 TSatElementaryFiles aObservedFiles, |
|
85 TSatRefreshType aObservedRefreshType ); |
|
86 |
|
87 /** |
|
88 * @see MSSSettingsRefreshHandler::CancelNotify. |
|
89 */ |
|
90 void CancelNotify(); |
|
91 |
|
92 /** |
|
93 * @see MSSSettingsRefreshHandler::ChangedCspTable. |
|
94 */ |
|
95 TInt ChangedCspTable( |
|
96 TDes8& aChangedCsps, |
|
97 TDes8& aNewValues ); |
|
98 |
|
99 |
|
100 public: // Functions from base classes |
|
101 |
|
102 /** |
|
103 * @see MSatRefreshObserver::AllowRefresh |
|
104 */ |
|
105 TBool AllowRefresh( |
|
106 TSatRefreshType aType, |
|
107 const TSatRefreshFiles& aFiles ); |
|
108 |
|
109 /** |
|
110 * @see MSatRefreshObserver::Refresh |
|
111 */ |
|
112 void Refresh( |
|
113 TSatRefreshType aType, |
|
114 const TSatRefreshFiles& aFiles ); |
|
115 |
|
116 public: // From base class MSSSettingsPubSubNotify |
|
117 /** |
|
118 * @see MSSSettingsPubSubNotify |
|
119 */ |
|
120 void HandlePubSubNotify( |
|
121 const TUid aUid, |
|
122 const TUint32 aKeyId ); |
|
123 |
|
124 |
|
125 private: |
|
126 |
|
127 /** |
|
128 * C++ default constructor. |
|
129 */ |
|
130 CSSSettingsRefreshHandler(); |
|
131 |
|
132 /** |
|
133 * By default Symbian 2nd phase constructor is private. |
|
134 */ |
|
135 void ConstructL(); |
|
136 |
|
137 /** |
|
138 * Common function for AllowRefresh and Refresh. |
|
139 * |
|
140 * @param atype Refresh Type. |
|
141 * @param aFiles Refresh Files. |
|
142 * @param aFunctionality The functionality wanted. |
|
143 * @return Result of functionality. |
|
144 */ |
|
145 TBool DoHandleRefresh( |
|
146 TSatRefreshType aType, |
|
147 const TSatRefreshFiles& aFiles, |
|
148 const TSSSettingsRefreshFunction aFunctionality ); |
|
149 |
|
150 private: // Data |
|
151 |
|
152 // Container for notify observer. |
|
153 CSSSettingsNotifyInfo* iNotifyInfo; |
|
154 |
|
155 // The RSSSettings handle. |
|
156 RSSSettings iRSSSettings; |
|
157 |
|
158 // The RCustomerServiceProfileCache handle. |
|
159 RCustomerServiceProfileCache iRCspCache; |
|
160 |
|
161 // The RSatRefresh handle. |
|
162 RSatRefresh* iRSatRefresh; |
|
163 |
|
164 // The RSatSession handle. |
|
165 RSatSession iRSatSession; |
|
166 |
|
167 // Notifier for BT SAP support. |
|
168 CSSSettingsActiveObject* iBtSapNotifier; |
|
169 |
|
170 }; |
|
171 |
|
172 #endif // CSSSETTINGSREFRESHHANDLER_H |
|
173 |
|
174 // End of File |