|
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 MUSAOCALLMONITORBASE_H |
|
21 #define MUSAOCALLMONITORBASE_H |
|
22 |
|
23 #include "musunittesting.h" |
|
24 #include "mussesseioninformationapi.h" |
|
25 #include "mmustsypropertyobserver.h" |
|
26 #include "mmuscallstateobserver.h" |
|
27 #include <etelmm.h> |
|
28 #include <e32base.h> |
|
29 |
|
30 /** |
|
31 * Monitor, which observes status of current cs call |
|
32 * |
|
33 * @lib musaoplugin.dll |
|
34 */ |
|
35 class CMusCallMonitorBase : public CActive |
|
36 { |
|
37 |
|
38 public: // constructors and destructor |
|
39 |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 ~CMusCallMonitorBase(); |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Sets the state to PS Keys |
|
49 */ |
|
50 void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal); |
|
51 |
|
52 /** |
|
53 * Sets the Call Information. |
|
54 */ |
|
55 void SetCallInfoL(); |
|
56 |
|
57 /** |
|
58 * CActive Implentation |
|
59 */ |
|
60 TInt RunError( TInt aError ); |
|
61 |
|
62 /** |
|
63 * Checks if it the data is ready for the CS Call |
|
64 */ |
|
65 TBool IsDataReadyL(); |
|
66 |
|
67 |
|
68 protected: |
|
69 |
|
70 /** |
|
71 * C++ constructor. |
|
72 */ |
|
73 CMusCallMonitorBase( const RMobileCall& aCall, |
|
74 MMusTsyPropertyObserver& aObserver, |
|
75 MMusCallStateObserver& aCallStateObserver ); |
|
76 |
|
77 /** |
|
78 * Notify observer that our state changed |
|
79 */ |
|
80 virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal ); |
|
81 |
|
82 |
|
83 protected: |
|
84 |
|
85 /** |
|
86 * RMobileCall handle. |
|
87 */ |
|
88 const RMobileCall& iCall; |
|
89 |
|
90 /** |
|
91 * Store the remote state so that when local call events |
|
92 * happen then we can still aware the remote terminal. |
|
93 */ |
|
94 RMobileCall::TMobileCallEvent iRemoteCallEvent; |
|
95 |
|
96 /** |
|
97 * Store the local call event state so that when remote call events |
|
98 * happen then we can still aware the local terminal. |
|
99 */ |
|
100 RMobileCall::TMobileCallEvent iLocalCallEvent; |
|
101 |
|
102 /** |
|
103 * Observer to get nofitied when RCall status changed |
|
104 */ |
|
105 MMusTsyPropertyObserver& iTsyObserver; |
|
106 |
|
107 |
|
108 /* |
|
109 * Reference of callstate observer not owned |
|
110 */ |
|
111 MMusCallStateObserver& iCallStateObserver; |
|
112 |
|
113 |
|
114 MUS_UNITTEST( UT_CMusCallMonitor ) |
|
115 MUS_UNITTEST( UT_CMusCallEventMonitor ) |
|
116 MUS_UNITTEST( UT_CMusCallStatusMonitor ) |
|
117 }; |
|
118 |
|
119 #endif // MUSAOCALLMONITORBASE_H |