|
1 /* |
|
2 * Copyright (c) 2002-2007 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: An active object that completes when there is a change in |
|
15 * ETel/TSY store |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef VPBKSIMSTOREIMPL_CETELSTORENOTIFICATION_H |
|
21 #define VPBKSIMSTOREIMPL_CETELSTORENOTIFICATION_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 namespace VPbkSimStoreImpl { |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CStoreBase; |
|
30 class METelStoreNotificationObserver; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * An active object that completes when there is a change in ETel/TSY store |
|
36 * |
|
37 */ |
|
38 NONSHARABLE_CLASS(CETelStoreNotification) : public CActive |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * C++ default constructor. |
|
44 * @param aStore the store to listen to. |
|
45 */ |
|
46 CETelStoreNotification( CStoreBase& aStore ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CETelStoreNotification(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 /** |
|
56 * Activates this notification. Call ETel NotifyStoreEvent. |
|
57 */ |
|
58 void Activate(); |
|
59 |
|
60 /** |
|
61 * Sets the high priority observer |
|
62 * @param aHighPriorityObserver the observer to set |
|
63 */ |
|
64 void SetHighPriorityObserver( |
|
65 METelStoreNotificationObserver& aHighPriorityObserver ); |
|
66 |
|
67 /** |
|
68 * Removes the observer |
|
69 * @param aHighPriorityObserver the observer to remove |
|
70 */ |
|
71 void RemoveHighPriorityObserver( |
|
72 METelStoreNotificationObserver& aHighPriorityObserver); |
|
73 |
|
74 private: // New functions |
|
75 TBool NotifyObserver( METelStoreNotificationObserver* aObserver, |
|
76 TInt aResult ); |
|
77 |
|
78 private: // Functions from base classes |
|
79 |
|
80 /** |
|
81 * From CActive |
|
82 */ |
|
83 void RunL(); |
|
84 |
|
85 /** |
|
86 * From CActive |
|
87 */ |
|
88 void DoCancel(); |
|
89 |
|
90 private: // Data |
|
91 // The index of the entry that has been changed |
|
92 TInt iIndex; |
|
93 // The events that ETel sends |
|
94 TUint32 iEvents; |
|
95 /// The store to listen to |
|
96 CStoreBase& iStore; |
|
97 /// Ref: the observer that is called first |
|
98 METelStoreNotificationObserver* iHighPriorityObserver; |
|
99 }; |
|
100 } // namespace VPbkSimStoreImpl |
|
101 #endif // VPBKSIMSTOREIMPL_CETELSTORENOTIFICATION_H |
|
102 |
|
103 // End of File |