|
1 /* |
|
2 * Copyright (c) 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: Header file for MTelDMCallStateObserver class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CTELDMCALLSTATELISTENER_H |
|
21 #define CTELDMCALLSTATELISTENER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32property.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 // CLASS DECLARATION |
|
31 class MTelDMCallStateObserver; |
|
32 |
|
33 /** |
|
34 * Call state listener. Listening TelephonyCallState PS key. |
|
35 * |
|
36 * @since 3.1 |
|
37 */ |
|
38 |
|
39 NONSHARABLE_CLASS( CTelDMCallStateListener ) : public CActive |
|
40 { |
|
41 public: // Constructors and destructors. |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CTelDMCallStateListener* NewL(); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 virtual ~CTelDMCallStateListener(); |
|
52 |
|
53 |
|
54 public: |
|
55 |
|
56 void AddObserverL( MTelDMCallStateObserver& aCallStateObserver ); |
|
57 |
|
58 private: // from CActive |
|
59 |
|
60 /** |
|
61 * @see CActive::RunL. |
|
62 */ |
|
63 void RunL(); |
|
64 |
|
65 /** |
|
66 * @see CActive::DoCancel. |
|
67 */ |
|
68 void DoCancel(); |
|
69 |
|
70 private: |
|
71 |
|
72 /** |
|
73 * Handle notification request |
|
74 */ |
|
75 void HandleChange(); |
|
76 |
|
77 /** |
|
78 * Start notification. |
|
79 */ |
|
80 void IssueRequest(); |
|
81 |
|
82 /** |
|
83 * Constructor. |
|
84 */ |
|
85 CTelDMCallStateListener(); |
|
86 |
|
87 /** |
|
88 * Symbian OS constructor. |
|
89 */ |
|
90 void ConstructL(); |
|
91 |
|
92 private: |
|
93 // Owned Publish & Subscribe instance. |
|
94 RProperty iProperty; |
|
95 |
|
96 // Call state |
|
97 TInt iCallState; |
|
98 |
|
99 // Call State Change Observer array. |
|
100 RPointerArray< MTelDMCallStateObserver > iObserverArray; |
|
101 }; |
|
102 |
|
103 #endif // CTELDMCALLSTATELISTENER_H |
|
104 |
|
105 // End of File |