|
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 <etelmm.h> |
|
27 #include <e32base.h> |
|
28 |
|
29 /** |
|
30 * Monitor, which observes status of current cs call |
|
31 * |
|
32 * @lib musaoplugin.dll |
|
33 */ |
|
34 class CMusCallMonitorBase : public CActive |
|
35 { |
|
36 |
|
37 public: // constructors and destructor |
|
38 |
|
39 /** |
|
40 * Destructor. |
|
41 */ |
|
42 ~CMusCallMonitorBase(); |
|
43 |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Sets the state to PS Keys |
|
48 */ |
|
49 void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal); |
|
50 |
|
51 /** |
|
52 * Sets the Call Information. |
|
53 */ |
|
54 void SetCallInfoL(); |
|
55 |
|
56 /** |
|
57 * CActive Implentation |
|
58 */ |
|
59 TInt RunError( TInt aError ); |
|
60 |
|
61 |
|
62 protected: |
|
63 |
|
64 /** |
|
65 * C++ constructor. |
|
66 */ |
|
67 CMusCallMonitorBase( const RMobileCall& aCall, MMusTsyPropertyObserver& aObserver ); |
|
68 |
|
69 /** |
|
70 * Notify observer that our state changed |
|
71 */ |
|
72 virtual void NotifyCallStateChanged( NMusSessionInformationApi::TMusCallEvent aVal ); |
|
73 |
|
74 /** |
|
75 * Inspect the dialled number and set the PS key controlling whether |
|
76 * to add Privacy-header accordingly. |
|
77 */ |
|
78 void SetClirSetting( const TDesC& aDialledNumber ) const; |
|
79 |
|
80 /** |
|
81 * Should set the privacy ps key to on off based on incoming cs call privacy settings. |
|
82 * aCallInfo : Callinfo package read from current cs call. |
|
83 */ |
|
84 void SetTerminatingPrivacy( const RMobileCall& aCall ) const; |
|
85 |
|
86 /** |
|
87 * Removes privacy prefix away from phone number |
|
88 * @return returns dialed number witout prefix. |
|
89 */ |
|
90 HBufC* RemovePrefix( const TDesC& aOriginator ) const; |
|
91 |
|
92 protected: |
|
93 |
|
94 /** |
|
95 * RMobileCall handle. |
|
96 */ |
|
97 const RMobileCall& iCall; |
|
98 |
|
99 /** |
|
100 * Store the remote state so that when local call events |
|
101 * happen then we can still aware the remote terminal. |
|
102 */ |
|
103 RMobileCall::TMobileCallEvent iRemoteCallEvent; |
|
104 |
|
105 /** |
|
106 * Store the local call event state so that when remote call events |
|
107 * happen then we can still aware the local terminal. |
|
108 */ |
|
109 RMobileCall::TMobileCallEvent iLocalCallEvent; |
|
110 |
|
111 /** |
|
112 * Observer to get nofitied when RCall status changed |
|
113 */ |
|
114 MMusTsyPropertyObserver& iTsyObserver; |
|
115 |
|
116 MUS_UNITTEST( UT_CMusCallMonitor ) |
|
117 MUS_UNITTEST( UT_CMusCallEventMonitor ) |
|
118 MUS_UNITTEST( UT_CMusCallStatusMonitor ) |
|
119 MUS_UNITTEST( UT_CMusCallMonitorBase ) |
|
120 }; |
|
121 |
|
122 #endif // MUSAOCALLMONITORBASE_H |