adaptationlayer/tsy/nokiatsy_dll/inc/cmmcallmesshandler.h
changeset 0 63b37f68c1ce
child 5 8ccc39f9d787
equal deleted inserted replaced
-1:000000000000 0:63b37f68c1ce
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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 the License "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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMMCALLMESSAGEHANDLER_H
       
    22 #define CMMCALLMESSAGEHANDLER_H
       
    23 
       
    24 // INCLUDES
       
    25 #include "mmmmesshandlerbase.h"
       
    26 #include "cmmphonetreceiver.h"
       
    27 #include "nokiatsy_internal_variation.h"
       
    28 #include <e32base.h>
       
    29 #include <etelmm.h>
       
    30 #include <tisi.h>
       
    31 #include <ctsy/rmmcustomapi.h>
       
    32 #include <ctsy/pluginapi/cmmdatapackage.h>
       
    33 
       
    34 // CONSTANTS
       
    35 // Maximum length of UUS sub block
       
    36 // (defined in call server specification)
       
    37 const TInt KUserToUserSbMaxLength = 248;
       
    38 
       
    39 // Maximum length of telephony number
       
    40 // (defined in call server specification)
       
    41 const TInt KTelephonyNumberMaxLength = 123;
       
    42 
       
    43 // Maximum length of ISA address sub block
       
    44 // (defined in call server specification)
       
    45 const TInt KAddressSubBlockMaxLength = 252;
       
    46 
       
    47 // Hard-coded transaction id for ISI messages
       
    48 const TUint8 KCallTransId = 1;
       
    49 
       
    50 // Constant for not allocated Symbian call ID
       
    51 const TInt KSymbianCallIdNone = -1;
       
    52 
       
    53 // Maximum length of destination post address
       
    54 const TInt KDestPostAddressMaxLength = 15;
       
    55 
       
    56 // Bit mask costants
       
    57 const TUint8 KMaskBits1to3 = 0x07;
       
    58 const TUint8 KMaskBits1to4 = 0x0F;
       
    59 const TUint8 KMaskBits5to7 = 0x70;
       
    60 const TUint8 KMaskBits6to7 = 0x60;
       
    61 const TUint8 KMaskBits1to7 = 0x7F;
       
    62 const TUint8 KMaskBit8 = 0x80;
       
    63 
       
    64 // MACROS
       
    65 //  None
       
    66 
       
    67 // DATA TYPES
       
    68 //  None
       
    69 
       
    70 // FUNCTION PROTOTYPES
       
    71 //  None
       
    72 
       
    73 // FORWARD DECLARATIONS
       
    74 class CMmPhoneTsy;
       
    75 class CMmPhoNetSender;
       
    76 class CMmDataPortHandler;
       
    77 class CMmDtmfMessHandler;
       
    78 class CMmMessageRouter;
       
    79 
       
    80 // CLASS DECLARATION
       
    81 
       
    82 /**
       
    83 * CEmergencyTimer: Used for delaying emergency call when PDP context deactivate
       
    84 * is ongoing
       
    85 */
       
    86 class CEmergencyTimer : public CTimer
       
    87 {
       
    88     class CMmCallMessHandler& iCallMsgHandler;
       
    89 
       
    90 public:
       
    91 
       
    92     /**
       
    93     * Constructor
       
    94     */
       
    95     CEmergencyTimer( CMmCallMessHandler& aCallMsgHandler );
       
    96 
       
    97     /**
       
    98     * Destructor.
       
    99     */
       
   100     ~CEmergencyTimer();
       
   101 
       
   102     /**
       
   103     * 2nd phase constructor.
       
   104     */
       
   105     void ConstructL();
       
   106 
       
   107     /**
       
   108     * From CActive.
       
   109     * Called when timer elapses.
       
   110     */
       
   111     void RunL();
       
   112 
       
   113     /**
       
   114     * Start emergency delay timer
       
   115     */
       
   116     void StartEmergencyTimer();
       
   117 
       
   118     /**
       
   119     * Stop emergency delay timer
       
   120     */
       
   121     void StopEmergencyTimer();
       
   122 };
       
   123 
       
   124 // CLASS DECLARATION
       
   125 
       
   126 /**
       
   127 *  Call related ISI message handler
       
   128 *  Used for creating and sending call ISI messages to
       
   129 *  PhoNet via PhoNetSender. It also receives call
       
   130 *  ISI messages from PhoNetReceiver.
       
   131 *  @lib (unknown)
       
   132 *  @since Series S60 2.6
       
   133 */
       
   134 class CMmCallMessHandler : public CBase,
       
   135     public MMmMessHandlerBase, public MMmMessageReceiver
       
   136     {
       
   137     public:  // Constructors and destructor
       
   138 
       
   139         /**
       
   140         * Two-phased constructor.
       
   141         * @param aPhoNetSender Pointer to the phonet sender
       
   142         * @param aPhoNetReceiver Pointer to the phonet receiver
       
   143         * @param aDtmfMessHandler Pointer to the DTMF message handler
       
   144         * @param aMessageRouter Pointer to the message router
       
   145         * @return Pointer to the call message handler
       
   146         */
       
   147         static CMmCallMessHandler* NewL(
       
   148             CMmPhoNetSender* aPhoNetSender,
       
   149             CMmPhoNetReceiver* aPhoNetReceiver,
       
   150             CMmDtmfMessHandler* aDtmfMessHandler,
       
   151             CMmMessageRouter* aMessageRouter );
       
   152 
       
   153         /**
       
   154         * Destructor.
       
   155         */
       
   156         ~CMmCallMessHandler();
       
   157 
       
   158     public: // New functions
       
   159 
       
   160         /**
       
   161         * Checks if the received message should be handled by the
       
   162         * call message handler
       
   163         * @param aIsiMessage Reference to the received ISI message.
       
   164         * @return void
       
   165         */
       
   166         void ReceiveMessageL( const TIsiReceiveC &aIsiMessage );
       
   167 
       
   168         /**
       
   169         * Handles errors comes from PhoNetReceiver RunError
       
   170         * @param TIsiReceiveC& The received ISI message
       
   171         * @param aError Error code
       
   172         * @return void
       
   173         */
       
   174         void HandleError( const TIsiReceiveC&, TInt aError );
       
   175 
       
   176         /**
       
   177         * Initialize Dataport
       
   178         * @return void
       
   179         */
       
   180         void InitializeDataportL();
       
   181 
       
   182     public: // Functions from base classes
       
   183 
       
   184         /**
       
   185         * From MMmMessHandlerBase. This method is the single entry point for
       
   186         * requests coming from the Symbian OS layer to this message handler
       
   187         * @param aIpc IPC number of the request
       
   188         * @param aDataPackage datapackage from CommonTSY
       
   189         * @return KErrNone or error code
       
   190         */
       
   191         TInt ExtFuncL( TInt aIpc, const CMmDataPackage* aDataPackage );
       
   192 
       
   193 
       
   194     protected:  // New functions
       
   195         // None
       
   196 
       
   197     protected:  // Functions from base classes
       
   198         // None
       
   199 
       
   200     private:
       
   201 
       
   202         /**
       
   203         * C++ default constructor.
       
   204         */
       
   205         CMmCallMessHandler();
       
   206 
       
   207         /**
       
   208         * By default Symbian 2nd phase constructor is private.
       
   209         */
       
   210         void ConstructL();
       
   211 
       
   212         /**
       
   213         * Creates CALL_CREATE_REQ ISI message and sends it to Phonet.
       
   214         * @return KErrNone or error code
       
   215         */
       
   216         TInt CallCreateReq();
       
   217 
       
   218         /**
       
   219         * Breaks received CALL_CREATE_RESP ISI message.
       
   220         * @param aIsiMessage Reference to the received message.
       
   221         * @return void
       
   222         */
       
   223         void CallCreateResp( const TIsiReceiveC &aIsiMessage );
       
   224 
       
   225         /**
       
   226         * Creates CALL_CREATE_REQ ISI message for emergency calls.
       
   227         * @param aCallReq Reference to the message to be sent.
       
   228         * @return void
       
   229         */
       
   230         void EmergencyCallCreateReq( TIsiSend* aCallReq );
       
   231 
       
   232         /**
       
   233         * Breaks received CALL_ANSWER_RESP ISI message.
       
   234         * @param aIsiMessage Reference to the received message.
       
   235         * @return void
       
   236         */
       
   237         void CallAnswerResp( const TIsiReceiveC &aIsiMessage );
       
   238 
       
   239         /**
       
   240         * Creates CALL_RELEASE_REQ ISI message and sends it to PhonetSender.
       
   241         * @param aCallReq Reference to the message to be sent
       
   242         * @param aDataPackage Input data from the Symbian OS layer
       
   243         * @return void
       
   244         */
       
   245         void CallReleaseReq(
       
   246             TIsiSend* aCallReq,
       
   247             const CCallDataPackage* aDataPackage );
       
   248 
       
   249         /**
       
   250         * Breaks received CALL_RELEASE_RESP ISI message.
       
   251         * @param aIsiMessage Reference to the received message.
       
   252         * @return void
       
   253         */
       
   254         void CallReleaseResp( const TIsiReceiveC &aIsiMessage );
       
   255 
       
   256         /**
       
   257         * Breaks received CALL_RELEASE_IND ISI message.
       
   258         * @param aIsiMessage Reference to the received message.
       
   259         * @return void
       
   260         */
       
   261         void CallReleaseInd( const TIsiReceiveC &aIsiMessage );
       
   262 
       
   263         /**
       
   264         * Breaks CALL_TERMINATED_IND ISI message.
       
   265         * @param aIsiMessage Reference to the received message.
       
   266         * @return void
       
   267         */
       
   268         void CallTerminatedInd( const TIsiReceiveC &aIsiMessage );
       
   269 
       
   270         /**
       
   271         * Breaks received CALL_COMING_IND ISI message.
       
   272         * @param aIsiMessage Reference to the received message.
       
   273         * @return void
       
   274         */
       
   275         void CallComingInd( const TIsiReceiveC &aIsiMessage );
       
   276 
       
   277         /**
       
   278         * Creates call control request (holding a call etc.) ISI
       
   279         * message and sends it to PhonetSender.
       
   280         * @param aCallReq Reference to the message to be sent
       
   281         * @param aIpc IPC number of the request
       
   282         * @return void
       
   283         */
       
   284         void CallControlReq( TIsiSend* aCallReq, TInt aIpc ) const;
       
   285 
       
   286         /**
       
   287         * Breaks received CALL_CONTROL_RESP ISI message.
       
   288         * @param aIsiMessage Reference to the received message.
       
   289         * @return void
       
   290         */
       
   291         void CallControlResp( const TIsiReceiveC &aIsiMessage ) const;
       
   292 
       
   293         /**
       
   294         * Breaks received CALL_CONTROL_IND ISI message.
       
   295         * @param aIsiMessage Reference to the received message.
       
   296         * @return void
       
   297         */
       
   298         void CallControlInd( const TIsiReceiveC &aIsiMessage ) const;
       
   299 
       
   300         /**
       
   301         * Creates and sends call property set request to PhonetSender
       
   302         * @param aCallReq Reference to the message to be sent
       
   303         * @param aDataPackage Input data from the Symbian OS layer
       
   304         * @return void
       
   305         */
       
   306         void CallPropertySetReq(
       
   307             TIsiSend* aCallReq,
       
   308             const CCallDataPackage* aDataPackage );
       
   309 
       
   310         /**
       
   311         * Breaks received CALL_PROPERTY_SET_RESP ISI message.
       
   312         * @param aIsiMessage Reference to the received message.
       
   313         * @return void
       
   314         */
       
   315         void CallPropertySetResp( const TIsiReceiveC &aIsiMessage );
       
   316 
       
   317         /**
       
   318         * Breaks received call status indication ISI message.
       
   319         * @param aIsiMessage Reference to the received message.
       
   320         * @return void
       
   321         */
       
   322         void CallStatusIndL( const TIsiReceiveC &aIsiMessage );
       
   323 
       
   324         /**
       
   325         * Breaks received call GSM notification indication
       
   326         * @param aIsiMessage Reference to the received message.
       
   327         * @return void
       
   328         */
       
   329         void CallGsmNotificationInd( const TIsiReceiveC &aIsiMessage );
       
   330 
       
   331         /**
       
   332         * Resets all fields of incoming mobile call info.
       
   333         * @param aIncomingCallInfo Reference to the mobile call info info
       
   334         */
       
   335         void ResetIncomingCallInfo(
       
   336             RMobileCall::TMobileCallInfoV1& aIncomingCallInfo ) const;
       
   337 
       
   338 
       
   339         /**
       
   340         * Creates sub block for CALL_CREATE_REQ
       
   341         * @param aMode Mode of the call to be dialed (voice, csd, etc.)
       
   342         * @param aTelNumber Phone number to be called
       
   343         * @param aIdRestrict Caller id restriction
       
   344         * @param aCallIsiMsg Call IsiMsg
       
   345         * @param numOfSbInMsg Number of subblocks
       
   346         * @param aCurrentMsgOffset Current msg offset
       
   347         * @return void
       
   348         */
       
   349         void GetCallCreateReqSubBlock(
       
   350             TUint8 aMode,
       
   351             const TDesC16& aTelNumber,
       
   352             RMobileCall::TMobileCallIdRestriction aIdRestrict,
       
   353             TIsiSend& aCallIsiMsg,
       
   354             TUint8& numOfSbInMsg,
       
   355             TInt &aCurrentMsgOffset );
       
   356 
       
   357         /**
       
   358         * Constructs SAT sub blocks for CALL_CREATE_REQ ISI message.
       
   359         * @param aSubAddress Called party sub address
       
   360         * @param aBearer Bearer capability sub address
       
   361         * @param aCallIsiMsg Call IsiMsg
       
   362         * @param aNumOfSbInMsg Number of subblocks
       
   363         * @param aCurrentMsgOffset Current msg offset
       
   364         * @return void
       
   365         */
       
   366 #if ( NCP_COMMON_S60_VERSION_SUPPORT >= S60_VERSION_50 )
       
   367         void GetSatOriginatedSubBlocks(
       
   368             TIsiSend& aCallIsiMsg,
       
   369             TUint8& aNumOfSbInMsg,
       
   370             TInt& aCurrentMsgOffset ) const;
       
   371 #else
       
   372         void GetSatOriginatedSubBlocks(
       
   373             const TBuf<KSubAddressSize>& aSubAddress,
       
   374             TBuf8<KBearerCapabilitySize>& aBearer,
       
   375             TIsiSend& aCallIsiMsg,
       
   376             TUint8& aNumOfSbInMsg,
       
   377             TInt& aCurrentMsgOffset ) const;
       
   378 #endif
       
   379 
       
   380         /**
       
   381         * Maps ISI call status to Symbian OS call status
       
   382         * @param aCallStatus ISI call status
       
   383         * @return Symbian OS call status
       
   384         */
       
   385         RMobileCall::TMobileCallStatus MapCallStatus( TUint8 aCallStatus );
       
   386 
       
   387         /**
       
   388         * Maps ISI call mode to Symbian OS call mode
       
   389         * @param aMobileCallInfo Call info
       
   390         * @param aIsiCallMode ISI call mode
       
   391         * @return void
       
   392         */
       
   393         void FillModeData(
       
   394             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   395             TUint8 aIsiCallMode ) const;
       
   396 
       
   397         /**
       
   398         * Maps ISI values to Symbian OS numbering plan and number type
       
   399         * @param aMobileCallInfo Call info
       
   400         * @param aOrigAddressType ISI originated address type value
       
   401         * @return void
       
   402         */
       
   403         void FillNumberPlanAndType(
       
   404             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   405             TUint aOrigAddressType ) const;
       
   406 
       
   407         /**
       
   408         * Maps ISI values to Symbian OS remote party status and number
       
   409         * @param aMobileCallInfo Call info
       
   410         * @param aOrigPresentInd ISI presentation information value
       
   411         * @param aOrigAddress ISI call origination address
       
   412         * @param aMobileCallDirection ISI call direction value
       
   413         * @return void
       
   414         */
       
   415         void FillRemoteStatusAndNumber(
       
   416             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   417             TUint8 aOrigPresentInd,
       
   418             const TDes16& aOrigAddress,
       
   419             RMobileCall::TMobileCallDirection aMobileCallDirection) const;
       
   420 
       
   421         /**
       
   422         * Maps ISI values to calling name
       
   423         * @param aMobileCallInfo Call info
       
   424         * @param aOrigInfoPresentInd ISI presentation information value
       
   425         * @param aOrigInfoName ISI call origination name
       
   426         * @param aOrigInfoNumberSource ISI call origination information source
       
   427         * @return void
       
   428         */
       
   429         void FillCallingName(
       
   430             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   431             TUint8 aOrigInfoPresentInd,
       
   432             const TDes16& aOrigInfoName ) const;
       
   433 
       
   434         /**
       
   435         * Breaks received CallServiceDeniedInd ISI message.
       
   436         * @param aIsiMessage Reference to the received message.
       
   437         * @return void
       
   438         */
       
   439         void CallServiceDeniedInd( const TIsiReceiveC &aIsiMessage );
       
   440 
       
   441 
       
   442         /**
       
   443         * Checks call ISA status
       
   444         * @param aMobileCallInfo.
       
   445         * @param aCallStatusISA
       
   446         * @return void
       
   447         */
       
   448         void CheckCallIsaStatus(
       
   449             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   450             TUint8 aCallStatusISA );
       
   451 
       
   452         /**
       
   453         * Read all address destination
       
   454         * @param aMobileCallInfo Call info
       
   455         * @param aTargetOrig Target origin
       
   456         * @param aIsiMessage Received ISI message
       
   457         * @param aSbStartOffSet Subblock start offset
       
   458         * @return void
       
   459         */
       
   460         void ReadAllAddressDestination(
       
   461             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   462             TBuf16<RMobilePhone::KMaxMobileTelNumberSize>& aTargetOrig,
       
   463             const TIsiReceiveC &aIsiMessage,
       
   464             TUint& aSbStartOffSet,
       
   465             TUint8 origPresentInd);
       
   466 
       
   467         /**
       
   468         * Read origin call info
       
   469         * @param aMobileCallInfo Call info
       
   470         * @param aTargetOrigName Target origin name
       
   471         * @param aIsiMessage Received ISI message
       
   472         * @param aSbStartOffSet Subblock start offset
       
   473         * @return void
       
   474         */
       
   475         void ReadCallInfo(
       
   476             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   477             TBuf16<RMobileCall::KCallingNameSize>& aTargetOrigName,
       
   478             const TIsiReceiveC &aIsiMessage,
       
   479             TUint& aSbStartOffSet );
       
   480 
       
   481         /**
       
   482         * Complete incoming call notification
       
   483         * @param aMobileCallInfo Call info
       
   484         * @param aStatusETel ETel status
       
   485         * @return void
       
   486         */
       
   487         void CompleteIncomingCallNotif(
       
   488             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   489             RMobileCall::TMobileCallStatus& aStatusETel );
       
   490 
       
   491         /**
       
   492         * Complete Mobile Call and Info Change
       
   493         * @param aMobileCallInfo Call info
       
   494         * @param aStatusETel ETel status
       
   495         * @param aResultEtel ETel result
       
   496         * @return void
       
   497         */
       
   498         void CompleteMobileCallInfoAndStatusChange(
       
   499             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   500             RMobileCall::TMobileCallStatus& aStatusETel,
       
   501             TInt aResultETel );
       
   502 
       
   503         /**
       
   504         * Maps ISI values to Symbian OS cause of no cli
       
   505         * @param aMobileCallInfo Call info
       
   506         * @param aCauseOfNoCli Cause of no cli
       
   507         * @return void
       
   508         */
       
   509         void FillCauseOfNoCli(
       
   510             RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   511             TUint8 aCauseOfNoCli );
       
   512 
       
   513         /**
       
   514         * Activates user to user signaling service.
       
   515         * @param aDataPackage Packed UUS data
       
   516         * @return KErrNone or error value.
       
   517         */
       
   518         TInt ActivateUUS(
       
   519             const CMmDataPackage* aDataPackage );
       
   520 
       
   521         /**
       
   522         * Creates product profile request, in order to read
       
   523         * if HSDPA is disabled in PP.
       
   524         * @return void
       
   525         */
       
   526         void InfoPpDataReadReq();
       
   527 
       
   528         /**
       
   529         * Breaks received INFO_PP_DATA_READ_RESP ISI message.
       
   530         * @param aIsiMessage Reference to the received message.
       
   531         * @return void None
       
   532         */
       
   533         void InfoPpDataReadResp( const TIsiReceiveC &aIsiMessage );
       
   534 
       
   535         /**
       
   536         * Creates GPDS_CONTEXTS_CLEAR request, in order to end
       
   537         * all data connections.
       
   538         * @return void
       
   539         */
       
   540         void GpdsContextsClearReq();
       
   541 
       
   542         /**
       
   543         * Breaks received GPDS_CONTEXTS_CLEAR_RESP ISI message,
       
   544         * and proceeds with emergency call dialling.
       
   545         * @return void None
       
   546         */
       
   547         void GpdsContextsClearResp();
       
   548 
       
   549         /**
       
   550         * Breaks received CSD_VIDEO_CALL_STATUS_IND  ISI message.
       
   551         * @param aIsiMessage Reference to the received message.
       
   552         * @return void
       
   553         */
       
   554         void CsdVideoCallStatusInd( const TIsiReceiveC &aIsiMessage );
       
   555 
       
   556         /**
       
   557         * Breaks received CSD_MULTIMEDIA_DATA_RATE_IND ISI message.
       
   558         * @param aIsiMessage Reference to the received message.
       
   559         * @return void
       
   560         */
       
   561         void CsdMultimediaDataRateInd( const TIsiReceiveC &aIsiMessage );
       
   562 
       
   563         /**
       
   564         * Creates subblocks for CSD_CALL_CONTROL_REQ 
       
   565         * @param aTelNumber Phone number to be called
       
   566         * @param aIdRestrict Caller id restriction
       
   567         * @param aCsdIsiMsg CSD IsiMsg
       
   568         * @param numOfSbInMsg Number of subblocks
       
   569         * @param aCurrentMsgOffset Current msg offset
       
   570         * @return void
       
   571         */
       
   572         void GetCSDCallControlReqSubBlock(
       
   573             const TDesC16& aTelNumber,
       
   574             RMobileCall::TMobileCallIdRestriction aIdRestrict,
       
   575             TIsiSend& aCsdIsiMsg,
       
   576             TUint8& aNumOfSbInMsg,
       
   577             TInt& aCurrentMsgOffset );
       
   578 
       
   579         /**
       
   580         * Creates CSD_CALL_CONTROL_REQ ISI message and sends it to PhonetSender.
       
   581         * @param aCallOperId Call Operation ID
       
   582         * @return TInt : KErrNone or error code
       
   583         */
       
   584         TInt CsdCallControlReq( TUint8 aCallOperId );
       
   585 
       
   586         /**
       
   587         * Breaks received CSD_CALL_CONTROL_RESP ISI message.
       
   588         * @param aIsiMessage Reference to the received message.
       
   589         * @return void
       
   590         */
       
   591         void CsdCallControlResp( const TIsiReceiveC &aIsiMessage );
       
   592 
       
   593         /**
       
   594         * Dial data call.
       
   595         * @param CDataDataPackage* aCallDataPackage: call data package
       
   596         * @param TInt aIPC: EEtelCallDial or EMobileCallDialNoFdnCheck
       
   597         * @return TInt : KErrNone or error code
       
   598         */
       
   599         TInt DialDataCall( const CCallDataPackage* aCallDataPackage );
       
   600 
       
   601         /**
       
   602         * Answer incoming data call.
       
   603         * @param CDataDataPackage* aCallDataPackage: call data package
       
   604         * @return TInt KErrNone or error code
       
   605         */
       
   606         TInt AnswerIncomingDataCall( const CCallDataPackage* aCallDataPackage );
       
   607 
       
   608         /**
       
   609         * Hangs up the call
       
   610         * @param TInt aCallId: call id
       
   611         * @return TInt KErrNone or error code
       
   612         */
       
   613         TInt HangUp( const TInt aCallId );
       
   614 
       
   615         /**
       
   616         * Updates DialDataCall mobile call info.
       
   617         * @param TMobileCallInfoV1& aMobileCallInfo: Mobile call info
       
   618         * @param TBool aIsMultimedia: Is call mutimedia/video
       
   619         */
       
   620 
       
   621         void SetMobileCallInfo(
       
   622             const RMobileCall::TMobileCallInfoV1& aMobileCallInfo,
       
   623             const TBool aIsMultimedia = EFalse,
       
   624             const TBool aIsWaitingCall = EFalse );
       
   625 
       
   626         /**
       
   627         * Creates PnsPipeCreateReq ISI message and sends it to Phonet.
       
   628         * @param aPipeStateAfter: pipe state
       
   629 		* @return error value: Symbian error code
       
   630         */
       
   631         TInt PnsPipeCreateReq( const TUint8 aPipeStateAfter ) const;
       
   632 
       
   633         /**
       
   634         * Creates PnsPipeEnableReq ISI message and sends it to Phonet.
       
   635 		* @return error value: Symbian error code
       
   636         */
       
   637         TInt PnsPipeEnableReq() const;
       
   638 
       
   639         /**
       
   640         * Creates PnsPipeResetReq ISI message and sends it to Phonet.
       
   641         * @param aStateAfterReset: pipe state after reset
       
   642 		* @return error value: Symbian error code
       
   643         */
       
   644         TInt PnsPipeResetReq( const TUint8 aStateAfterReset );
       
   645 
       
   646         /**
       
   647         * Creates PnsPipeRemoveReq ISI message and sends it to Phonet.
       
   648 		* @return error value: Symbian error code
       
   649         */
       
   650         TInt PnsPipeRemoveReq();
       
   651 
       
   652         /**
       
   653         * Creates PnsPipeRedirectReq ISI message and sends it to Phonet.
       
   654 		* @return error value: Symbian error code
       
   655         */
       
   656         TInt PnsPipeRedirectReq();
       
   657 
       
   658         /**
       
   659         * PnsPipeCreate response. 
       
   660         * @param aIsiMessage, reference to the received message.
       
   661         * @return void
       
   662         */
       
   663         void PnsPipeCreateResp( const TIsiReceiveC &aIsiMessage );
       
   664 
       
   665         /**
       
   666         * PnsPipeEnable response.
       
   667         * @param aIsiMessage, reference to the received message.
       
   668         * @return void
       
   669         */
       
   670         void PnsPipeEnableResp( const TIsiReceiveC& aIsiMessage );
       
   671 
       
   672         /**
       
   673         * PnsPipeReset response. 
       
   674         * @param aIsiMessage, reference to the received message.
       
   675         * @return void
       
   676         */
       
   677         void PnsPipeResetResp( const TIsiReceiveC& aIsiMessage );
       
   678 
       
   679         /**
       
   680         * PnsPipeRemove response. 
       
   681         * @param aIsiMessage, reference to the received message.
       
   682         * @return void
       
   683         */
       
   684         void PnsPipeRemoveResp( const TIsiReceiveC& aIsiMessage );
       
   685 
       
   686         /**
       
   687         * PnsPipeRedirect response. 
       
   688         * @param aIsiMessage, reference to the received message.
       
   689         * @return void
       
   690         */
       
   691         void PnsPipeRedirectResp( const TIsiReceiveC& aIsiMessage );
       
   692 
       
   693     public:     // Data
       
   694         // None
       
   695 
       
   696     protected:  // Data
       
   697         // None
       
   698 
       
   699     private:    // Data
       
   700 
       
   701         // Pointer to the phonet sender
       
   702         CMmPhoNetSender* iPhoNetSender;
       
   703 
       
   704         // Pointer to the message router
       
   705         CMmMessageRouter* iMessageRouter;
       
   706 
       
   707         // Pointer to the DTMF message handler
       
   708         CMmDtmfMessHandler* iDtmfMessHandler;
       
   709 
       
   710         // Call releasing value, which is sent in call release request
       
   711         TUint8 iReleaseCauseValueSent;
       
   712 
       
   713         // Call mode of the latest requested call
       
   714         TUint8 iCallMode;
       
   715 
       
   716         // Call diagnostic resolution value between CALL_RELEASE_IND and
       
   717         // CALL_STATUS_IND handling
       
   718         TUint8 iDiagnosticOctet;
       
   719 
       
   720         // Call release cause value from CALL_TERMINATED_IND / KCallGsmMmCause
       
   721         TInt iGsmMmCauseError;
       
   722 
       
   723         // Flag for inband information
       
   724         TBool iDisconnectingWithInband;
       
   725 
       
   726         // Temporary call info required for incoming calls. The life cycle is
       
   727         // - In CALL_COMING_IND, call id and remote address are saved
       
   728         // - In CALL_GSM_NOTIFICATION_IND, iForwarded is saved (if applicable)
       
   729         // - In CALL_STATUS_IND, the saved information is read
       
   730         // - Reset in CALL_STATUS_IND (either if call is ringing, ISA status
       
   731         //   MtAlerting, or released by remote party before answering, ISA
       
   732         //   status MtRelease) or in CALL_RELEASE_REQ (MO release).
       
   733         RMobileCall::TMobileCallInfoV1 iIncomingCallInfo;
       
   734 
       
   735         // User to user data
       
   736         RMobileCall::TMobileCallUUSRequestV1 iUusData;
       
   737 
       
   738         // Buffer for received UUS data
       
   739         RMobileCall::TMobileCallUUI iReceivedUusData;
       
   740 
       
   741         // Variable to store call ID of waiting call for checking that
       
   742         // it is not notified again when it gets ringing.
       
   743         TInt iWaitingCall;
       
   744 
       
   745         // Subaddress required by dial phase 2
       
   746         TBuf<KSubAddressSize> iSubAddress;
       
   747 
       
   748         // Bearer required by dial phase 2
       
   749         TBuf8<KBearerCapabilitySize> iBearer;
       
   750 
       
   751         // Telephone number required by dial phase 2
       
   752         TBuf<RMobilePhone::KMaxMobileTelNumberSize> iTelNumber;
       
   753 
       
   754         // Emergency number
       
   755         TBuf<RMobilePhone::KMaxMobileTelNumberSize> iTelEmergNumber;
       
   756 
       
   757         // Call restriction info required by dial phase 2
       
   758         RMobileCall::TMobileCallIdRestriction iIdRestrict;
       
   759 
       
   760         // Flag for FDN error handling
       
   761         TBool iFDNErrorAlredyNotified;
       
   762 
       
   763         // Pointer to the dataport handler
       
   764         CMmDataPortHandler* iDataPortHandler;
       
   765 
       
   766         // Flag which notifies if it is a 3rd party client
       
   767         // (ETrue) or not (EFalse)
       
   768         TBool iIs3rdPartyDial;
       
   769 
       
   770         // Flag which notifies if it is a 3rd party client
       
   771         // (ETrue) or not (EFalse)
       
   772         TBool iIs3rdPartyAnswerIncomingCall;
       
   773 
       
   774         // Destination post address, max lenght is 123
       
   775         TBuf16<123> iDestPostAddress;
       
   776 
       
   777         // Variable to store and identify call ID for DTMF post address sending
       
   778         TUint8 iDtmfPostAddressCallId;
       
   779 
       
   780         // True if CALL_CREATE_REQ includes CALL_DESTINATION_POST_ADDRESS
       
   781         // subblock
       
   782         TBool iDestPostAddressIncluded;
       
   783 
       
   784         // ETrue when NoFdnCall request is active
       
   785         TBool iNoFdnDial;
       
   786 
       
   787         // To block FDN check in SIM originated calls. Doesn't block call
       
   788         // control procedure
       
   789         TBool iNoFdnCheck;
       
   790 
       
   791         // ETrue if HSPDA is forced off in product profile.
       
   792         // Modified in startup only.
       
   793         TBool iHSDPADisabledInPp;
       
   794 
       
   795         // ETrue while an emergency call setup is delayed,
       
   796         // i.e. while GPDS contexts are being closed.
       
   797         TBool iEmergCallDelayed;
       
   798 
       
   799 		// Video call connected or disconnected
       
   800         TUint8 iVideoCallStatus;
       
   801         
       
   802 		// bearer rate for multimedia call
       
   803         TUint8 iDataRateCode;
       
   804         
       
   805         // Call direction
       
   806         RMobileCall:: TMobileCallDirection iCallDirection;
       
   807 
       
   808         // Mobile call info
       
   809         RMobileCall::TMobileCallInfoV1 iMobileCallInfo;
       
   810         
       
   811         // Is call multimedia/video call
       
   812         TBool iIsMultimedia;
       
   813 
       
   814         // Is current call a waiting call
       
   815         TBool iIsWaitingCall;
       
   816 
       
   817         // Pipe handle for video/multimediacall
       
   818         TUint8 iPipeHandle;
       
   819 
       
   820         TUint8 iSecondPepDeviceId; 
       
   821         TUint8 iSecondPepObjectId;
       
   822         
       
   823         // Call Operation ID
       
   824         TUint8 iCallOperationID;
       
   825 
       
   826         // Video call mt released
       
   827         TBool iVideoCallMtReleased;
       
   828 
       
   829     public:     // Friend classes
       
   830         // None
       
   831     protected:  // Friend classes
       
   832         // Nnone
       
   833     private:    // Friend classes
       
   834 
       
   835         // Emergency call delay timer
       
   836         friend class CEmergencyTimer;
       
   837         CEmergencyTimer iEmergencyTimer;
       
   838 
       
   839     };
       
   840 
       
   841 #endif      // CMMCALLMESSHANDLER_H
       
   842 
       
   843 // End of file