|
1 /* |
|
2 * Copyright (c) 2010 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: CSysApGanPropertyListener class definition. Class for |
|
15 * RProperty changes from GAN server. |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_SYSAPGANPROPERTYLISTENER_H |
|
20 #define C_SYSAPGANPROPERTYLISTENER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32property.h> |
|
24 #include "msysapganpropertyobserver.h" |
|
25 |
|
26 /** |
|
27 * Listen RProperty events. |
|
28 */ |
|
29 NONSHARABLE_CLASS( CSysApGanPropertyListener ) : |
|
30 public CActive |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Static constructor. |
|
35 * @param aProperty Property to listen to. |
|
36 * @param aObserver Object that is informed about about new IAP usage. |
|
37 */ |
|
38 static CSysApGanPropertyListener* NewL( |
|
39 RProperty& aProperty, |
|
40 MSysApGanPropertyObserver& aObserver ); |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 ~CSysApGanPropertyListener(); |
|
46 |
|
47 protected: |
|
48 /** |
|
49 * C++ constructor. |
|
50 * @param aProperty Property to listen to. |
|
51 * @param aObserver Object that is informed about about new IAP usage. |
|
52 */ |
|
53 CSysApGanPropertyListener( |
|
54 RProperty& aProperty, |
|
55 MSysApGanPropertyObserver& aObserver ); |
|
56 |
|
57 /** |
|
58 * Symbian 2nd phase constructor. |
|
59 */ |
|
60 void ConstructL(); |
|
61 |
|
62 public: |
|
63 /** |
|
64 * Subscribes to a property. |
|
65 */ |
|
66 void Subscribe(); |
|
67 |
|
68 protected: // From CActive |
|
69 |
|
70 /** |
|
71 * Handles an active object's request completion event. |
|
72 */ |
|
73 void RunL(); |
|
74 |
|
75 /** |
|
76 * Cancels asynchronous request. |
|
77 */ |
|
78 void DoCancel(); |
|
79 |
|
80 /** |
|
81 * Handles a leave occurring in RunL(). |
|
82 * @param aError Error that caused RunL to leave. |
|
83 */ |
|
84 TInt RunError( TInt aError ); |
|
85 |
|
86 protected: // Data |
|
87 |
|
88 /** |
|
89 * Observer to notifiy about property changes. |
|
90 */ |
|
91 MSysApGanPropertyObserver& iObserver; |
|
92 |
|
93 /** |
|
94 * Property to listen to. |
|
95 */ |
|
96 RProperty& iProperty; |
|
97 |
|
98 }; |
|
99 |
|
100 #endif // C_SYSAPGANPROPERTYLISTENER_H |