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