|
1 /* |
|
2 * Copyright (c) 2005 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: Observes 'SIM file changed' events from SAT. If changed file |
|
15 * is WIM related, WimiLib's cache is cleared and WimiLib closed. |
|
16 * Prevents WIM from operating with out-dated cache. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef CWIMSATREFRESHOBSERVER_H |
|
22 #define CWIMSATREFRESHOBSERVER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <msatrefreshobserver.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class RSatRefresh; |
|
30 class RSatSession; |
|
31 class CWimServer; |
|
32 |
|
33 #if defined SAT_REFRESH_TIMER_TRIGGER |
|
34 class CSatRefreshTimerTrigger; |
|
35 #endif |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Notifies WimServer when SAT refresh notifications arrive. |
|
41 * |
|
42 * @since 3.0 |
|
43 */ |
|
44 class CWimSatRefreshObserver : public CBase, public MSatRefreshObserver |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 static CWimSatRefreshObserver* NewL(); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CWimSatRefreshObserver(); |
|
57 |
|
58 public: // Functions from base classes |
|
59 |
|
60 /** |
|
61 * From MSatRefreshObserver |
|
62 * @param aType is not used, because we lose file path and thus have to |
|
63 react for every refresh request |
|
64 * @param aFiles is not used, because we lose file path and thus have to |
|
65 react for every refresh request |
|
66 * @return boolean whether we allow refresh or not |
|
67 */ |
|
68 TBool AllowRefresh( TSatRefreshType /*aType*/, |
|
69 const TSatRefreshFiles& /*aFiles*/ ); |
|
70 |
|
71 /** |
|
72 * From MSatRefreshObserver. |
|
73 * @param aType is not used, because we lose file path and thus have to |
|
74 react for every refresh request |
|
75 * @param aFiles is not used, because we lose file path and thus have to |
|
76 react for every refresh request |
|
77 * @return void |
|
78 */ |
|
79 void Refresh( TSatRefreshType /*aType*/, |
|
80 const TSatRefreshFiles& /*aFiles*/ ); |
|
81 |
|
82 private: // New functions |
|
83 |
|
84 /** |
|
85 * C++ default constructor. |
|
86 */ |
|
87 CWimSatRefreshObserver(); |
|
88 |
|
89 /** |
|
90 * By default Symbian 2nd phase constructor is private. |
|
91 */ |
|
92 void ConstructL(); |
|
93 |
|
94 private: // Data |
|
95 |
|
96 /// SAT refresh event client |
|
97 RSatRefresh* iRefreshClient; |
|
98 /// SAT session object |
|
99 RSatSession* iSatSession; |
|
100 /// Pointer to WimServer. |
|
101 CWimServer* iWimSvr; |
|
102 #if defined SAT_REFRESH_TIMER_TRIGGER |
|
103 /// Simulated Sat Event trigger |
|
104 CSatRefreshTimerTrigger* iTimerTrigger; |
|
105 #endif |
|
106 }; |
|
107 |
|
108 #endif // CWIMSATREFRESHOBSERVER_H |
|
109 |
|
110 // End of File |