|
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 the status of the call. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MUSCALLSTATUSMONITOR_H |
|
21 #define MUSCALLSTATUSMONITOR_H |
|
22 |
|
23 #include "mussesseioninformationapi.h" |
|
24 #include "muscallmonitorbase.h" |
|
25 #include "musunittesting.h" |
|
26 #include "mmuscallstateobserver.h" |
|
27 |
|
28 #include <etelmm.h> |
|
29 #include <e32base.h> |
|
30 |
|
31 |
|
32 /** |
|
33 * Monitors the event of call and set the state to property. |
|
34 * |
|
35 * @lib musaoplugin.dll |
|
36 */ |
|
37 class CMusCallStatusMonitor : public CMusCallMonitorBase |
|
38 { |
|
39 |
|
40 public: |
|
41 /** |
|
42 * Two-phased constructor. Leaves on failure. |
|
43 * aCall is not owned. |
|
44 * @return CMusCallStatusMonitor object. |
|
45 */ |
|
46 static CMusCallStatusMonitor* NewL( const RMobileCall& aCall, |
|
47 MMusTsyPropertyObserver& aObserver, |
|
48 MMusCallStateObserver& aCallStateObserver ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 ~CMusCallStatusMonitor(); |
|
54 |
|
55 private: |
|
56 |
|
57 /** |
|
58 * C++ constructor. |
|
59 */ |
|
60 CMusCallStatusMonitor(const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver, |
|
61 MMusCallStateObserver& aCallStateObserver ); |
|
62 |
|
63 /** |
|
64 * Symbian 2nd-phase constructor. |
|
65 */ |
|
66 void ConstructL(); |
|
67 |
|
68 /** |
|
69 * Checks the callstatus and sets the multimediasharing property |
|
70 * key value. |
|
71 */ |
|
72 void CheckStateL(); |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * Handles an active object's request completion event. |
|
78 */ |
|
79 void RunL(); |
|
80 |
|
81 /** |
|
82 * cancels of an outstanding request |
|
83 */ |
|
84 void DoCancel(); |
|
85 |
|
86 |
|
87 private: |
|
88 |
|
89 /** |
|
90 * Call Status. |
|
91 */ |
|
92 RMobileCall::TMobileCallStatus iCallStatus; |
|
93 |
|
94 |
|
95 MUS_UNITTEST( UT_CMusCallStatusMonitor ) |
|
96 |
|
97 }; |
|
98 |
|
99 #endif // MUSCALLSTATUSMONITOR_H |