satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*
     1 /*
     2 * Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2002-2008 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 
    24 #include "CSatCommandHandler.h"
    28 #include "CSatCommandHandler.h"
    25 #include "SatSTypes.h"
    29 #include "SatSTypes.h"
    26 
       
    27 class CSetupCallRequestHandler;
       
    28 
    30 
    29 /**
    31 /**
    30 *  Command handler for SetUpCall command.
    32 *  Command handler for SetUpCall command.
    31 *
    33 *
    32 *  @lib SetUpCallCmd.lib
    34 *  @lib SetUpCallCmd.lib
    33 *  @since S60 v3.0
    35 *  @since S60 v3.0
    34 */
    36 */
    35 class CSetUpCallHandler : public CSatCommandHandler
    37 class CSetUpCallHandler : public CSatCommandHandler,
       
    38                           public MAiwNotifyCallback,
       
    39                           public MPhCltEmergencyCallObserver
    36     {
    40     {
    37 
    41 
    38 public:
    42 public:
    39 
    43 
    40     static CSetUpCallHandler* NewL( MSatUtils* aUtils );
    44     static CSetUpCallHandler* NewL( MSatUtils* aUtils );
    58      * Response from the client
    62      * Response from the client
    59      *
    63      *
    60      */
    64      */
    61     void ClientResponse();
    65     void ClientResponse();
    62 
    66 
    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 
       
    70 protected:
    67 protected:
    71 
    68 
    72 // from base class CActive
    69 // from base class CActive
    73 
    70 
    74     /**
    71     /**
   116      * Indication that UI launching failed.
   113      * Indication that UI launching failed.
   117      *
   114      *
   118      */
   115      */
   119     void UiLaunchFailed();
   116     void UiLaunchFailed();
   120 
   117 
       
   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 
   121 private:
   145 private:
   122 
   146 
   123     CSetUpCallHandler();
   147     CSetUpCallHandler();
   124 
   148 
   125     void ConstructL();
   149     void ConstructL();
   127     /**
   151     /**
   128      * Performs the request to dial
   152      * Performs the request to dial
   129      *
   153      *
   130      * @since S60 3.2
   154      * @since S60 3.2
   131      */
   155      */
   132     void DoSetupCall( CSetupCallRequestHandler& aHandler );
   156     void DoSetupCallL();
   133 
   157 
   134     /**
   158     /**
   135      * Return terminal response filled according to dial result.
   159      * Return terminal response filled according to dial result.
   136      *
   160      *
   137      * @since S60 3.2
   161      * @since S60 3.2
   166      * see ETSI 11.11 10.5.1
   190      * see ETSI 11.11 10.5.1
   167      *
   191      *
   168      * @param aNumber dialling number string
   192      * @param aNumber dialling number string
   169      */
   193      */
   170     void CheckNumber( TDes& aNumber ) const;
   194     void CheckNumber( TDes& aNumber ) const;
   171         
   195     
       
   196     /**
       
   197      * Converts a TCCP error to the corresponding symbian error.
       
   198      *
       
   199      * @param aTccpError A TCCP error number to be converted into
       
   200      * a symbian one.
       
   201      *
       
   202      * @return The corresponding symbian error from TCCP error.
       
   203      */
       
   204     TInt TccpErrorToSymbianError( const TInt aTccpError ) const;
       
   205     
   172     /**
   206     /**
   173      * Create emergency call
   207      * Create emergency call
   174      */
   208      */
   175     void CreateEmergencyCall( CSetupCallRequestHandler& aHandler );
   209     void CreateEmergencyCallL();
   176     
       
   177     /**
       
   178      * Check the Param of the setup call 
       
   179      */
       
   180     TBool CheckSetupCallParam();
       
   181     
   210     
   182 private: // data
   211 private: // data
   183 
   212 
   184     /**
   213     /**
   185      * SetUpCall command data from SIM.
   214      * SetUpCall command data from SIM.
   220      * Query rsp package.
   249      * Query rsp package.
   221      */
   250      */
   222     TSatQueryRspV1Pckg iQueryRspPckg;
   251     TSatQueryRspV1Pckg iQueryRspPckg;
   223 
   252 
   224     /**
   253     /**
   225      * Handing the asynchronous request
   254      * Service handler to make normal call.
   226      */
   255      */
   227     CSetupCallRequestHandler* iRequestHandler;
   256     CAiwServiceHandler* iServiceHandler;
   228       
   257 
       
   258     /**
       
   259      * Utility to handle emergency calls.
       
   260      */
       
   261     CPhCltEmergencyCall* iEmergencyCallApi;
       
   262 
   229     /**
   263     /**
   230      * Current call is an emergency call.
   264      * Current call is an emergency call.
   231      */
   265      */
   232     TBool iEmergencyCall;
   266     TBool iEmergencyCall;
   233 
   267 
   234     /**
   268     /**
   235      * Indicates if call control is active
   269      * Indicates if call control is active
   236      */
   270      */
   237     TBool iCallControlActive;
   271     TBool iCallControlActive;
       
   272 
       
   273     /**
       
   274      * Dial completion status
       
   275      */
       
   276     TInt iSetUpCallStatus;
   238 
   277 
   239     /**
   278     /**
   240      * wait scheduler
   279      * wait scheduler
   241      */
   280      */
   242     CActiveSchedulerWait iWait;
   281     CActiveSchedulerWait iWait;