|
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: Monitors the multimediasharing property. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MUSAOCALLMONITOR_H |
|
21 #define MUSAOCALLMONITOR_H |
|
22 |
|
23 #include "musunittesting.h" |
|
24 #include "mustsypropertymonitor.h" |
|
25 #include "mmuscallstateobserver.h" |
|
26 #include <etelmm.h> |
|
27 #include <e32base.h> |
|
28 |
|
29 class CMusCallConferenceMonitor; |
|
30 class CMusCallStatusMonitor; |
|
31 class CMusCallEventMonitor; |
|
32 |
|
33 /** |
|
34 * Monitor, which observes status of current cs call |
|
35 * |
|
36 * @lib musaoplugin.dll |
|
37 */ |
|
38 class CMusCallMonitor : public CBase |
|
39 { |
|
40 |
|
41 public: // constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. Leaves on failure. |
|
45 */ |
|
46 static CMusCallMonitor* NewL( TName& aCallName,TBool aPttCallExist ); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CMusCallMonitor(); |
|
52 |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Starts to monitor call status,event and conference. |
|
57 */ |
|
58 void StartMonitorL( RMobileLine& aLine, MMusTsyPropertyObserver& aObserver, |
|
59 MMusCallStateObserver& aCallStateObserver ); |
|
60 |
|
61 /** |
|
62 * Stops monitoring call status,event and conference. |
|
63 */ |
|
64 void StopMonitor(); |
|
65 |
|
66 /** |
|
67 * Compares the name of the call. |
|
68 */ |
|
69 TBool IsEqual(TName& aName); |
|
70 |
|
71 /** |
|
72 * Returns the CallName. |
|
73 */ |
|
74 const TName Name(); |
|
75 |
|
76 /** |
|
77 * ETrue if monitoring stared already. Else otherwise |
|
78 */ |
|
79 TBool IsMonitored(); |
|
80 |
|
81 /* |
|
82 * Returns the name of last call occured |
|
83 */ |
|
84 TName LastCallNameL(RMobileLine& aLine); |
|
85 |
|
86 /** |
|
87 * Call CMusCallMonitorBase::SetStateL to set |
|
88 * state of call status monitor and |
|
89 * state of call event monitor |
|
90 */ |
|
91 void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal); |
|
92 |
|
93 /** |
|
94 * Checks from CS call f required data is ready. |
|
95 */ |
|
96 TBool IsDataReadyL(); |
|
97 |
|
98 |
|
99 private: |
|
100 |
|
101 /** |
|
102 * C++ constructor. |
|
103 */ |
|
104 CMusCallMonitor( TBool aPttCallExist ); |
|
105 |
|
106 /** |
|
107 * Symbian 2nd-phase constructor. |
|
108 */ |
|
109 void ConstructL( TName& aCallName); |
|
110 |
|
111 /* |
|
112 * Sets the call count based on callmonitors. |
|
113 * ETrue to increase. EFalse to decrease. |
|
114 */ |
|
115 void SetCallCountL(TBool aIncrease); |
|
116 |
|
117 |
|
118 private: |
|
119 |
|
120 /** |
|
121 * Call status monitor, owned. |
|
122 */ |
|
123 CMusCallStatusMonitor* iCallStatusMonitor; |
|
124 |
|
125 /** |
|
126 * Call event monitor, owned. |
|
127 */ |
|
128 CMusCallEventMonitor* iCallEventMonitor; |
|
129 |
|
130 /** |
|
131 * RMobilePhone handle. |
|
132 */ |
|
133 RMobileCall iCall; |
|
134 |
|
135 /** |
|
136 * Name of the call. |
|
137 */ |
|
138 TName iCallName; |
|
139 |
|
140 /** |
|
141 * Existence of Ptt call when this cs call started. |
|
142 */ |
|
143 TBool iPttCallExist; |
|
144 |
|
145 MUS_UNITTEST( UT_CMusCallMonitor ) |
|
146 |
|
147 }; |
|
148 |
|
149 #endif // MUSAOCALLMONITOR_H |