|
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: Observer for phone events. Used to re-active |
|
15 * code query after emergency call |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef __SECPHONEOBSERVER_H |
|
21 #define __SECPHONEOBSERVER_H |
|
22 |
|
23 #include <e32svr.h> |
|
24 #include <e32property.h> |
|
25 #include "SecurityObserver.hrh" |
|
26 |
|
27 class CSecObsNotify; |
|
28 class CSecurityObserver; |
|
29 |
|
30 class CPhoneObserver: public CActive |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Creates instance of the CPhoneObserve class. |
|
35 * |
|
36 * @param aNotifierController CSecObsNotify* pointer to launch differend security |
|
37 * notifiers |
|
38 * @param aObserver CSecurityObserver* pointer to securityobserver |
|
39 * @return Returns the instance just created. |
|
40 */ |
|
41 static CPhoneObserver* NewL(CSecObsNotify* aNotifierController,CSecurityObserver* aObserver); |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 ~CPhoneObserver(); |
|
46 public: |
|
47 /** |
|
48 * Starts asynchronic listening of KUidCurrentCall event |
|
49 * |
|
50 * @param aNotifier TSecurityNotifier: notifier which is activated when call has ended |
|
51 * @return KErrNone: if no errors |
|
52 * @return KErrInUse: if already listening |
|
53 */ |
|
54 TInt Start(TSecurityNotifier aNotifier); |
|
55 /** |
|
56 * Stops asynchronic listening of KUidCurrentCall event |
|
57 */ |
|
58 void Stop(); |
|
59 private: // constructors |
|
60 /** |
|
61 * C++ default constructor. |
|
62 * |
|
63 * @param aNotifierController CSecObsNotify* pointer to launch differend security |
|
64 * notifiers |
|
65 * @param aObserver CSecurityObserver* pointer to securityobserver |
|
66 */ |
|
67 CPhoneObserver(CSecObsNotify* aNotifierController,CSecurityObserver* aObserver); |
|
68 /** |
|
69 * Symbian OS constructor. |
|
70 */ |
|
71 void ConstructL(); |
|
72 private: // from CActive |
|
73 /** @see CActive::RunL() */ |
|
74 void RunL(); |
|
75 /** @see CActive::DoCancel() */ |
|
76 void DoCancel(); |
|
77 private: // data |
|
78 CSecObsNotify* iNotifierController; // not owned ! |
|
79 CSecurityObserver* iObserver; //not owned ! |
|
80 TSecurityNotifier iNotifier; |
|
81 RProperty iProperty; |
|
82 }; |
|
83 |
|
84 #endif |
|
85 |
|
86 // End of file |