satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
--- a/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h	Tue Aug 31 15:45:17 2010 +0300
+++ b/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h	Wed Sep 01 12:15:03 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -21,18 +21,22 @@
 
 #include <etelsat.h>
 
+#include <AiwServiceHandler.h>
+#include <CPhCltEmergencyCall.h>
+#include <MPhCltEmergencyCallObserver.h>
+
 #include "CSatCommandHandler.h"
 #include "SatSTypes.h"
 
-class CSetupCallRequestHandler;
-
 /**
 *  Command handler for SetUpCall command.
 *
 *  @lib SetUpCallCmd.lib
 *  @since S60 v3.0
 */
-class CSetUpCallHandler : public CSatCommandHandler
+class CSetUpCallHandler : public CSatCommandHandler,
+                          public MAiwNotifyCallback,
+                          public MPhCltEmergencyCallObserver
     {
 
 public:
@@ -60,13 +64,6 @@
      */
     void ClientResponse();
 
-    /**
-    * Handle the setup call Request Complete.
-    *
-    * @param aErrCode Result of ETelMM Api calling.
-    */
-    void SetupCallRequestComplete( const TInt aErrCode );
-
 protected:
 
 // from base class CActive
@@ -118,6 +115,33 @@
      */
     void UiLaunchFailed();
 
+// from base class MAiwNotifyCallback
+
+    /**
+     * From MAiwNotifyCallback
+     * Called when dial request is completed.
+     *
+     * @param aCmdId Identifier of requested Aiw operation.
+     * @param aEventId Identifier of status event.
+     * @param aEventParamList Parameters of status event.
+     * @param aInParamList Parameters of Aiw operation.
+     */
+    TInt HandleNotifyL(
+        const TInt aCmdId,
+        const TInt aEventId,
+        CAiwGenericParamList& aEventParamList,
+        const CAiwGenericParamList& aInParamList );
+
+// from base class MPhCltEmergencyCallObserver
+
+    /**
+     * From MPhCltEmergencyCallObserver
+     * Called when emergency dial request is completed.
+     *
+     * @param aStatus Non zero value means failure.
+     */
+    void HandleEmergencyDialL( const TInt aStatus );
+
 private:
 
     CSetUpCallHandler();
@@ -129,7 +153,7 @@
      *
      * @since S60 3.2
      */
-    void DoSetupCall( CSetupCallRequestHandler& aHandler );
+    void DoSetupCallL();
 
     /**
      * Return terminal response filled according to dial result.
@@ -168,16 +192,21 @@
      * @param aNumber dialling number string
      */
     void CheckNumber( TDes& aNumber ) const;
-        
+    
+    /**
+     * Converts a TCCP error to the corresponding symbian error.
+     *
+     * @param aTccpError A TCCP error number to be converted into
+     * a symbian one.
+     *
+     * @return The corresponding symbian error from TCCP error.
+     */
+    TInt TccpErrorToSymbianError( const TInt aTccpError ) const;
+    
     /**
      * Create emergency call
      */
-    void CreateEmergencyCall( CSetupCallRequestHandler& aHandler );
-    
-    /**
-     * Check the Param of the setup call 
-     */
-    TBool CheckSetupCallParam();
+    void CreateEmergencyCallL();
     
 private: // data
 
@@ -222,10 +251,15 @@
     TSatQueryRspV1Pckg iQueryRspPckg;
 
     /**
-     * Handing the asynchronous request
+     * Service handler to make normal call.
      */
-    CSetupCallRequestHandler* iRequestHandler;
-      
+    CAiwServiceHandler* iServiceHandler;
+
+    /**
+     * Utility to handle emergency calls.
+     */
+    CPhCltEmergencyCall* iEmergencyCallApi;
+
     /**
      * Current call is an emergency call.
      */
@@ -237,6 +271,11 @@
     TBool iCallControlActive;
 
     /**
+     * Dial completion status
+     */
+    TInt iSetUpCallStatus;
+
+    /**
      * wait scheduler
      */
     CActiveSchedulerWait iWait;