|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef AKNSLIDESTATUSNOTIFIER_H |
|
21 #define AKNSLIDESTATUSNOTIFIER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <e32property.h> |
|
25 //Grip keys |
|
26 #include <hwrmdomainpskeys.h> |
|
27 |
|
28 class MAknSlideStatusObserver |
|
29 { |
|
30 public: |
|
31 |
|
32 /** |
|
33 * Slide status notification |
|
34 * Called by the notifier when the Slide status value change |
|
35 * |
|
36 * @param aValue the new status value |
|
37 * @return none |
|
38 */ |
|
39 virtual void SlideStatusChangedL( const TInt& aValue ) = 0; |
|
40 |
|
41 }; |
|
42 |
|
43 /** |
|
44 * Reacts to Slide status changes |
|
45 * |
|
46 * Reacts to Slide status changes and notifies |
|
47 * its client(s) about the status change |
|
48 */ |
|
49 class CAknSlideStatusNotifier : public CActive |
|
50 { |
|
51 public: |
|
52 |
|
53 /** |
|
54 * Symbian two-phase constructor |
|
55 * |
|
56 * @param a pointer to Slide status observer |
|
57 * @return a pointer to CSlideStatusNotifier instance |
|
58 */ |
|
59 static CAknSlideStatusNotifier* NewL( MAknSlideStatusObserver* aObserver ); |
|
60 |
|
61 /** |
|
62 * Symbian two-phase constructor leaving a pointer to the constructed |
|
63 * object on the cleanup stack |
|
64 * |
|
65 * @param a pointer to Slide status observer |
|
66 * @return a pointer to CSlideStatusNotifier instance |
|
67 */ |
|
68 static CAknSlideStatusNotifier* NewLC( MAknSlideStatusObserver* aObserver ); |
|
69 |
|
70 /** |
|
71 * Default destructor |
|
72 */ |
|
73 virtual ~CAknSlideStatusNotifier(); |
|
74 |
|
75 protected: |
|
76 |
|
77 // From base class CActive |
|
78 /** |
|
79 * From CActive. |
|
80 * Implements cancellation of an outstanding request. |
|
81 * |
|
82 * @param none |
|
83 */ |
|
84 void DoCancel(); |
|
85 |
|
86 /** |
|
87 * From CActive. |
|
88 * Handles an active object's request completion event |
|
89 * |
|
90 * @param none |
|
91 */ |
|
92 void RunL(); |
|
93 |
|
94 /** |
|
95 * From CActive. |
|
96 * Handles an active object's request error event |
|
97 * |
|
98 * @param TInt aError |
|
99 */ |
|
100 TInt RunError( TInt aError ); |
|
101 |
|
102 |
|
103 private: |
|
104 |
|
105 /** |
|
106 * C++ default constructor |
|
107 * |
|
108 * @param none |
|
109 */ |
|
110 CAknSlideStatusNotifier(); |
|
111 |
|
112 /** |
|
113 * Symbian second phase constructor |
|
114 * |
|
115 * @param a pointer to Slide status observer |
|
116 */ |
|
117 void ConstructL( MAknSlideStatusObserver* aObserver ); |
|
118 |
|
119 |
|
120 private: // Data |
|
121 |
|
122 /** |
|
123 * Property handle used to read P&S variables |
|
124 */ |
|
125 RProperty iProperty; |
|
126 |
|
127 /** |
|
128 * The observer interested in the Slide status |
|
129 * Not own. |
|
130 */ |
|
131 MAknSlideStatusObserver* iObserver; |
|
132 }; |
|
133 |
|
134 #endif //AKNSLIDESTATUSNOTIFIER_H |