|
1 /* |
|
2 * Copyright (c) 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 the License "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: Publish&Subscribe event listener |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_WRTHARVESTERNOTIFIER_H |
|
20 #define C_WRTHARVESTERNOTIFIER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32property.h> |
|
24 class CWrtHarvester; |
|
25 |
|
26 // Content Harvester server secure id |
|
27 const TUid KPropertyCat = { 0x10282E5A }; |
|
28 // Can not conflict with other Content Harvester plugin keys |
|
29 enum TPropertyKeys { EWidgetUIState = 109, EWidgetRegAltered, EWidgetMMCAltered }; |
|
30 |
|
31 /** |
|
32 * Publish&Subscribe event listener |
|
33 * |
|
34 * @since S60 v5.0 |
|
35 */ |
|
36 class CWrtHarvesterPSNotifier : public CActive |
|
37 { |
|
38 public: |
|
39 /** |
|
40 * Creates an instance of CWrtHarvesterPSNotifier implementation. |
|
41 * |
|
42 * @since S60 v5.0 |
|
43 * @param aCallBack Reference to notifier interface. |
|
44 */ |
|
45 static CWrtHarvesterPSNotifier* NewL( CWrtHarvester* aHarvester, TPropertyKeys aKey ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 ~CWrtHarvesterPSNotifier(); |
|
51 |
|
52 /** |
|
53 * Gets key value |
|
54 * |
|
55 * @since S60 v5.0 |
|
56 */ |
|
57 TInt GetValue( TInt& aValue ); |
|
58 |
|
59 /** |
|
60 * Sets key value |
|
61 * |
|
62 * @since S60 v5.0 |
|
63 */ |
|
64 TInt SetValue( TInt aValue ); |
|
65 |
|
66 private: |
|
67 |
|
68 /** |
|
69 * |
|
70 * @param aHarvester |
|
71 * @param aKey |
|
72 */ |
|
73 CWrtHarvesterPSNotifier( CWrtHarvester* aHarvester, TPropertyKeys aKey ); |
|
74 |
|
75 /** |
|
76 * |
|
77 */ |
|
78 void ConstructL(); |
|
79 |
|
80 /** |
|
81 * from CActive |
|
82 */ |
|
83 void RunL(); |
|
84 |
|
85 /** |
|
86 * from CActive |
|
87 */ |
|
88 void DoCancel(); |
|
89 |
|
90 /** |
|
91 * from CActive |
|
92 */ |
|
93 TInt RunError(TInt aError); |
|
94 |
|
95 private: |
|
96 /** |
|
97 * User side interface to Publish & Subscribe. |
|
98 */ |
|
99 RProperty iProperty; |
|
100 |
|
101 /** |
|
102 * Publish & Subscribe key. |
|
103 */ |
|
104 TPropertyKeys iKey; |
|
105 |
|
106 /** |
|
107 * not own |
|
108 */ |
|
109 CWrtHarvester* iHarvester; |
|
110 }; |
|
111 |
|
112 #endif // C_WRTHARVESTERNOTIFIER_H |
|
113 |
|
114 // End of File |