1 /* |
|
2 * Copyright (c) 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: Declarations for class CSPCallAddedHandler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSPCALLADDEDHANDLER_H |
|
20 #define CSPCALLADDEDHANDLER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <etelmm.h> |
|
24 #include "rcsplinecontainer.h" |
|
25 #include "mcsplinestatusobserver.h" // For MCSPLineStatusObserver |
|
26 |
|
27 class CSPCall; |
|
28 class CSPCallArray; |
|
29 class CSProvider; |
|
30 class MCCPCSObserver; |
|
31 class RCSPLineContainer; |
|
32 class CSPEtelLineStatusMonitor; |
|
33 class CSPEtelCallWaitingRequester; |
|
34 class MCSPCommonInfo; |
|
35 class CSPAudioHandler; |
|
36 |
|
37 /** |
|
38 * Handles call adding from calls not done by the plugin. |
|
39 * |
|
40 * @lib csplugin.dll |
|
41 */ |
|
42 NONSHARABLE_CLASS(CSPCallAddedHandler): public CBase, |
|
43 public MCSPLineStatusObserver |
|
44 { |
|
45 |
|
46 public: //Constructors and descructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructing for the monitor. |
|
50 * |
|
51 * @param aObserver the observer for getting notification |
|
52 * @param aLine the line to monitor |
|
53 * @param aLineId line identifier |
|
54 */ |
|
55 static CSPCallAddedHandler* NewL( |
|
56 const MCCPCSObserver& aObserver, |
|
57 RCSPLineContainer& aLineContainer, |
|
58 CSPCallArray& aCallArray, |
|
59 MCSPCommonInfo& aCommonInfo, |
|
60 CSPAudioHandler& aAudioHandler ); |
|
61 |
|
62 /** |
|
63 * C++ default destructor |
|
64 */ |
|
65 virtual ~CSPCallAddedHandler( ); |
|
66 |
|
67 |
|
68 // from base class MCSPLineStatusMonitor |
|
69 |
|
70 /** |
|
71 * Handles line status change notifications |
|
72 * @param aLine the line to monitor |
|
73 * @param aLineId line identifier |
|
74 * @param aLineStatus |
|
75 */ |
|
76 void LineStatusChanged( RMobileLine& aLine, |
|
77 RCSPLineContainer::TCSPLineId aLineId, |
|
78 RMobileCall::TMobileCallStatus& aLineStatus ); |
|
79 |
|
80 protected: // From CActive |
|
81 |
|
82 /** |
|
83 * From CActive |
|
84 * RunL |
|
85 */ |
|
86 void RunL(); |
|
87 |
|
88 /** |
|
89 * From CActive |
|
90 * Catches errors if RunL leaves |
|
91 * @param aError error code |
|
92 * @return error code |
|
93 */ |
|
94 TInt RunError( TInt aError ); |
|
95 |
|
96 /** |
|
97 * From CActive |
|
98 * Cancels the monitor |
|
99 */ |
|
100 void DoCancel(); |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * C++ default constructor |
|
106 * @param aObserver the observer for status change (incoming call) |
|
107 * @param aLine the line associated with the call |
|
108 * @param aLineId line identifier |
|
109 */ |
|
110 CSPCallAddedHandler( const MCCPCSObserver& aObserver, |
|
111 RCSPLineContainer& aLineContainer, |
|
112 CSPCallArray& aCallArray, |
|
113 MCSPCommonInfo& aCommonInfo, |
|
114 CSPAudioHandler& aAudioHandler ); |
|
115 |
|
116 /** |
|
117 * Constructs the monitor in the second phase. |
|
118 */ |
|
119 void ConstructL(); |
|
120 |
|
121 /** |
|
122 * Handles call creation |
|
123 * @param aLine the line to monitor |
|
124 * @param aCallName the call name |
|
125 * @param aLineId line identifier |
|
126 */ |
|
127 void CallAdded( RMobileLine& aLine, |
|
128 TName aCallName, |
|
129 RCSPLineContainer::TCSPLineId aLineId ); |
|
130 |
|
131 private: // data |
|
132 |
|
133 /** |
|
134 * Line container. |
|
135 */ |
|
136 RCSPLineContainer& iLineContainer; |
|
137 |
|
138 /** |
|
139 * Notifications observer. |
|
140 */ |
|
141 const MCCPCSObserver& iObserver; |
|
142 |
|
143 /** |
|
144 * Line status monitors. |
|
145 */ |
|
146 CSPEtelLineStatusMonitor* iVoiceLineMonitor; |
|
147 CSPEtelLineStatusMonitor* iDataLineMonitor; |
|
148 CSPEtelLineStatusMonitor* iAuxLineMonitor; |
|
149 |
|
150 /** |
|
151 * Array of calls. |
|
152 */ |
|
153 CSPCallArray& iCallArray; |
|
154 |
|
155 /** |
|
156 * Common info handle. |
|
157 */ |
|
158 MCSPCommonInfo& iCommonInfo; |
|
159 |
|
160 /** |
|
161 * Audio Handler reference. |
|
162 */ |
|
163 CSPAudioHandler& iAudioHandler; |
|
164 }; |
|
165 |
|
166 #endif // CSPCALLADDEDHANDLER_H |
|