|
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: Monitor that observes the status of the current CS call |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef UT_MUSAOCALLEVENTMONITOR_H |
|
21 #define UT_MUSAOCALLEVENTMONITOR_H |
|
22 |
|
23 #include "muscallmonitorobserver.h" |
|
24 |
|
25 #include <etelmm.h> |
|
26 #include <digia/eunit/ceunittestsuiteclass.h> |
|
27 |
|
28 |
|
29 class CMusAoCallEventMonitor; |
|
30 |
|
31 /** |
|
32 * Monitor, which observes status of current cs call |
|
33 * Observers will be notified, when call status is idle |
|
34 * i.e. call has ended. |
|
35 * |
|
36 * @lib ut_mushaoplugin.dll |
|
37 */ |
|
38 NONSHARABLE_CLASS( UT_CMusAoCallEventMonitor ) |
|
39 : public CEUnitTestSuiteClass, public MMusCallMonitorObserver |
|
40 { |
|
41 |
|
42 public: // constructors and destructor |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~UT_CMusAoCallEventMonitor(); |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. Leaves on failure. |
|
51 * @return The constructed CMusAoCallMonitorTest object. |
|
52 */ |
|
53 static UT_CMusAoCallEventMonitor* NewLC(); |
|
54 |
|
55 private: |
|
56 |
|
57 /** |
|
58 * C++ constructor. |
|
59 */ |
|
60 UT_CMusAoCallEventMonitor(); |
|
61 |
|
62 /** |
|
63 * Symbian 2nd-phase constructor. |
|
64 */ |
|
65 void ConstructL(); |
|
66 |
|
67 |
|
68 private: // test MMusCallMonitorObserver |
|
69 |
|
70 virtual void CallConnectedL( const TDesC& aTelNumber ); |
|
71 |
|
72 virtual void CallHoldL( const TDesC& aTelNumber ); |
|
73 |
|
74 virtual void ConferenceCallL(); |
|
75 |
|
76 virtual void NoActiveCallL(); |
|
77 |
|
78 |
|
79 public: |
|
80 |
|
81 void UT_ConnectedCallCountLL(); |
|
82 |
|
83 void UT_RunLL(); |
|
84 |
|
85 void UT_ExamineEventLL(); |
|
86 |
|
87 private: |
|
88 |
|
89 void SetupL(); |
|
90 |
|
91 void Teardown(); |
|
92 |
|
93 void ResetObserverFlags(); |
|
94 |
|
95 private: // data |
|
96 |
|
97 CMusAoCallEventMonitor* iMonitor; |
|
98 |
|
99 EUNIT_DECLARE_TEST_TABLE; |
|
100 |
|
101 TBool iCallConnected; |
|
102 |
|
103 TBool iCallHold; |
|
104 |
|
105 TBool iConferenceCall; |
|
106 |
|
107 TBool iNoActiveCall; |
|
108 |
|
109 }; |
|
110 |
|
111 #endif // UT_MUSAOCALLEVENTMONITOR_H |