24
|
1 |
// Copyright (c) 2003-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 |
// This file contains the class definitions for the Simulator Voice Call classes.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalAll
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef __CSIMVOICECALL_H__
|
|
24 |
#define __CSIMVOICECALL_H__
|
|
25 |
|
|
26 |
#include "CSimCall.h"
|
|
27 |
#include "csimtimer.h"
|
|
28 |
|
|
29 |
|
|
30 |
/**
|
|
31 |
* CSimVoiceCall.h Handles voice specific Call functionality
|
|
32 |
*
|
|
33 |
* Created and owned by the CSimLine class.
|
|
34 |
*/
|
|
35 |
class CSimDtmf;
|
|
36 |
|
|
37 |
class CSimVoiceCall : public CSimCall, MTimerCallBack
|
|
38 |
{
|
|
39 |
public:
|
|
40 |
static CSimVoiceCall* NewL(CSimLine* aLine,const TDesC& aName, CSimPhone* aPhone);
|
|
41 |
CSimVoiceCall(CSimLine* aLine,const TDesC& aName, CSimPhone* aPhone);
|
|
42 |
~CSimVoiceCall();
|
|
43 |
|
|
44 |
// MCallBaseTSY pure virtuals
|
|
45 |
|
|
46 |
virtual TInt Dial(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams,TDesC* aTelNumber);
|
|
47 |
virtual TInt DialCancel(const TTsyReqHandle aTsyReqHandle);
|
|
48 |
|
|
49 |
virtual TInt Connect(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams);
|
|
50 |
virtual TInt ConnectCancel(const TTsyReqHandle aTsyReqHandle);
|
|
51 |
|
|
52 |
virtual TInt AnswerIncomingCall(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams);
|
|
53 |
virtual TInt AnswerIncomingCallCancel(const TTsyReqHandle aTsyReqHandle);
|
|
54 |
|
|
55 |
virtual TInt HangUp(const TTsyReqHandle aTsyReqHandle);
|
|
56 |
virtual TInt HangUpCancel(const TTsyReqHandle aTsyReqHandle);
|
|
57 |
|
|
58 |
virtual TInt RelinquishOwnership();
|
|
59 |
|
|
60 |
virtual TInt GetBearerServiceInfo(const TTsyReqHandle aTsyReqHandle,RCall::TBearerService* aService);
|
|
61 |
virtual TInt GetCallParams(const TTsyReqHandle aTsyReqHandle, TDes8* aParams);
|
|
62 |
|
|
63 |
virtual TInt LoanDataPort(const TTsyReqHandle aTsyReqHandle,RCall::TCommPort* aCommPort);
|
|
64 |
virtual TInt LoanDataPortCancel(const TTsyReqHandle aTsyReqHandle);
|
|
65 |
virtual TInt RecoverDataPort(const TTsyReqHandle aTsyReqHandle);
|
|
66 |
|
|
67 |
virtual void TimerCallBack(TInt aId);
|
|
68 |
virtual TInt ActionEvent(TCallEvent aEvent,TInt aOtherArgument);
|
|
69 |
TInt HandleSwap(TCallEvent aEvent);
|
|
70 |
|
|
71 |
// MSubSessionExtBaseTSY pure virtual
|
|
72 |
virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage);
|
|
73 |
virtual TInt CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle);
|
|
74 |
|
|
75 |
void SetDtmfSession(CSimDtmf* aSimDtmf);
|
|
76 |
CSimDtmf* GetDtmfSession();
|
|
77 |
|
|
78 |
virtual TUint Caps();
|
|
79 |
|
|
80 |
private:
|
|
81 |
void ConstructL();
|
|
82 |
void StartTimer(TInt aDuration);
|
|
83 |
TInt ProcessAnswerIncomingCallL();
|
|
84 |
TInt ProcessRemoteHangupL();
|
|
85 |
TInt DialEmergencyCall(const TTsyReqHandle aTsyReqHandle,TDesC* aTelNumber);
|
|
86 |
TInt DialEmergencyCallCancel(const TTsyReqHandle aTsyReqHandle);
|
|
87 |
TInt Hold(const TTsyReqHandle);
|
|
88 |
TInt HoldCancel(const TTsyReqHandle);
|
|
89 |
TInt Resume(const TTsyReqHandle);
|
|
90 |
TInt ResumeCancel(const TTsyReqHandle);
|
|
91 |
TInt Swap(const TTsyReqHandle);
|
|
92 |
TInt SwapCancel(const TTsyReqHandle);
|
|
93 |
void UpdateRemotePartyInfoDirection(RMobileCall::TMobileCallStatus aPreviousStatus);
|
|
94 |
TInt DialISV(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams,TDesC* aTelNumber);
|
|
95 |
TInt DialISVCancel(const TTsyReqHandle aTsyReqHandle);
|
|
96 |
TInt AnswerIncomingCallISVL(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams);
|
|
97 |
TInt AnswerIncomingCallISVCancel(const TTsyReqHandle aTsyReqHandle);
|
|
98 |
|
|
99 |
|
|
100 |
// CDMA Mode
|
|
101 |
TInt NotifyConnectConfirmationCancel(const TTsyReqHandle aReqHandle);
|
|
102 |
TInt ResumeConnectCancel(const TTsyReqHandle);
|
|
103 |
TInt ResumeConnect(const TTsyReqHandle aReqHandle, const TBool * aConnectContinue );
|
|
104 |
|
|
105 |
private:
|
|
106 |
CSimTimer* iTimer;
|
|
107 |
TInt iDiallingPause; //< duration spent in dialling state, before entering connecting state.
|
|
108 |
TInt iConnectingPause; //< duration spent in connecting state, before entering connected state.
|
|
109 |
TInt iDisconnectingPause; //< duration spent in disconnecting state, before entering disconnected state.
|
|
110 |
TInt iAnswerIncomingPause; //< duration spent in Answering state, before entering connected state.
|
|
111 |
TInt iRemoteHangupPause; //< duration spent in connected state, before entering disconnecting state.
|
|
112 |
CSimDtmf* iSimDtmf; //< DTMF session pointer.
|
|
113 |
|
|
114 |
// CDMA Mode
|
|
115 |
TBool iWaitForConnectConfirm; //< flag to indicate a meta-state between IDLE and DIALING status
|
|
116 |
TTsyReqHandle iNotifyConnectConfirmReqHandle; //< Notify Connect Confirm request handle
|
|
117 |
TTsyReqHandle iHoldResumeRequestHandle; //< The TSY request handle associated with a hold or resume.
|
|
118 |
|
|
119 |
};
|
|
120 |
|
|
121 |
#endif // CSIMVOICECALL_H__
|