|
1 /* |
|
2 * Copyright (c) 2005-2007 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MUSAVACALLEVENTMONITOR_H |
|
21 #define MUSAVACALLEVENTMONITOR_H |
|
22 |
|
23 |
|
24 #include "musunittesting.h" |
|
25 #include <e32base.h> |
|
26 #include <e32property.h> |
|
27 |
|
28 class MMusCallMonitorObserver; |
|
29 |
|
30 /** |
|
31 * this class is listening call monitor P&S keys |
|
32 * |
|
33 * @lib musaoplugin.dll |
|
34 */ |
|
35 class CMusAvaCallEventMonitor : public CActive |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * get call count |
|
41 * |
|
42 * @return call count |
|
43 */ |
|
44 TInt CallStatusL(); |
|
45 |
|
46 /** |
|
47 * get call Direction |
|
48 * |
|
49 * @return call direction |
|
50 */ |
|
51 TInt CallDirectionL(); |
|
52 |
|
53 |
|
54 void GetTelNumberL( TDes& aTelNumber, TBool& aIsSipUri ); |
|
55 |
|
56 /** |
|
57 * Start to monitoring call state events |
|
58 * |
|
59 */ |
|
60 void StartMonitoringL(); |
|
61 |
|
62 |
|
63 /** |
|
64 * Two-phased constructor |
|
65 * |
|
66 * @return New CMusAoPlugin instance |
|
67 */ |
|
68 static CMusAvaCallEventMonitor* NewL( MMusCallMonitorObserver& aObserver ); |
|
69 |
|
70 |
|
71 /** |
|
72 * C++ destructor. |
|
73 */ |
|
74 virtual ~CMusAvaCallEventMonitor(); |
|
75 |
|
76 // from etelmm.h::RMobilePhone::KMaxMobileTelNumberSize |
|
77 static const TInt KMusTelNumberMaxLength = 100; |
|
78 |
|
79 protected: |
|
80 |
|
81 // from base class CActive |
|
82 |
|
83 /** |
|
84 * From CActive. |
|
85 * Cancels an outstanding asynchronous request. |
|
86 */ |
|
87 virtual void DoCancel(); |
|
88 |
|
89 /** |
|
90 * From CActive. |
|
91 * Handles an active object's request completion event. |
|
92 */ |
|
93 virtual void RunL(); |
|
94 |
|
95 /** |
|
96 * From CActive. |
|
97 * Handles a leave error in RunL method. |
|
98 */ |
|
99 virtual TInt RunError( TInt aError ); |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * C++ constructor. |
|
105 */ |
|
106 CMusAvaCallEventMonitor( MMusCallMonitorObserver& aObserver ); |
|
107 |
|
108 /** |
|
109 * Symbian second-phase constructor. |
|
110 */ |
|
111 void ConstructL(); |
|
112 |
|
113 TBool IsSipUri( const TDesC& aTelNumber ) const; |
|
114 |
|
115 private: // data |
|
116 |
|
117 /** |
|
118 * properties for P&S |
|
119 */ |
|
120 RProperty iPropertyEvent; |
|
121 |
|
122 /** |
|
123 * Reference to the observer object |
|
124 */ |
|
125 MMusCallMonitorObserver& iObserver; |
|
126 }; |
|
127 |
|
128 #endif // MUSAVACALLEVENTMONITOR_H |