|
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: |
|
15 * Central Repository notifier and callback |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CMCSSATNOTIFIER_H |
|
21 #define CMCSSATNOTIFIER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <e32property.h> |
|
26 |
|
27 /* |
|
28 * Callback for notifier. |
|
29 */ |
|
30 class MMcsSATNotifierCallback |
|
31 { |
|
32 public: |
|
33 |
|
34 /** |
|
35 * SATChangeL is called when the subscribed key has been changed |
|
36 * |
|
37 */ |
|
38 virtual void SATChangeL() = 0; |
|
39 |
|
40 }; |
|
41 |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 /** |
|
45 * Central repository notifier |
|
46 */ |
|
47 class CMcsSatNotifier : public CActive |
|
48 { |
|
49 public: // Construction and destruction |
|
50 |
|
51 /** |
|
52 * Creates an instance of CMenuSatNotifier implementation. |
|
53 * @param aCallBack Reference to notifier interface |
|
54 * @param aCategory application uid |
|
55 * @param aKey key for central repository |
|
56 */ |
|
57 IMPORT_C static CMcsSatNotifier* NewL( MMcsSATNotifierCallback* aCallback, |
|
58 TUid aCategory, |
|
59 TUint aKey ); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 virtual ~CMcsSatNotifier(); |
|
65 |
|
66 |
|
67 private: // From base classes |
|
68 |
|
69 /** |
|
70 * From CActive. |
|
71 */ |
|
72 void DoCancel(); |
|
73 void RunL(); |
|
74 TInt RunError( TInt aError ); |
|
75 |
|
76 private: |
|
77 |
|
78 // Constructor |
|
79 CMcsSatNotifier( MMcsSATNotifierCallback* aCallback, |
|
80 TUid aCategory, |
|
81 TUint aKey ); |
|
82 |
|
83 /** |
|
84 * By default Symbian 2nd phase constructor is private. |
|
85 */ |
|
86 void ConstructL(); |
|
87 |
|
88 private: // Data |
|
89 |
|
90 // User side interface to Publish & Subscribe. |
|
91 RProperty iProperty; |
|
92 |
|
93 // Interface for notifying changes in SAT |
|
94 MMcsSATNotifierCallback* iCallback; |
|
95 |
|
96 // category uid |
|
97 TUid iCategory; |
|
98 |
|
99 // key identifier |
|
100 TUint iKey; |
|
101 |
|
102 }; |
|
103 |
|
104 #endif // CMCSSATNOTIFIER_H |
|
105 |
|
106 // End of File |