satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h
changeset 12 ae8abd0db65c
parent 0 ff3b6d0fd310
child 19 e44a8c097b15
equal deleted inserted replaced
0:ff3b6d0fd310 12:ae8abd0db65c
     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 
       
    70     /**
       
    71     * TSetupCallStatus
       
    72     * setup call status, when there is an asynchronous
       
    73     * operation is handling by the CSetupCallCallRequestHandler
       
    74     * we will save some status information
       
    75     */
       
    76     enum TSetupCallStatus
       
    77         {
       
    78         ESetupCallIdle = 0,
       
    79         ESetupCallDialWaiting,
       
    80         ESetupCallTerminateWaiting,
       
    81         ESetupCallEmergencyWaiting
       
    82         };
       
    83     
       
    84     
    67 protected:
    85 protected:
    68 
    86 
    69 // from base class CActive
    87 // from base class CActive
    70 
    88 
    71     /**
    89     /**
   113      * Indication that UI launching failed.
   131      * Indication that UI launching failed.
   114      *
   132      *
   115      */
   133      */
   116     void UiLaunchFailed();
   134     void UiLaunchFailed();
   117 
   135 
   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:
   136 private:
   146 
   137 
   147     CSetUpCallHandler();
   138     CSetUpCallHandler();
   148 
   139 
   149     void ConstructL();
   140     void ConstructL();
   151     /**
   142     /**
   152      * Performs the request to dial
   143      * Performs the request to dial
   153      *
   144      *
   154      * @since S60 3.2
   145      * @since S60 3.2
   155      */
   146      */
   156     void DoSetupCallL();
   147     void DoSetupCall( CSetupCallRequestHandler& aHandler );
   157 
   148 
   158     /**
   149     /**
   159      * Return terminal response filled according to dial result.
   150      * Return terminal response filled according to dial result.
   160      *
   151      *
   161      * @since S60 3.2
   152      * @since S60 3.2
   190      * see ETSI 11.11 10.5.1
   181      * see ETSI 11.11 10.5.1
   191      *
   182      *
   192      * @param aNumber dialling number string
   183      * @param aNumber dialling number string
   193      */
   184      */
   194     void CheckNumber( TDes& aNumber ) const;
   185     void CheckNumber( TDes& aNumber ) const;
   195     
   186         
   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     
       
   206     /**
   187     /**
   207      * Create emergency call
   188      * Create emergency call
   208      */
   189      */
   209     void CreateEmergencyCallL();
   190     void CreateEmergencyCall( CSetupCallRequestHandler& aHandler );
   210     
   191     
   211 private: // data
   192 private: // data
   212 
   193 
   213     /**
   194     /**
   214      * SetUpCall command data from SIM.
   195      * SetUpCall command data from SIM.
   249      * Query rsp package.
   230      * Query rsp package.
   250      */
   231      */
   251     TSatQueryRspV1Pckg iQueryRspPckg;
   232     TSatQueryRspV1Pckg iQueryRspPckg;
   252 
   233 
   253     /**
   234     /**
   254      * Service handler to make normal call.
   235      * Handing the asynchronous request
   255      */
   236      */
   256     CAiwServiceHandler* iServiceHandler;
   237     CSetupCallRequestHandler* iRequestHandler;
   257 
   238       
   258     /**
       
   259      * Utility to handle emergency calls.
       
   260      */
       
   261     CPhCltEmergencyCall* iEmergencyCallApi;
       
   262 
       
   263     /**
   239     /**
   264      * Current call is an emergency call.
   240      * Current call is an emergency call.
   265      */
   241      */
   266     TBool iEmergencyCall;
   242     TBool iEmergencyCall;
   267 
   243