telephonyserverplugins/simtsy/inc/CSimDataCall.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2001-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 Data Call class definitions.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalAll
       
    21 */
       
    22 
       
    23 #ifndef __CSIMDATACALL_H__
       
    24 #define __CSIMDATACALL_H__
       
    25 
       
    26 #include "CSimCall.h"
       
    27 #include "csimtimer.h"
       
    28 #include "CSimNtras.h"
       
    29 
       
    30 /**
       
    31 * CSimDataCall.h Handles data specific Call functionality
       
    32 *
       
    33 * Created and owned by the CSimLine class.
       
    34 */
       
    35 class MTimerCallBack;
       
    36 class CSimDataCall : public CSimCall, MTimerCallBack, MNTRasCallBack
       
    37 	{
       
    38 public:
       
    39 	static CSimDataCall* NewL(CSimLine* aLine,const TDesC& aName, CSimPhone* aPhone);
       
    40 	CSimDataCall(CSimLine* aLine,const TName& aName, CSimPhone* aPhone);
       
    41 	~CSimDataCall();
       
    42 
       
    43 // MCallBaseTSY pure virtuals
       
    44 
       
    45 	virtual TInt Dial(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams,TDesC* aTelNumber);
       
    46 	virtual TInt DialCancel(const TTsyReqHandle aTsyReqHandle);
       
    47 
       
    48 	virtual TInt Connect(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams);
       
    49 	virtual TInt ConnectCancel(const TTsyReqHandle aTsyReqHandle);
       
    50 
       
    51 	virtual TInt AnswerIncomingCall(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams);
       
    52 	virtual TInt AnswerIncomingCallCancel(const TTsyReqHandle aTsyReqHandle);
       
    53 
       
    54 	virtual TInt HangUp(const TTsyReqHandle aTsyReqHandle);
       
    55 	virtual TInt HangUpCancel(const TTsyReqHandle aTsyReqHandle);
       
    56 
       
    57 	virtual TInt RelinquishOwnership();
       
    58 
       
    59     virtual TInt GetBearerServiceInfo(const TTsyReqHandle aTsyReqHandle,RCall::TBearerService* aService);
       
    60 	virtual TInt GetCallParams(const TTsyReqHandle aTsyReqHandle, TDes8* aParams);
       
    61 
       
    62 	virtual TInt GetMobileDataCallCaps(const TTsyReqHandle aTsyReqHandle, TDes8* aParams);
       
    63 	virtual TInt GetMobileDataCallCapsCancel(const TTsyReqHandle aTsyReqHandle);
       
    64 
       
    65 	virtual TInt GetMobileDataCallRLPRange(const TTsyReqHandle aTsyReqHandle, TInt* aRLPVersion, TDes8* aRLPRange);
       
    66 	virtual TInt GetMobileDataCallRLPRangeCancel(const TTsyReqHandle aTsyReqHandle);
       
    67 
       
    68 	virtual TInt NotifyMobileDataCapsChange(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps);
       
    69 	virtual TInt NotifyMobileDataCapsChangeCancel(const TTsyReqHandle aTsyReqHandle);
       
    70 
       
    71 	virtual TInt SetDynamicHSCSDParams(const TTsyReqHandle aTsyReqHandle, RMobileCall::TMobileCallAiur* aAiur, TInt* aRxTimeslots);
       
    72 	virtual TInt SetDynamicHSCSDParamsCancel(const TTsyReqHandle aTsyReqHandle);
       
    73 	virtual TInt GetCurrentHSCSDInfo(const TTsyReqHandle aTsyReqHandle, TDes8* aHSCSDInfo);
       
    74 	virtual TInt NotifyHSCSDInfoChange(const TTsyReqHandle aTsyReqHandle, TDes8* aHSCSDInfo);
       
    75 	virtual TInt NotifyHSCSDInfoChangeCancel(const TTsyReqHandle aTsyReqHandle);
       
    76 
       
    77 	virtual TInt LoanDataPort(const TTsyReqHandle aTsyReqHandle,RCall::TCommPort* aCommPort);
       
    78 	virtual TInt LoanDataPortCancel(const TTsyReqHandle aTsyReqHandle);
       
    79 	virtual TInt RecoverDataPort(const TTsyReqHandle aTsyReqHandle);
       
    80 
       
    81 	virtual void TimerCallBack(TInt aId);
       
    82 	virtual void NTRasCallBack(TInt aStatus);
       
    83 	virtual TInt ActionEvent(TCallEvent aEvent,TInt aStatus);
       
    84 
       
    85 // MSubSessionExtBaseTSY pure virtual
       
    86 	virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage);
       
    87 	virtual TInt CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle);
       
    88 
       
    89 	virtual TUint Caps();
       
    90 
       
    91 private:
       
    92 	void ConstructL();
       
    93 	void StartTimer(TInt aDuration);
       
    94 	TInt ProcessAnswerIncomingCallL();
       
    95 	TInt ProcessRemoteHangupL();
       
    96 	void PopulateCallParams(const TDesC8* aCallParams);
       
    97 	void ChangeDynamicInfo();
       
    98 	TInt SearchRetrieveRlp(TInt* aRLPVersion, TDes8* aRLPRange);
       
    99 
       
   100 private:
       
   101 	class TMobileCallRLPItem
       
   102 	{
       
   103 	public:
       
   104 		TInt iRlpVersion;
       
   105 		RMobileCall::TMobileDataRLPRangesV1 iMobileCallRLP;
       
   106 	};
       
   107 
       
   108 private:
       
   109 	CSimTimer* iTimer;
       
   110 	CSimNtRas* iNtRas;
       
   111 	TInt iDiallingPause;		//< duration spent in dialling state, before entering connecting state.
       
   112 	TInt iConnectingPause;		//< duration spent in connecting state, before entering connected state.
       
   113 	TInt iDisconnectingPause;   //< duration spent in disconnecting state, before entering disconnected state.
       
   114 	TInt iAnswerIncomingPause;  //< duration spent in Answering state, before entering connected state.
       
   115 	TInt iRemoteHangupPause;  	//< duration spent in connected state, before entering disconnecting state.
       
   116 
       
   117 	TName iCsyName;				//< The CSY Name associated with the NTRas port.
       
   118 	TName iPortName;			//< The Port Name associated with the NTRas port.
       
   119 	TCommConfigV01 iConfig;		//< The configuration to be used with the NTRas port.
       
   120 	TBool iCommPortLoaned;		//< A flag indicating whether the CommPort is loaned.
       
   121 	TBool iHscsdCall;			//< Is this a Hscsd call?
       
   122 	
       
   123 	RCall::TBearerService iBearerService;	//< The bearer information associated with a data call.
       
   124 	RMobileCall::TMobileDataCallParamsV1 iMobileCallParams; //< The current datacall params
       
   125 	RMobileCall::TMobileCallDataCapsV1 iMobileCallCaps;		//< The current hscsd params
       
   126 	RMobileCall::TMobileHscsdCallParamsV1 iHscsdSettings;	//< The current hscsd dynamic params
       
   127 	RMobileCall::TMobileCallHscsdInfoV1  iHscsdInfo;		//< The current hscsd dynamic info
       
   128 
       
   129 	CArrayFixFlat<TMobileCallRLPItem>* iMobileCallRLPList;  //< A list of all RLP versions supported and ranges 
       
   130 	TNotifyData	iNotifyInfo;	//< Holds the notification data when Hscsd info changes	
       
   131 	};
       
   132 
       
   133 #endif // CSimDataCall_H__