|
1 /* |
|
2 * Copyright (c) 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: Observer interface for CCE call object |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCCECALLOBSERVER_H |
|
20 #define MCCECALLOBSERVER_H |
|
21 |
|
22 #include <e32std.h> |
|
23 #include "ccpdefs.h" // error defenitions |
|
24 |
|
25 |
|
26 /** |
|
27 * Call observer for MCCECall class. |
|
28 * |
|
29 * @lib cce.dll |
|
30 * @since S60 v3.2 |
|
31 */ |
|
32 class MCCECallObserver |
|
33 { |
|
34 public: |
|
35 /** Tone to play enumeration. Used in MCCECallObserver::PlayInbandTone*/ |
|
36 enum TCCETone |
|
37 { |
|
38 ECCENoTone, |
|
39 ECCEUserBusy, |
|
40 ECCERadioPathNotAvailable, |
|
41 ECCECongestion, |
|
42 ECCESpecialInformation, |
|
43 ECCEReorder, |
|
44 ECCERemoteAlerting, |
|
45 ECCEDataCallTone, |
|
46 ECCENoSoundSequence, |
|
47 ECCEBeepSequence, /** ENoSoundSequence handled the same way */ |
|
48 ECCECallWaiting |
|
49 }; |
|
50 |
|
51 |
|
52 |
|
53 /** MCCE call events*/ |
|
54 enum TCCECallEvent |
|
55 { |
|
56 /** The call has been placed on hold as a result of a local action. */ |
|
57 ELocalHold, |
|
58 /** The call has been placed on hold by the remote connected party. */ |
|
59 ERemoteHold, |
|
60 |
|
61 /** The call has been resumed as a result of a local action. */ |
|
62 ELocalResume, |
|
63 /** The call has been resumed by the remote connected party. */ |
|
64 ERemoteResume, |
|
65 |
|
66 /** The call has been deflected to another remote party as a result of a local action. */ |
|
67 ELocalDeflectCall, |
|
68 |
|
69 /** The call has been transferred to another remote party as a result of a local action. */ |
|
70 ELocalTransfer, |
|
71 /** */ |
|
72 ERemoteTransferring, |
|
73 /** */ |
|
74 ERemoteTransferAlerting, |
|
75 |
|
76 /** The call has been terminated by the remote party. */ |
|
77 ERemoteTerminated, |
|
78 |
|
79 /** The call has been joined by the remote connected party to other call(s) to create/add |
|
80 * to a conference call. */ |
|
81 /* Call has been added to remote conference call at remote end */ |
|
82 ERemoteConferenceCreate, |
|
83 |
|
84 /** The outgoing call has been barred by the remote party. */ |
|
85 ERemoteBarred, |
|
86 /** The call is being forwarded by the remote party. */ |
|
87 ERemoteForwarding, |
|
88 /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */ |
|
89 ERemoteWaiting, |
|
90 /** The outgoing call has been barred by the local party. */ |
|
91 ELocalBarred, |
|
92 /** Indicates that the connected call is secure */ |
|
93 ESecureSession, |
|
94 /** Indicates that the connected call is not secure */ |
|
95 ENotSecureSession, |
|
96 |
|
97 /** VoIP specific */ |
|
98 EVoIPEventNotSecureSessionWithSips, |
|
99 /** VoIP specific: Indicates that the early media playing will be done in MCC component */ |
|
100 EVoIPEventEarlyMediaStarted, |
|
101 /** VoIP specific */ |
|
102 EVoIPEventMultipleChoices, |
|
103 /** VoIP specific */ |
|
104 EVoIPEventMovedPermanently, |
|
105 |
|
106 //////////////////////////// |
|
107 // CS call specific events |
|
108 /////////////////////////// |
|
109 |
|
110 /** Call has been deflected to another remote party as a result of a local action. */ |
|
111 ECCECSLocalDeflectCall, |
|
112 /** CS call specific event */ |
|
113 ECCECSDataPortLoaned, |
|
114 /** CS call specific event */ |
|
115 ECCECSDataPortRecovered, |
|
116 |
|
117 /** One or more of following information has been changed |
|
118 * - Remote party name |
|
119 * - Remote party number/address |
|
120 * - Call parameters ( ie. service id ) |
|
121 */ |
|
122 ECCENotifyRemotePartyInfoChange, |
|
123 |
|
124 /** Call secure status cannot be determined */ |
|
125 ECCESecureNotSpecified |
|
126 }; |
|
127 |
|
128 // Flags indicating all the possible call control capabilities. |
|
129 enum TCCECallControlCaps |
|
130 { |
|
131 /** The call supports data calls. */ |
|
132 ECCECapsData = 0x00000001, |
|
133 /** The call supports fax calls. */ |
|
134 ECCECapsFax = 0x00000002, |
|
135 /** The call supports voice calls. */ |
|
136 ECCECapsVoice = 0x00000004, |
|
137 /** The Dial request is currently a valid action. */ |
|
138 ECCECapsDial = 0x00000008, |
|
139 /** The Connect request is currently a valid action. */ |
|
140 ECCECapsConnect = 0x00000010, |
|
141 /** The Hang Up request is currently a valid action. */ |
|
142 ECCECapsHangUp = 0x00000020, |
|
143 /** The Answer request is currently a valid action. */ |
|
144 ECCECapsAnswer = 0x00000040, |
|
145 /** The Loan Data Port request is currently a valid action. */ |
|
146 ECCECapsLoanDataPort = 0x00000080, |
|
147 /** The Recover Data Port request is currently a valid action. */ |
|
148 ECCECapsRecoverDataPort= 0x00000100, |
|
149 /** Indicates that this call can be put on hold. This implies that the call is currently |
|
150 active and that there is no other held call. */ |
|
151 ECCECapsHold = 0x00000200, |
|
152 /** Indicates that this call can be resumed. This implies that the call is currently |
|
153 on hold and that there is no other active call. */ |
|
154 ECCECapsResume = 0x00000400, |
|
155 /** Indicates that this call's state can be swapped to the opposite state. This |
|
156 implies that this call is either active or held. There may be another call |
|
157 in the opposite state and if this is the case then both calls will be simultaneously |
|
158 swapped to their opposite state. */ |
|
159 ECCECapsSwap = 0x00000800, |
|
160 /** Indicates that this incoming call can be deflected to another destination.*/ |
|
161 ECCECapsDeflect = 0x00001000, |
|
162 /** Indicates that this call can be transferred to the remote party of another call. |
|
163 For this capability to be set there must be one active call and one held or |
|
164 dialing call.*/ |
|
165 ECCECapsTransfer = 0x00002000, |
|
166 /** Indicates that this call can be joined either to another single call to form |
|
167 a conference call or to an existing conference call.*/ |
|
168 ECCECapsJoin = 0x00004000, |
|
169 /** Indicates that this call (within a conference call) can go into One to One mode. |
|
170 This action would put the rest of the conference call on hold. */ |
|
171 ECCECapsOneToOne = 0x00008000, |
|
172 /** Indicates that the user can activate a CCBS request on this failed call set-up.*/ |
|
173 ECCECapsActivateCCBS = 0x00010000, |
|
174 /** Indicates that this call is part of an alternating call and the client can call |
|
175 SwitchAlternatingCall() on this call in order to switch it to its other mode.*/ |
|
176 ECCECapsSwitchAlternatingCall = 0x00020000, |
|
177 /** Indicates that this call can use/create a new bearer. This means that multiple |
|
178 calls (multicall) can be active at the same time using no more that 7 bearers |
|
179 simultaneously. The other option is to swap with an active call, therefore |
|
180 it becomes held and shares the same bearer.*/ |
|
181 ECCECapsMulticall = 0x00040000, |
|
182 /** Indicates that this call is an packet swiched call */ |
|
183 ECCECapsPSCall = 0x00080000, |
|
184 /** Indicates that this call supports unattended transfer method and that this call |
|
185 is currently active */ |
|
186 ECCECapsUnattendedTransfer = 0x00100000 |
|
187 }; |
|
188 |
|
189 public: |
|
190 |
|
191 /** |
|
192 * Call errors are notified using this interface. |
|
193 * |
|
194 * @since S60 v3.2 |
|
195 * @param aError Occurred error as integer, |
|
196 * return none |
|
197 */ |
|
198 virtual void ErrorOccurred( const TCCPError aError ) = 0; |
|
199 |
|
200 /** |
|
201 * Call state notificfation. |
|
202 * The observer need to verify the correctness of given state. |
|
203 * CCE will do at least basic call state change checking but also the client |
|
204 * needs to verify the correctness. |
|
205 * |
|
206 * @since S60 v3.2 |
|
207 * @param aState New state of the call |
|
208 * return none |
|
209 */ |
|
210 virtual void CallStateChanged( const CCPCall::TCallState aState ) = 0; |
|
211 |
|
212 /** |
|
213 * The state of the call has changed with inband tone, meaning network is playing |
|
214 * the tone relating to the state. |
|
215 * @since S60 3.2 |
|
216 * @param aState Call state. |
|
217 * @return none |
|
218 */ |
|
219 virtual void CallStateChangedWithInband( const CCPCall::TCallState aState ) = 0; |
|
220 |
|
221 /** |
|
222 * An event for the call has occurred. |
|
223 * The observer need to verify event correcness. |
|
224 * |
|
225 * @since S60 v3.2 |
|
226 * @param aEvent Occurred call event |
|
227 * return none |
|
228 */ |
|
229 virtual void CallEventOccurred( const MCCECallObserver::TCCECallEvent aEvent ) = 0; |
|
230 |
|
231 /** |
|
232 * Notifies observer the change in call duration. |
|
233 * |
|
234 * @since S60 v3.2 |
|
235 * @param aDuration Duration of the call in seconds |
|
236 * return none |
|
237 */ |
|
238 virtual void CallDurationChanged( const TTimeIntervalSeconds aDuration ) = 0; |
|
239 |
|
240 /** |
|
241 * Notifies observer about the changes in call control caps. |
|
242 * |
|
243 * @since S60 v3.2 |
|
244 * @param aCaps Contains updated call control capability flags |
|
245 * return none |
|
246 */ |
|
247 virtual void CallCapsChanged( const MCCECallObserver::TCCECallControlCaps aCaps ) = 0; |
|
248 |
|
249 /** |
|
250 * Notifies observer about transfer made by remote end |
|
251 * |
|
252 * @since S60 v3.2 |
|
253 * @param aAttended ETrue: if transfer type is attended, EFalse: type is unattended |
|
254 * @param aDestination Address where the call is to be transferred. Given as received in CCE |
|
255 * observer needs to verify the address, e.g. it can be KNullDesC. |
|
256 * A-B -> B-C, C has requested anonymity in network??? |
|
257 */ |
|
258 virtual void HandleTransfer( const TBool aAttended, |
|
259 const TDesC& aDestination ) = 0; |
|
260 }; |
|
261 |
|
262 |
|
263 #endif // MCCECALLOBSERVER_H |