|
1 /* |
|
2 * Copyright (c) 2005-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: Monitors the Kodiak Ptt call events. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSPTTCALLMONITOR_H |
|
20 #define MUSPTTCALLMONITOR_H |
|
21 |
|
22 #include "mmusptteventobserver.h" |
|
23 #include "musunittesting.h" |
|
24 |
|
25 #include <e32base.h> // CBase |
|
26 #include <e32property.h> // RProperty |
|
27 |
|
28 |
|
29 /** |
|
30 * this class is listening call monitor P&S keys |
|
31 * |
|
32 * @lib musaoplugin.dll |
|
33 */ |
|
34 |
|
35 class CMusPttCallMonitor : public CActive |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Two-phased constructor |
|
42 * |
|
43 * @since S60 v3.2 |
|
44 * @return New CMusAoPlugin instance |
|
45 */ |
|
46 static CMusPttCallMonitor* NewL(MMusPttEventObserver& aObserver); |
|
47 |
|
48 /** |
|
49 * C++ destructor. |
|
50 */ |
|
51 virtual ~CMusPttCallMonitor(); |
|
52 |
|
53 |
|
54 |
|
55 private: // constructors |
|
56 |
|
57 /** |
|
58 * C++ constructor. |
|
59 */ |
|
60 CMusPttCallMonitor(MMusPttEventObserver& aObserver); |
|
61 |
|
62 /** |
|
63 * Symbian second-phase constructor. |
|
64 */ |
|
65 void ConstructL(); |
|
66 |
|
67 |
|
68 public: //from base class CActive |
|
69 |
|
70 /** |
|
71 * Handles an active object's request completion event. |
|
72 */ |
|
73 void RunL(); |
|
74 |
|
75 /** |
|
76 * cancelsof an outstanding request |
|
77 */ |
|
78 void DoCancel(); |
|
79 |
|
80 /** |
|
81 * Returns ETrue of PTT Call Exist else otherwise. |
|
82 */ |
|
83 TBool IsPTTCallExist(); |
|
84 |
|
85 /* |
|
86 * Handles a leave occurring in the request completion |
|
87 * event handler RunL(). |
|
88 * Always return KErrNone since it must handle this error |
|
89 * if it comes to this place. |
|
90 */ |
|
91 TInt RunError( TInt aError ); |
|
92 |
|
93 |
|
94 private: // data |
|
95 |
|
96 /** |
|
97 * properties for P&S |
|
98 */ |
|
99 RProperty iPropertyEvent; |
|
100 |
|
101 /** |
|
102 * Observer for Kodiak Events |
|
103 */ |
|
104 MMusPttEventObserver& iObserver; |
|
105 |
|
106 |
|
107 MUS_UNITTEST( UT_CMusPTTCallMonitor ) |
|
108 }; |
|
109 |
|
110 #endif // MUSPTTCALLMONITOR_H |