satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h
branchRCL_3
changeset 19 7d48bed6ce0c
parent 0 ff3b6d0fd310
child 20 987c9837762f
equal deleted inserted replaced
18:594d59766373 19:7d48bed6ce0c
     1 /*
     1 /*
     2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    19 #ifndef CSETUPCALLHANDLER_H
    19 #ifndef CSETUPCALLHANDLER_H
    20 #define CSETUPCALLHANDLER_H
    20 #define CSETUPCALLHANDLER_H
    21 
    21 
    22 #include <etelsat.h>
    22 #include <etelsat.h>
    23 
    23 
    24 #include <AiwServiceHandler.h>
       
    25 #include <CPhCltEmergencyCall.h>
       
    26 #include <MPhCltEmergencyCallObserver.h>
       
    27 
       
    28 #include "CSatCommandHandler.h"
    24 #include "CSatCommandHandler.h"
    29 #include "SatSTypes.h"
    25 #include "SatSTypes.h"
       
    26 
       
    27 class CSetupCallRequestHandler;
    30 
    28 
    31 /**
    29 /**
    32 *  Command handler for SetUpCall command.
    30 *  Command handler for SetUpCall command.
    33 *
    31 *
    34 *  @lib SetUpCallCmd.lib
    32 *  @lib SetUpCallCmd.lib
    35 *  @since S60 v3.0
    33 *  @since S60 v3.0
    36 */
    34 */
    37 class CSetUpCallHandler : public CSatCommandHandler,
    35 class CSetUpCallHandler : public CSatCommandHandler
    38                           public MAiwNotifyCallback,
       
    39                           public MPhCltEmergencyCallObserver
       
    40     {
    36     {
    41 
    37 
    42 public:
    38 public:
    43 
    39 
    44     static CSetUpCallHandler* NewL( MSatUtils* aUtils );
    40     static CSetUpCallHandler* NewL( MSatUtils* aUtils );
    62      * Response from the client
    58      * Response from the client
    63      *
    59      *
    64      */
    60      */
    65     void ClientResponse();
    61     void ClientResponse();
    66 
    62 
       
    63     /**
       
    64     * Handle the setup call Request Complete.
       
    65     *
       
    66     * @param aErrCode Result of ETelMM Api calling.
       
    67     */
       
    68     void SetupCallRequestComplete( const TInt aErrCode );
       
    69 
    67 protected:
    70 protected:
    68 
    71 
    69 // from base class CActive
    72 // from base class CActive
    70 
    73 
    71     /**
    74     /**
   113      * Indication that UI launching failed.
   116      * Indication that UI launching failed.
   114      *
   117      *
   115      */
   118      */
   116     void UiLaunchFailed();
   119     void UiLaunchFailed();
   117 
   120 
   118 // from base class MAiwNotifyCallback
       
   119 
       
   120     /**
       
   121      * From MAiwNotifyCallback
       
   122      * Called when dial request is completed.
       
   123      *
       
   124      * @param aCmdId Identifier of requested Aiw operation.
       
   125      * @param aEventId Identifier of status event.
       
   126      * @param aEventParamList Parameters of status event.
       
   127      * @param aInParamList Parameters of Aiw operation.
       
   128      */
       
   129     TInt HandleNotifyL(
       
   130         const TInt aCmdId,
       
   131         const TInt aEventId,
       
   132         CAiwGenericParamList& aEventParamList,
       
   133         const CAiwGenericParamList& aInParamList );
       
   134 
       
   135 // from base class MPhCltEmergencyCallObserver
       
   136 
       
   137     /**
       
   138      * From MPhCltEmergencyCallObserver
       
   139      * Called when emergency dial request is completed.
       
   140      *
       
   141      * @param aStatus Non zero value means failure.
       
   142      */
       
   143     void HandleEmergencyDialL( const TInt aStatus );
       
   144 
       
   145 private:
   121 private:
   146 
   122 
   147     CSetUpCallHandler();
   123     CSetUpCallHandler();
   148 
   124 
   149     void ConstructL();
   125     void ConstructL();
   151     /**
   127     /**
   152      * Performs the request to dial
   128      * Performs the request to dial
   153      *
   129      *
   154      * @since S60 3.2
   130      * @since S60 3.2
   155      */
   131      */
   156     void DoSetupCallL();
   132     void DoSetupCall( CSetupCallRequestHandler& aHandler );
   157 
   133 
   158     /**
   134     /**
   159      * Return terminal response filled according to dial result.
   135      * Return terminal response filled according to dial result.
   160      *
   136      *
   161      * @since S60 3.2
   137      * @since S60 3.2
   190      * see ETSI 11.11 10.5.1
   166      * see ETSI 11.11 10.5.1
   191      *
   167      *
   192      * @param aNumber dialling number string
   168      * @param aNumber dialling number string
   193      */
   169      */
   194     void CheckNumber( TDes& aNumber ) const;
   170     void CheckNumber( TDes& aNumber ) const;
       
   171         
       
   172     /**
       
   173      * Create emergency call
       
   174      */
       
   175     void CreateEmergencyCall( CSetupCallRequestHandler& aHandler );
   195     
   176     
   196     /**
   177     /**
   197      * Converts a TCCP error to the corresponding symbian error.
   178      * Check the Param of the setup call 
   198      *
   179      */
   199      * @param aTccpError A TCCP error number to be converted into
   180     TBool CheckSetupCallParam();
   200      * a symbian one.
       
   201      *
       
   202      * @return The corresponding symbian error from TCCP error.
       
   203      */
       
   204     TInt TccpErrorToSymbianError( const TInt aTccpError ) const;
       
   205     
       
   206     /**
       
   207      * Create emergency call
       
   208      */
       
   209     void CreateEmergencyCallL();
       
   210     
   181     
   211 private: // data
   182 private: // data
   212 
   183 
   213     /**
   184     /**
   214      * SetUpCall command data from SIM.
   185      * SetUpCall command data from SIM.
   249      * Query rsp package.
   220      * Query rsp package.
   250      */
   221      */
   251     TSatQueryRspV1Pckg iQueryRspPckg;
   222     TSatQueryRspV1Pckg iQueryRspPckg;
   252 
   223 
   253     /**
   224     /**
   254      * Service handler to make normal call.
   225      * Handing the asynchronous request
   255      */
   226      */
   256     CAiwServiceHandler* iServiceHandler;
   227     CSetupCallRequestHandler* iRequestHandler;
   257 
   228       
   258     /**
       
   259      * Utility to handle emergency calls.
       
   260      */
       
   261     CPhCltEmergencyCall* iEmergencyCallApi;
       
   262 
       
   263     /**
   229     /**
   264      * Current call is an emergency call.
   230      * Current call is an emergency call.
   265      */
   231      */
   266     TBool iEmergencyCall;
   232     TBool iEmergencyCall;
   267 
   233 
   268     /**
   234     /**
   269      * Indicates if call control is active
   235      * Indicates if call control is active
   270      */
   236      */
   271     TBool iCallControlActive;
   237     TBool iCallControlActive;
   272 
       
   273     /**
       
   274      * Dial completion status
       
   275      */
       
   276     TInt iSetUpCallStatus;
       
   277 
   238 
   278     /**
   239     /**
   279      * wait scheduler
   240      * wait scheduler
   280      */
   241      */
   281     CActiveSchedulerWait iWait;
   242     CActiveSchedulerWait iWait;