|
1 /* |
|
2 * Copyright (c) 2005-2006 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CPSPROPERTYOBSERVER_H |
|
20 #define C_CPSPROPERTYOBSERVER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32property.h> |
|
24 #include "aipspropertyobserver.h" |
|
25 |
|
26 /** |
|
27 * @ingroup group_aiutils |
|
28 * |
|
29 * Publish and subscribe key observer |
|
30 * |
|
31 * @lib aiutils.lib |
|
32 * @since S60 3.2 |
|
33 */ |
|
34 |
|
35 NONSHARABLE_CLASS(CPSPropertyObserver) : |
|
36 public CActive, public MAiPSPropertyObserver |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CPSPropertyObserver* NewL (TCallBack aCallBack, TUid aCategory, TInt aKey); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 ~CPSPropertyObserver(); |
|
50 |
|
51 /** |
|
52 * Release the observer |
|
53 */ |
|
54 void Release(); |
|
55 |
|
56 // from base class CActive |
|
57 |
|
58 void RunL(); |
|
59 |
|
60 void DoCancel(); |
|
61 |
|
62 // from base class MAiPSPropertyObserver |
|
63 |
|
64 TInt Get( TInt& aValue ); |
|
65 |
|
66 TInt Get( TDes8& aString ); |
|
67 |
|
68 TInt Get( TDes16& aString ); |
|
69 |
|
70 private: |
|
71 |
|
72 /** |
|
73 * By default Symbian 2nd phase constructor is private. |
|
74 */ |
|
75 void ConstructL(); |
|
76 |
|
77 /** |
|
78 * C++ default constructor. |
|
79 */ |
|
80 CPSPropertyObserver( TCallBack aCallBack, |
|
81 TUid aCategory, |
|
82 TInt aKey ); |
|
83 |
|
84 private: |
|
85 |
|
86 /** |
|
87 * Callback member |
|
88 */ |
|
89 TCallBack iCallBack; |
|
90 |
|
91 /** |
|
92 * PS category id |
|
93 */ |
|
94 TUid iCategory; |
|
95 |
|
96 /** |
|
97 * PS key |
|
98 */ |
|
99 TInt iKey; |
|
100 |
|
101 /** |
|
102 * Property member |
|
103 */ |
|
104 RProperty iProperty; |
|
105 |
|
106 }; |
|
107 |
|
108 #endif // C_CPSPROPERTYOBSERVER_H |
|
109 |
|
110 // End of File. |