|
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: CCP Call observer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCCPCALLOBSERVER_H |
|
20 #define MCCPCALLOBSERVER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "ccpdefs.h" // error defenitions |
|
25 |
|
26 class MCCPCall; |
|
27 |
|
28 /** |
|
29 * CCP API Call observer class |
|
30 * |
|
31 * @since S60 3.2 |
|
32 */ |
|
33 class MCCPCallObserver |
|
34 { |
|
35 public: |
|
36 /** Call states */ |
|
37 enum TCCPCallState |
|
38 { |
|
39 /** Indicates initial call state after call creation. Basic state. */ |
|
40 ECCPStateIdle, |
|
41 /** Indicates that the MT call is ringing but not answered yet by the local user. Basic state.*/ |
|
42 ECCPStateRinging, |
|
43 /** MO Call: the network notifies to the MS that the remote party is now ringing. Basic state.*/ |
|
44 ECCPStateConnecting, |
|
45 /** Indicates that call is connected and active. Basic state.*/ |
|
46 ECCPStateConnected, |
|
47 /** Indicates that call is disconnecting. Basic state.*/ |
|
48 ECCPStateDisconnecting, |
|
49 /** Indicates that the call is connected but on hold. Basic state.*/ |
|
50 ECCPStateHold, |
|
51 |
|
52 /** Call is transfering. Optional state.*/ |
|
53 ECCPStateTransferring, |
|
54 /** MO call is being forwarded at receiver end. Optional state. */ |
|
55 ECCPStateForwarding, |
|
56 /** Call is queued locally. Optional state. */ |
|
57 ECCPStateQueued, |
|
58 |
|
59 /** Indicates that the local user has answered the MT call but the network has not |
|
60 acknowledged the call connection yet. Must be sent after MCCPCall::Answer method has been completed. */ |
|
61 ECCPStateAnswering, |
|
62 |
|
63 /** Indicates that the call is dialing. Must be sent after MCCPCall::Dial method has been completed. */ |
|
64 ECCPStateDialling, |
|
65 |
|
66 }; |
|
67 |
|
68 /** Describes the possible call events. */ |
|
69 enum TCCPCallEvent |
|
70 { |
|
71 /** Call has been placed on hold as a result of a local action. */ |
|
72 ECCPLocalHold, |
|
73 /** Call has been placed on hold by the remote connected party. */ |
|
74 ECCPRemoteHold, |
|
75 /** Call has been resumed as a result of a local action. */ |
|
76 ECCPLocalResume, |
|
77 /** Call has been resumed by the remote connected party. */ |
|
78 ECCPRemoteResume, |
|
79 /** Outgoing call has been barred by the local party. */ |
|
80 ECCPLocalBarred, |
|
81 /** Outgoing call has been barred by the remote party. */ |
|
82 ECCPRemoteBarred, |
|
83 /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */ |
|
84 ECCPRemoteWaiting, |
|
85 /** Call has been terminated by the remote party. */ |
|
86 ECCPRemoteTerminated, |
|
87 /** Call is in queue */ |
|
88 ECCPQueued, |
|
89 |
|
90 /** VoIP specific */ |
|
91 ECCCSPEarlyMediaStarted, |
|
92 |
|
93 /** Call is secure */ |
|
94 ECCPSecureCall, |
|
95 /** Call is not secure */ |
|
96 ECCPNotSecureCall, |
|
97 |
|
98 /** VoIP specific |
|
99 User has called with address containing "SIPS:" prefix. This event notifies that |
|
100 secure call signaling is not possible. **/ |
|
101 ECCPNotSecureSessionWithSips, |
|
102 |
|
103 /** Call has been added to remote conference call at remote end */ |
|
104 ECCPRemoteConferenceCreate, |
|
105 |
|
106 //////////////////////////// |
|
107 // CS call specific events |
|
108 /////////////////////////// |
|
109 |
|
110 /** CS call specific event */ |
|
111 ECCPCSDataPortLoaned, |
|
112 /** CS call specific event */ |
|
113 ECCPCSDataPortRecovered, |
|
114 |
|
115 /** One or more of following information has been changed |
|
116 * - Remote party name |
|
117 * - Remote party number/address |
|
118 * - Call parameters ( ie. service id ) |
|
119 */ |
|
120 ECCPNotifyRemotePartyInfoChange, |
|
121 |
|
122 /** Call secure status cannot be determined */ |
|
123 ECCPSecureNotSpecified |
|
124 }; |
|
125 |
|
126 |
|
127 /** Flags indicating all the possible call control capabilities. */ |
|
128 enum TCCPCallControlCaps |
|
129 { |
|
130 /** Call supports data calls. */ |
|
131 ECCPCapsData = 0x00000001, |
|
132 /** Call supports fax calls. */ |
|
133 ECCPCapsFax = 0x00000002, |
|
134 /** Call supports voice calls. */ |
|
135 ECCPCapsVoice = 0x00000004, |
|
136 /** The Dial request is currently a valid action. */ |
|
137 ECCPCapsDial = 0x00000008, |
|
138 /** The Connect request is currently a valid action. */ |
|
139 ECCPCapsConnect = 0x00000010, |
|
140 /** The Hang Up request is currently a valid action. */ |
|
141 ECCPCapsHangUp = 0x00000020, |
|
142 /** The Answer request is currently a valid action. */ |
|
143 ECCPCapsAnswer = 0x00000040, |
|
144 /** The Loan Data Port request is currently a valid action. */ |
|
145 ECCPCapsLoanDataPort = 0x00000080, |
|
146 /** The Recover Data Port request is currently a valid action. */ |
|
147 ECCPCapsRecoverDataPort= 0x00000100, |
|
148 /** Indicates that this call can be put on hold. This implies that the call is currently |
|
149 active and that there is no other held call. */ |
|
150 ECCPCapsHold = 0x00000200, |
|
151 /** Indicates that this call can be resumed. This implies that the call is currently |
|
152 on hold and that there is no other active call. */ |
|
153 ECCPCapsResume = 0x00000400, |
|
154 /** Indicates that this call's state can be swapped to the opposite state. This |
|
155 implies that this call is either active or held. There may be another call |
|
156 in the opposite state and if this is the case then both calls will be simultaneously |
|
157 swapped to their opposite state. */ |
|
158 ECCPCapsSwap = 0x00000800, |
|
159 /** Indicates that this incoming call can be deflected to another destination.*/ |
|
160 ECCPCapsDeflect = 0x00001000, |
|
161 /** Indicates that this call can be transferred to the remote party of another call. |
|
162 For this capability to be set there must be one active call and one held or |
|
163 dialing call.*/ |
|
164 ECCPCapsTransfer = 0x00002000, |
|
165 /** Indicates that this call can be joined either to another single call to form |
|
166 a conference call or to an existing conference call.*/ |
|
167 ECCPCapsJoin = 0x00004000, |
|
168 /** Indicates that this call (within a conference call) can go into One to One mode. |
|
169 This action would put the rest of the conference call on hold. */ |
|
170 ECCPCapsOneToOne = 0x00008000, |
|
171 /** Indicates that the user can activate a CCBS request on this failed call set-up.*/ |
|
172 ECCPCapsActivateCCBS = 0x00010000, |
|
173 /** Indicates that this call is part of an alternating call and the client can call |
|
174 SwitchAlternatingCall() on this call in order to switch it to its other mode.*/ |
|
175 ECCPCapsSwitchAlternatingCall = 0x00020000, |
|
176 /** Indicates that this call can use/create a new bearer. This means that multiple |
|
177 calls (multicall) can be active at the same time using no more that 7 bearers |
|
178 simultaneously. The other option is to swap with an active call, therefore |
|
179 it becomes held and shares the same bearer.*/ |
|
180 ECCPCapsMulticall = 0x00040000, |
|
181 /** Indicates that this call is an packet switched call */ |
|
182 ECCPCapsPSCall = 0x00080000, |
|
183 /** Indicates that this call supports unattended transfer method and that this call |
|
184 is currently active */ |
|
185 ECCPCapsUnattendedTransfer = 0x00100000, |
|
186 /** Indicates that a conference call can be created. */ |
|
187 KCCPCapsCreate = 0x00200000 |
|
188 }; |
|
189 |
|
190 |
|
191 protected: |
|
192 /** |
|
193 * Protects the observer being deleted through the observer interface |
|
194 * @since S60 3.2 |
|
195 */ |
|
196 virtual inline ~MCCPCallObserver() {}; |
|
197 |
|
198 public: |
|
199 /** |
|
200 * An error has occurred concerning a specific call. |
|
201 * @since S60 3.2 |
|
202 * @param aError Error code. |
|
203 * @param aCall Pointer to used ccp call, can be NULL in emergency call |
|
204 * @return none |
|
205 */ |
|
206 virtual void ErrorOccurred( const TCCPError aError, MCCPCall* aCall ) = 0; |
|
207 |
|
208 /** |
|
209 * The state of the call has changed. |
|
210 * @since S60 3.2 |
|
211 * @param aState Call state. |
|
212 * @param aCall Pointer to used ccp call, can be NULL in emergency call |
|
213 * @return none |
|
214 */ |
|
215 virtual void CallStateChanged( const MCCPCallObserver::TCCPCallState aState, |
|
216 MCCPCall* aCall) = 0; |
|
217 |
|
218 /** |
|
219 * The state of the call has changed with inband tone, meaning network is playing |
|
220 * the tone relating to the state. |
|
221 * @since S60 3.2 |
|
222 * @param aState Call state. |
|
223 * @param aCall Pointer to used ccp call, can be NULL in emergency call |
|
224 * @return none |
|
225 */ |
|
226 virtual void CallStateChangedWithInband( const MCCPCallObserver::TCCPCallState aState, |
|
227 MCCPCall* aCall ) = 0; |
|
228 |
|
229 /** |
|
230 * An event has occurred concerning a specific call. |
|
231 * @since S60 3.2 |
|
232 * @param aEvent Occurred event. |
|
233 * @param aCall Pointer to used ccp call, can be NULL in emergency call |
|
234 * @return none |
|
235 */ |
|
236 virtual void CallEventOccurred( const MCCPCallObserver::TCCPCallEvent aEvent, |
|
237 MCCPCall* aCall ) = 0; |
|
238 |
|
239 /** |
|
240 * Notifies changed call capabilities. |
|
241 * @since S60 3.2 |
|
242 * @param aCapsFlags New capabilities for the call |
|
243 * @param aCall Pointer to used ccp call, can be NULL in emergency call |
|
244 * @return none |
|
245 */ |
|
246 virtual void CallCapsChanged( const TUint32 aCapsFlags, |
|
247 MCCPCall* aCall ) = 0; |
|
248 }; |
|
249 |
|
250 #endif // MCCPCALLOBSERVER_H |
|
251 |
|
252 // End of File |