|
1 /* |
|
2 * Copyright (c) 2002 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 * Observer for phone events. Used to deactive/active the side-key |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef __AUTOLOCKVALUEOBSERVERPS_H |
|
22 #define __AUTOLOCKVALUEOBSERVERPS_H |
|
23 |
|
24 #include <e32svr.h> |
|
25 #include <e32property.h> |
|
26 |
|
27 class CAutolockAppUi; |
|
28 |
|
29 class CValueObserver: public CActive |
|
30 { |
|
31 public: |
|
32 /** |
|
33 * Creates instance of the CValueObserver class. |
|
34 * |
|
35 * @param aAppUi (pointer to autolock appui) |
|
36 * @return Returns the instance just created. |
|
37 */ |
|
38 static CValueObserver* NewL(CAutolockAppUi* aAppUi); |
|
39 /** |
|
40 * Destructor. |
|
41 */ |
|
42 ~CValueObserver(); |
|
43 public: |
|
44 /** |
|
45 * Starts asynchronic listening KUidCurrentCall event |
|
46 * |
|
47 * @return KErrNone: if no errors |
|
48 * @return KErrInUse: if already listening |
|
49 */ |
|
50 TInt Start(); |
|
51 /** |
|
52 * Stops asynchronic listening KUidAutolockStatus event |
|
53 */ |
|
54 void Stop(); |
|
55 private: // constructors |
|
56 /** |
|
57 * C++ default constructor. |
|
58 * |
|
59 * @param aAppUi (pointer to autolock appui) |
|
60 */ |
|
61 CValueObserver(CAutolockAppUi* aAppUi); |
|
62 /** |
|
63 * Symbian OS constructor. |
|
64 */ |
|
65 void ConstructL(); |
|
66 private: // from CActive |
|
67 /** @see CActive::RunL() */ |
|
68 void RunL(); |
|
69 /** @see CActive::DoCancel() */ |
|
70 void DoCancel(); |
|
71 private: // data |
|
72 CAutolockAppUi* iAppUi; //not owned! |
|
73 RProperty iProperty; |
|
74 }; |
|
75 |
|
76 #endif |
|
77 // End of file |