24
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@internalAll
|
|
19 |
*/
|
|
20 |
|
|
21 |
|
|
22 |
#ifndef __CALL_H__
|
|
23 |
#define __CALL_H__
|
|
24 |
|
|
25 |
#include <et_phone.h>
|
|
26 |
#include "TSYCONFG.H"
|
|
27 |
#include "ATBASE.H"
|
|
28 |
#include <f32file.h>
|
|
29 |
//
|
|
30 |
// CAcquireEntry
|
|
31 |
//
|
|
32 |
class CAcquireOwnerList;
|
|
33 |
class CFaxSharedFileHandles;
|
|
34 |
class CAcquireEntry : public CBase
|
|
35 |
/**
|
|
36 |
@internalComponent
|
|
37 |
*/
|
|
38 |
{
|
|
39 |
public:
|
|
40 |
static CAcquireEntry* NewL(const TTsyReqHandle aTsyReqHandle);
|
|
41 |
CAcquireEntry(const TTsyReqHandle aTsyReqHandle);
|
|
42 |
~CAcquireEntry();
|
|
43 |
void Deque();
|
|
44 |
public:
|
|
45 |
TTsyReqHandle iTsyReqHandle;
|
|
46 |
private:
|
|
47 |
TDblQueLink iLink;
|
|
48 |
friend class CAcquireOwnerList;
|
|
49 |
};
|
|
50 |
|
|
51 |
//
|
|
52 |
// CAcquireOwnerList
|
|
53 |
//
|
|
54 |
class CAcquireOwnerList : public CBase
|
|
55 |
/**
|
|
56 |
@internalComponent
|
|
57 |
*/
|
|
58 |
{
|
|
59 |
public:
|
|
60 |
static CAcquireOwnerList* NewL();
|
|
61 |
CAcquireOwnerList();
|
|
62 |
~CAcquireOwnerList();
|
|
63 |
void ConstructL();
|
|
64 |
CAcquireEntry* FindByTsyReqHandle(const TTsyReqHandle aTsyReqHandle);
|
|
65 |
void Remove(CAcquireEntry* aEntry);
|
|
66 |
public:
|
|
67 |
TDblQue<CAcquireEntry> iAcquireList;
|
|
68 |
};
|
|
69 |
|
|
70 |
class CCallHayes;
|
|
71 |
class CHeartbeatRunner : public CBase, public MBeating
|
|
72 |
/**
|
|
73 |
@internalComponent
|
|
74 |
*/
|
|
75 |
{
|
|
76 |
public:
|
|
77 |
static CHeartbeatRunner* NewL(CCallHayes* aCallHayes,CNotifications* aNotificationStore);
|
|
78 |
~CHeartbeatRunner();
|
|
79 |
TTimeIntervalSeconds CallDuration() const;
|
|
80 |
void Start();
|
|
81 |
void Stop();
|
|
82 |
protected:
|
|
83 |
CHeartbeatRunner(CCallHayes* aCallHayes,CNotifications* aNotificationStore);
|
|
84 |
private:
|
|
85 |
void ConstructL();
|
|
86 |
// functions for MBeating protocol
|
|
87 |
void Beat(); // called when beat works ok
|
|
88 |
void Synchronize(); // called when we need to synchronize
|
|
89 |
private:
|
|
90 |
TTime iStartTime;
|
|
91 |
CHeartbeat* iHeartbeat;
|
|
92 |
TInt iTicks;
|
|
93 |
CCallHayes* iCallHayes;
|
|
94 |
CNotifications* iNotificationStore;
|
|
95 |
};
|
|
96 |
|
|
97 |
//
|
|
98 |
// CCallHayes - General Call Functionality
|
|
99 |
//
|
|
100 |
|
|
101 |
class CATHangUp;
|
|
102 |
class CATAnswerData;
|
|
103 |
class CATConnectData;
|
|
104 |
class CATQuickInit;
|
|
105 |
class CATWaitForNoCarrier;
|
|
106 |
class CCallHayes : public CCallBase
|
|
107 |
/**
|
|
108 |
@internalComponent
|
|
109 |
*/
|
|
110 |
{
|
|
111 |
public:
|
|
112 |
CCallHayes(CATIO* aATIO,CATInit* aInit,CPhoneGlobals* aPhoneGlobals);
|
|
113 |
void ConstructL(const TName& aName);
|
|
114 |
~CCallHayes();
|
|
115 |
virtual void Init();
|
|
116 |
virtual TInt RegisterNotification(const TInt aIpc);
|
|
117 |
virtual TInt DeregisterNotification(const TInt aIpc);
|
|
118 |
static void CloseCall(TAny* aObj);
|
|
119 |
virtual CTelObject::TReqMode ReqModeL(const TInt aIpc);
|
|
120 |
// MCallBaseTSY pure virtuals
|
|
121 |
virtual TInt GetInfo(const TTsyReqHandle aTsyReqHandle,RCall::TCallInfo* aCallInfo);
|
|
122 |
virtual TInt NotifyCapsChange(const TTsyReqHandle aTsyReqHandle,RCall::TCaps* aCaps);
|
|
123 |
virtual TInt NotifyCapsChangeCancel(const TTsyReqHandle aTsyReqHandle);
|
|
124 |
virtual TInt NotifyHookChange(const TTsyReqHandle aTsyReqHandle, RCall::THookStatus* aHookStatus);
|
|
125 |
virtual TInt NotifyHookChangeCancel(const TTsyReqHandle aTsyReqHandle);
|
|
126 |
virtual TInt NotifyStatusChange(const TTsyReqHandle aTsyReqHandle,RCall::TStatus* aStatus);
|
|
127 |
virtual TInt NotifyStatusChangeCancel(const TTsyReqHandle aTsyReqHandle);
|
|
128 |
virtual TInt NotifyDurationChange(const TTsyReqHandle aTsyReqHandle,TTimeIntervalSeconds* aTime);
|
|
129 |
virtual TInt NotifyDurationChangeCancel(const TTsyReqHandle aTsyReqHandle);
|
|
130 |
virtual TInt LoanDataPort(const TTsyReqHandle aTsyReqHandle,RCall::TCommPort* aCommPort);
|
|
131 |
virtual TInt LoanDataPortCancel(const TTsyReqHandle aTsyReqHandle);
|
|
132 |
virtual TInt RecoverDataPort(const TTsyReqHandle aTsyReqHandle);
|
|
133 |
virtual TInt RecoverDataPortAndRelinquishOwnership();
|
|
134 |
virtual TInt GetStatus(const TTsyReqHandle aTsyReqHandle,RCall::TStatus* aCallStatus);
|
|
135 |
virtual TInt TransferOwnership(const TTsyReqHandle aTsyReqHandle);
|
|
136 |
virtual TInt AcquireOwnership(const TTsyReqHandle aTsyReqHandle);
|
|
137 |
virtual TInt AcquireOwnershipCancel(const TTsyReqHandle aTsyReqHandle);
|
|
138 |
virtual TInt GetBearerServiceInfo(const TTsyReqHandle aTsyReqHandle,RCall::TBearerService* aService);
|
|
139 |
virtual TInt GetCallParams(const TTsyReqHandle aTsyReqHandle, TDes8* aParams);
|
|
140 |
virtual TInt GetCallDuration(const TTsyReqHandle aTsyReqHandle, TTimeIntervalSeconds* aTime);
|
|
141 |
virtual TInt GetFaxSettings(const TTsyReqHandle aTsyReqHandle,RCall::TFaxSessionSettings* aSettings);
|
|
142 |
virtual TInt SetFaxSettings(const TTsyReqHandle aTsyReqHandle,const RCall::TFaxSessionSettings* aSettings);
|
|
143 |
|
|
144 |
// MTelObjectTSY pure virtuals
|
|
145 |
virtual CTelObject* OpenNewObjectByNameL(const TDesC&);
|
|
146 |
virtual CTelObject* OpenNewObjectL(TDes& aNewName);
|
|
147 |
virtual TInt CheckAndSetRegistrationParams(const TInt aIpc,const TDes8* aDes1,const TDes8* aDes2);
|
|
148 |
|
|
149 |
|
|
150 |
// MSubSessionExtBaseTSY pure virtual
|
|
151 |
virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage);
|
|
152 |
|
|
153 |
// own pure virtual
|
|
154 |
virtual void AnswerImmediately()=0;
|
|
155 |
|
|
156 |
// other funtions
|
|
157 |
RCall::TStatus GetCoreCallStatus();
|
|
158 |
TInt ChangeCallStatus(RMobileCall::TMobileCallStatus aCallStatus);
|
|
159 |
void ChangeLineStatus(RCall::TStatus aLineStatus);
|
|
160 |
void SetToIdle();
|
|
161 |
void SetToIdleAndCompleteReq(TTsyReqHandle aTsyReqHandle,TInt aStatus);
|
|
162 |
TCallInfoTSY* CallInfo();
|
|
163 |
void GetCallInfo(TCallInfoIndex* aCallInfoIndex);
|
|
164 |
TBool CheckName(const TDesC& aName) const;
|
|
165 |
void GetCallDuration(TTimeIntervalSeconds& aTime) const;
|
|
166 |
void StartCallTicker() const;
|
|
167 |
void StopCallTicker() const;
|
|
168 |
void ResetIsForIncomingCall();
|
|
169 |
TBool IsForIncomingCall() const;
|
|
170 |
void SetOwnedByTSY();
|
|
171 |
void SetUnownedByTSY();
|
|
172 |
TBool IsOwnedByTSY() const;
|
|
173 |
virtual TBool CollateCurrentMobileCaps(const TTsyReqHandle aTsyReqHandle, TUint32* aCallCaps)=0;
|
|
174 |
virtual TBool CollateCurrentCoreCaps(const TTsyReqHandle aTsyReqHandle, TUint32* aCallCaps)=0;
|
|
175 |
|
|
176 |
protected:
|
|
177 |
void SetCallParams(const TDesC8* aParams);
|
|
178 |
void GetDefaultCallParams();
|
|
179 |
TInt ValidateRequest(const TTsyReqHandle aTsyReqHandle, RCall::TStatus aLineStatus);
|
|
180 |
|
|
181 |
public:
|
|
182 |
CPhoneGlobals* iPhoneGlobals;
|
|
183 |
CATWaitForNoCarrier* iWaitForNoCarrier;
|
|
184 |
protected:
|
|
185 |
TCallInfoTSY iCallInfo;
|
|
186 |
CATIO* iIo;
|
|
187 |
CATInit* iInit;
|
|
188 |
CATQuickInit* iQuickInit;
|
|
189 |
CAcquireOwnerList* iList;
|
|
190 |
CHeartbeatRunner* iCallTimer;
|
|
191 |
TBool iIsForIncomingCall;
|
|
192 |
TBool iIsOwnedByTSY;
|
|
193 |
TTsyReqHandle iAnswerTsyReqHandle;
|
|
194 |
RMobileCall::TMobileCallCapsV1 iMobileCaps;
|
|
195 |
RCall::TCaps iCaps;
|
|
196 |
};
|
|
197 |
|
|
198 |
|
|
199 |
//
|
|
200 |
// CCallMobile - Call functionality for mobile phones
|
|
201 |
//
|
|
202 |
class CCallMobile : public CCallHayes
|
|
203 |
/**
|
|
204 |
@internalComponent
|
|
205 |
*/
|
|
206 |
{
|
|
207 |
public:
|
|
208 |
CCallMobile(CATIO* aATIO,CATInit* aInit,CPhoneGlobals* aGlobals);
|
|
209 |
~CCallMobile();
|
|
210 |
|
|
211 |
virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage);
|
|
212 |
virtual TInt CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle);
|
|
213 |
virtual TReqMode ReqModeL(const TInt aIpc);
|
|
214 |
virtual TInt NumberOfSlotsL(const TInt aIpc);
|
|
215 |
|
|
216 |
private:
|
|
217 |
virtual TInt GetCaps(const TTsyReqHandle aTsyReqHandle,RCall::TCaps* aCaps);
|
|
218 |
|
|
219 |
// ETELMM supported requests
|
|
220 |
TInt GetMobileCallCaps(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps);
|
|
221 |
TInt NotifyMobileCallCapsChange(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps);
|
|
222 |
TInt NotifyMobileCallCapsChangeCancel(const TTsyReqHandle aTsyReqHandle);
|
|
223 |
|
|
224 |
TInt GetMobileCallStatus(const TTsyReqHandle aTsyReqHandle,RMobileCall::TMobileCallStatus* aStatus);
|
|
225 |
TInt NotifyMobileCallStatusChange(const TTsyReqHandle aTsyReqHandle,RMobileCall::TMobileCallStatus* aStatus);
|
|
226 |
TInt NotifyMobileCallStatusChangeCancel(const TTsyReqHandle aTsyReqHandle);
|
|
227 |
|
|
228 |
virtual void CollateCoreCaps(const TTsyReqHandle aTsyReqHandle, TUint32* aCallCaps)=0;
|
|
229 |
virtual TBool CollateCurrentMobileCaps(const TTsyReqHandle aTsyReqHandle, TUint32* aCallCaps);
|
|
230 |
virtual TBool CollateCurrentCoreCaps(const TTsyReqHandle aTsyReqHandle, TUint32* aCallCaps);
|
|
231 |
};
|
|
232 |
|
|
233 |
|
|
234 |
|
|
235 |
//Added for Java Demo 4.4.99
|
|
236 |
//
|
|
237 |
// CCallMobileVoice - Specific Voice Call Functionality
|
|
238 |
//
|
|
239 |
class CATDialVoice;
|
|
240 |
class CATHangUpVoice;
|
|
241 |
class CATAnswerVoice;
|
|
242 |
class CCallMobileVoice : public CCallMobile
|
|
243 |
/**
|
|
244 |
@internalComponent
|
|
245 |
*/
|
|
246 |
{
|
|
247 |
public:
|
|
248 |
static CCallMobileVoice* NewL(CATIO* aATIO,CATInit* aInit,CPhoneGlobals* aPhoneGlobals,const TName& aName);
|
|
249 |
CCallMobileVoice(CATIO* aATIO,CATInit* aInit,CPhoneGlobals* aGlobals);
|
|
250 |
~CCallMobileVoice();
|
|
251 |
|
|
252 |
// MCallBaseTSY pure virtuals
|
|
253 |
virtual TInt RecoverDataPortAndRelinquishOwnership();
|
|
254 |
//
|
|
255 |
virtual TInt LoanDataPort(const TTsyReqHandle aTsyReqHandle,RCall::TCommPort* aCommPort);
|
|
256 |
virtual TInt LoanDataPortCancel(const TTsyReqHandle aTsyReqHandle);
|
|
257 |
virtual TInt RecoverDataPort(const TTsyReqHandle aTsyReqHandle);
|
|
258 |
virtual TInt Dial(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams,TDesC* aTelNumber);
|
|
259 |
virtual TInt DialCancel(const TTsyReqHandle aTsyReqHandle);
|
|
260 |
virtual TInt Connect(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams);
|
|
261 |
virtual TInt ConnectCancel(const TTsyReqHandle aTsyReqHandle);
|
|
262 |
virtual TInt AnswerIncomingCall(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams);
|
|
263 |
virtual TInt AnswerIncomingCallCancel(const TTsyReqHandle aTsyReqHandle);
|
|
264 |
virtual TInt HangUp(const TTsyReqHandle aTsyReqHandle);
|
|
265 |
virtual TInt HangUpCancel(const TTsyReqHandle aTsyReqHandle);
|
|
266 |
virtual TInt RelinquishOwnership();
|
|
267 |
|
|
268 |
virtual void AnswerImmediately();
|
|
269 |
virtual void CollateCoreCaps(const TTsyReqHandle aTsyReqHandle, TUint32* aCallCaps);
|
|
270 |
|
|
271 |
protected:
|
|
272 |
void ConstructL(const TName& aName);
|
|
273 |
|
|
274 |
private:
|
|
275 |
CATDialVoice* iDialVoice;
|
|
276 |
CATAnswerVoice* iAnswerVoice;
|
|
277 |
CATHangUpVoice* iHangUpVoice;
|
|
278 |
};
|
|
279 |
|
|
280 |
//
|
|
281 |
// CCallMobileData - Specific Data Call Functionality
|
|
282 |
//
|
|
283 |
class CATDialData;
|
|
284 |
class CATHangUpData;
|
|
285 |
class CATSetToOnlineDataMode;
|
|
286 |
class CATSetCBST;
|
|
287 |
class CCallMobileData : public CCallMobile
|
|
288 |
/**
|
|
289 |
@internalComponent
|
|
290 |
*/
|
|
291 |
{
|
|
292 |
public:
|
|
293 |
static CCallMobileData* NewL(CATIO* aATIO,CATInit* aInit,CPhoneGlobals* aPhoneGlobals,const TName& aName);
|
|
294 |
CCallMobileData(CATIO* aATIO,CATInit* aInit,CPhoneGlobals* aGlobals);
|
|
295 |
~CCallMobileData();
|
|
296 |
|
|
297 |
// MCallBaseTSY pure virtuals
|
|
298 |
virtual TInt RecoverDataPortAndRelinquishOwnership();
|
|
299 |
//
|
|
300 |
virtual TInt LoanDataPort(const TTsyReqHandle aTsyReqHandle,RCall::TCommPort* aCommPort);
|
|
301 |
virtual TInt LoanDataPortCancel(const TTsyReqHandle aTsyReqHandle);
|
|
302 |
virtual TInt RecoverDataPort(const TTsyReqHandle aTsyReqHandle);
|
|
303 |
virtual TInt Dial(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams,TDesC* aTelNumber);
|
|
304 |
virtual TInt DialCancel(const TTsyReqHandle aTsyReqHandle);
|
|
305 |
virtual TInt Connect(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams);
|
|
306 |
virtual TInt ConnectCancel(const TTsyReqHandle aTsyReqHandle);
|
|
307 |
virtual TInt AnswerIncomingCall(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams);
|
|
308 |
virtual TInt AnswerIncomingCallCancel(const TTsyReqHandle aTsyReqHandle);
|
|
309 |
virtual TInt HangUp(const TTsyReqHandle aTsyReqHandle);
|
|
310 |
virtual TInt HangUpCancel(const TTsyReqHandle aTsyReqHandle);
|
|
311 |
virtual TInt RelinquishOwnership();
|
|
312 |
|
|
313 |
// CCallHayes pure virtual
|
|
314 |
virtual void AnswerImmediately();
|
|
315 |
|
|
316 |
virtual void CollateCoreCaps(const TTsyReqHandle aTsyReqHandle, TUint32* aCallCaps);
|
|
317 |
|
|
318 |
// Utility function used by objects created by this class
|
|
319 |
// (this has been done to reduce code size).
|
|
320 |
TInt AssembleCBSTSetString(TBuf8<KGenericBufferSize>& aTxBuffer);
|
|
321 |
|
|
322 |
protected:
|
|
323 |
void ConstructL(const TName& aName);
|
|
324 |
virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage);
|
|
325 |
|
|
326 |
private:
|
|
327 |
// Utility functions
|
|
328 |
void SetDataCallParams(const TDesC8* aCallParams);
|
|
329 |
TInt GetMobileDataCallCaps(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps);
|
|
330 |
|
|
331 |
private:
|
|
332 |
CATSetCBST* iSetCBST;
|
|
333 |
CATDialData* iDialData;
|
|
334 |
CATAnswerData* iAnswerData;
|
|
335 |
CATConnectData* iConnectData;
|
|
336 |
CATHangUpData* iHangUpData;
|
|
337 |
CATSetToOnlineDataMode* iATSetToOnlineDataMode;
|
|
338 |
};
|
|
339 |
|
|
340 |
#endif
|