1 /* |
|
2 * Copyright (c) 2005-2008 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: This file contains the header file of the MPECallHandling class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MPECALLHANDLING_H |
|
21 #define MPECALLHANDLING_H |
|
22 |
|
23 //INCLUDES |
|
24 #include <mccecall.h> |
|
25 #include <pevirtualengine.h> |
|
26 #include <mpecallowner.h> |
|
27 |
|
28 // CONSTANTS |
|
29 enum TPEHangUpOptions |
|
30 { |
|
31 ETPEHangUpDefault = 0, // Normal hangup |
|
32 ETPEHangUpResumeHeldCall, // 1 + Send |
|
33 ETPEHangUpNotResumeHeldCall, // 1x + Send |
|
34 }; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * Virtual interface of call handling subsystem |
|
40 * |
|
41 * @lib CallHandling.lib |
|
42 * @since Series60_4.0 |
|
43 */ |
|
44 class MPECallHandling |
|
45 { |
|
46 public: |
|
47 /** |
|
48 * destructor |
|
49 */ |
|
50 virtual ~MPECallHandling( ) |
|
51 { |
|
52 // empty destructor |
|
53 }; |
|
54 |
|
55 public: |
|
56 /** |
|
57 * Starts monitoring incoming calls for voice and data call. |
|
58 */ |
|
59 virtual void StartUp() = 0; |
|
60 |
|
61 /** |
|
62 * Makes answer request to the Multimode ETel. |
|
63 * @since Series60_4.0 |
|
64 * @param None. |
|
65 * @return Error code. |
|
66 */ |
|
67 virtual TInt AnswerCall() = 0; |
|
68 |
|
69 /** |
|
70 * Creates dialing request to the Multimode ETel. |
|
71 * @since Series60_4.0 |
|
72 * @param aNumber The telephone number to be called. |
|
73 * @param aCallId Identification number of the call. |
|
74 * @return Error (KErrNone is success). |
|
75 */ |
|
76 virtual TInt DialCall( const TPEPhoneNumber& aNumber,TInt& aCallId ) = 0; |
|
77 |
|
78 /** |
|
79 * Creates dialing request to the Multimode ETel. |
|
80 * @since Series60_4.0 |
|
81 * @param aNumber The telephone number to be called. |
|
82 * @param aCallId Identification number of the call. |
|
83 * @return Error (KErrNone is success). |
|
84 */ |
|
85 virtual TInt DialMultimedia( const TPEPhoneNumber& aNumber,TInt& aCallId ) = 0; |
|
86 |
|
87 /** |
|
88 * Makes HangUp request to the CCE. |
|
89 * @since Series60_4.0 |
|
90 * @param aCallId Identification number of the call to be rejected. |
|
91 * @param aAutoResumeOption if options for autoresume. |
|
92 * @return Error (KErrNone is success). |
|
93 */ |
|
94 virtual TInt HangUp( TInt aCallId, TPEHangUpOptions aAutoResumeOption ) = 0; |
|
95 |
|
96 /** |
|
97 * Put all the calls to idle and make an MMEtel request to |
|
98 * end the connection |
|
99 * @return KErrNotFound if there is not a call |
|
100 * KErrNone if there is one call at least |
|
101 */ |
|
102 virtual TInt ReleaseAll() = 0; |
|
103 |
|
104 /** |
|
105 * Makes terminate all connection request to Custom Api. |
|
106 * @since Series60_4.0 |
|
107 * @param None. |
|
108 * @return KErrNone. |
|
109 */ |
|
110 virtual TInt TerminateAllConnections() = 0; |
|
111 |
|
112 /** |
|
113 * Asks phone identity parameters from the mmetel. |
|
114 * @since Series60_4.0 |
|
115 * @param aMessage Reply message to the phone application. |
|
116 * @return Error (KErrNone or KErrNotFound). |
|
117 */ |
|
118 virtual TInt UpdatePhoneIdentity( |
|
119 MEngineMonitor::TPEMessagesFromPhoneEngine aMessage ) = 0; |
|
120 |
|
121 /** |
|
122 * Determines if there is a call in given state. |
|
123 * @since Series60_4.0 |
|
124 * @param aState Call state search key. |
|
125 * @return TBool, ETrue is there is a call; otherwise EFalse. |
|
126 */ |
|
127 virtual TBool IsCallInState( TPEState aState ) const = 0; |
|
128 |
|
129 /** |
|
130 * Determines if there is a call in given state. |
|
131 * @since Series60_4.0 |
|
132 * @param aState Call state search key. |
|
133 * @return callid is there is a call; otherwise KPECallIdNotUsed( -1 ). |
|
134 */ |
|
135 virtual TInt GetCallIdByState( TPEState aState ) const = 0; |
|
136 |
|
137 /** |
|
138 * Returns the missed voice call indicator. |
|
139 * @since Series60_4.0 |
|
140 * @param aMissedCall, missed call indicator. |
|
141 * @param aCallId, call idendificator. |
|
142 * @return KErrNone or KErrNotFound. |
|
143 */ |
|
144 virtual TInt GetMissedCall( TBool& aMissedCall, TInt aCallId ) = 0; |
|
145 |
|
146 /** |
|
147 * Returns information of the call. |
|
148 * @since Series60_4.0 |
|
149 * @param aCallInfo Current call information. |
|
150 * @param aCallId Identification number of the call. |
|
151 * @return Error code (KErrNone or KErrNotFound). |
|
152 */ |
|
153 virtual TInt GetCallInfo( RMobileCall::TMobileCallInfoV3& aCallInfo, TInt aCallId ) = 0; |
|
154 |
|
155 /** |
|
156 * Get the call state |
|
157 * |
|
158 * @param a call ID. |
|
159 * @return the call state. |
|
160 */ |
|
161 virtual TPEState GetCallState ( TInt aCallId ) = 0; |
|
162 |
|
163 /** |
|
164 * Get the number of calls (voice + call waiting) |
|
165 * |
|
166 * @return Number of calls. |
|
167 */ |
|
168 virtual TInt GetNumberOfCalls ( ) = 0; |
|
169 |
|
170 /** |
|
171 * Returns call duration time. |
|
172 * @since Series60_4.0 |
|
173 * @param aDuration Call duration. |
|
174 * @param aCallId Identification number of the call. |
|
175 * @return Error code (KErrNone or KErrNotFound). |
|
176 */ |
|
177 virtual TInt GetCallDuration( TTimeIntervalSeconds& aDuration, TInt aCallId ) = 0; |
|
178 |
|
179 /** |
|
180 * Makes reject request to the Multimode ETel |
|
181 * @since Series60_4.0 |
|
182 * @return Return possible error code |
|
183 */ |
|
184 virtual TInt RejectCall( ) = 0; |
|
185 |
|
186 /** |
|
187 * Reroutes error codes to the Phone Model. |
|
188 * @since Series60_4.0 |
|
189 * @param aCallId Identification number of the call. |
|
190 * @param aErrorCode Error code. |
|
191 * @return None. |
|
192 */ |
|
193 virtual void SendErrorMessage( TInt aCallId, TInt aErrorCode ) = 0; |
|
194 |
|
195 /** |
|
196 * Sets active line |
|
197 */ |
|
198 virtual void SetActiveLine() = 0; |
|
199 |
|
200 /** |
|
201 * Makes transfer request to the Multimode ETel |
|
202 * @since Series60_4.0 |
|
203 * @param None. |
|
204 * @return Return possible error code |
|
205 */ |
|
206 virtual TInt BuildConference() = 0; |
|
207 |
|
208 /** |
|
209 * Swaps connected and held calls |
|
210 * @since Series60_4.0 |
|
211 * @param None. |
|
212 * @return KErrNone or KErrNotFound. |
|
213 */ |
|
214 virtual TInt SwapCalls() = 0; |
|
215 |
|
216 /** |
|
217 * Checks that can add conference member. |
|
218 * @return possible error code from the CallHandling subsystem. |
|
219 */ |
|
220 virtual TInt AddConferenceMember() = 0; |
|
221 |
|
222 /** |
|
223 * Drops one member from the conference call |
|
224 * @since Series60_4.0 |
|
225 * @param aCallid It is the Call Id of the call to be dropped |
|
226 * @return Return possible error code |
|
227 */ |
|
228 virtual TInt DropMember( TInt aCallId ) = 0; |
|
229 |
|
230 /** |
|
231 * Splits one member from the conference call. |
|
232 * @since Series60_4.0 |
|
233 * @param aCallid It is the index number of the call to be splited. |
|
234 * @return Return possible error code |
|
235 */ |
|
236 virtual TInt GoOneToOne( TInt aCallId ) = 0; |
|
237 |
|
238 /** |
|
239 * Makes hold request for the connected call |
|
240 * @return KErrNone if request was sent successfully |
|
241 * KErrGsmNotAllowed if no connected call was found |
|
242 */ |
|
243 virtual TInt HoldCall( ) = 0; |
|
244 |
|
245 /** |
|
246 * Makes resume request for the held call |
|
247 * @return KErrNone if request was sent successfully |
|
248 * KErrGsmNotAllowed if no held call was found |
|
249 */ |
|
250 virtual TInt ResumeCall( ) = 0; |
|
251 |
|
252 /** |
|
253 * Makes transfer request to the Multimode ETel |
|
254 * @since Series60_4.0 |
|
255 * @param None. |
|
256 * @return KErrNone or KErrNotFound. |
|
257 */ |
|
258 virtual TInt TransferCalls() = 0; |
|
259 |
|
260 /** |
|
261 * Creates emergency call request to the Multimode ETel |
|
262 * @since Series60_4.0 |
|
263 * @param None. |
|
264 * @return None. |
|
265 */ |
|
266 virtual void DialEmergencyCall( const TPEPhoneNumber& aEmergencyNumber ) = 0; |
|
267 |
|
268 /** |
|
269 * Returns call terminated diagnostics of a call |
|
270 * Info is valid only for Idle call |
|
271 * @since Series60_4.0 |
|
272 * @param aCallName, TName information of a call |
|
273 * @return diagnostics info of a call |
|
274 */ |
|
275 virtual TInt GetCallTerminatedDiagnostics( |
|
276 TName& aCallName ) const = 0; |
|
277 |
|
278 /** |
|
279 * Returns call terminated error |
|
280 * @since Series60_4.0 |
|
281 * @return Return errorCode |
|
282 */ |
|
283 virtual TInt CallTerminatedError( const TInt aCallId ) = 0; |
|
284 |
|
285 /** |
|
286 * Replace active call with waiting call. |
|
287 * @since Series60_5.0 |
|
288 * @return Error (KErrNone is success). |
|
289 */ |
|
290 virtual TInt ReplaceActive() = 0; |
|
291 |
|
292 /** |
|
293 * Accepts unattended transfer request. |
|
294 * @since Series 60 v5.1 |
|
295 * @return System wide error code. |
|
296 */ |
|
297 virtual TInt AcceptUnattendedTransfer() = 0; |
|
298 |
|
299 /** |
|
300 * Rejects unattended transfer request. |
|
301 * @since Series 60 v5.1 |
|
302 * @return System wide error code. |
|
303 */ |
|
304 virtual TInt RejectUnattendedTransfer() = 0; |
|
305 |
|
306 /** |
|
307 * Does unattended transfer to the connected VoIP call |
|
308 * @since Series60_5.1 |
|
309 * @return Error (KErrNone is success). |
|
310 */ |
|
311 virtual TInt DoUnattendedTransfer( const TDesC& aTransferTarget ) = 0; |
|
312 |
|
313 /** |
|
314 * Starts call forwarding to selected address. |
|
315 * @since Series60_5.1 |
|
316 * @param aIndex A array index for a selected address. |
|
317 * @return Error (KErrNone is success). |
|
318 */ |
|
319 virtual TInt ForwardCallToAddress( TInt aIndex ) = 0; |
|
320 |
|
321 public: // DTMF related |
|
322 /** |
|
323 * Sends dtmf string. |
|
324 * @since Series60_4.0 |
|
325 * @param aDtmfString TPEDtmfString to be sent. |
|
326 * @return KErrNone. |
|
327 */ |
|
328 virtual TInt SendDtmf( const TPEDtmfString& aDtmfString ) = 0; |
|
329 |
|
330 /** |
|
331 * Allows a client to continue dtmf string sending when |
|
332 * it was stopped by use of 'w' char in the string. |
|
333 * @since Series60_4.0 |
|
334 * @param None. |
|
335 * @return None. |
|
336 */ |
|
337 virtual void ContinueDtmfSending() = 0; |
|
338 |
|
339 /** |
|
340 * Sends dtmf tone |
|
341 * @since Series60_4.0 |
|
342 * @param aTone Tone to be sent. |
|
343 * @return Error (KErrNone or KErrNotFound). |
|
344 */ |
|
345 virtual TInt StartDtmfTone( const TChar& aTone ) = 0; |
|
346 |
|
347 /** |
|
348 * Allows a client to cancel the sending of a dtmf string when |
|
349 * it was stopped by use of 'w' char in the string. |
|
350 * @since Series60_4.0 |
|
351 * @param None. |
|
352 * @return None. |
|
353 */ |
|
354 virtual void StopDtmfSending() = 0; |
|
355 |
|
356 /** |
|
357 * Stops sending dtmf tone. |
|
358 * @since Series60_4.0 |
|
359 * @param None. |
|
360 * @return Error (KErrNone or KErrNotFound). |
|
361 */ |
|
362 virtual TInt StopDtmfTone() = 0; |
|
363 |
|
364 /** |
|
365 * Cancels Dtmf string sending. |
|
366 * @since Series60_4.0 |
|
367 * @param None. |
|
368 * @return None. |
|
369 */ |
|
370 virtual void CancelDtmfPlay() = 0; |
|
371 |
|
372 /** |
|
373 * This method gets the lifetime of the MS. The lifetime information |
|
374 * includes the manufacturing date of the MS and the total amount of airtime use. |
|
375 * @param aLifeTimeInfo Life time information |
|
376 * @return Get succeeded or not. |
|
377 */ |
|
378 virtual TBool GetLifeTime( TDes8& aLifeTimeInfo ) = 0; |
|
379 |
|
380 /** |
|
381 * This method gets the reference to MPECallOwner object. |
|
382 * @return None. |
|
383 */ |
|
384 virtual MPECallOwner& CallOwner() const = 0; |
|
385 }; |
|
386 |
|
387 #endif // MPECALLHANDLING_H |
|
388 |
|
389 //End of file |
|