satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h
changeset 12 ae8abd0db65c
parent 0 ff3b6d0fd310
child 19 e44a8c097b15
--- a/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h	Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h	Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 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,22 +21,18 @@
 
 #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,
-                          public MAiwNotifyCallback,
-                          public MPhCltEmergencyCallObserver
+class CSetUpCallHandler : public CSatCommandHandler
     {
 
 public:
@@ -64,6 +60,28 @@
      */
     void ClientResponse();
 
+    /**
+    * Handle the setup call Request Complete.
+    *
+    * @param aErrCode Result of ETelMM Api calling.
+    */
+    void SetupCallRequestComplete( const TInt aErrCode );
+
+    /**
+    * TSetupCallStatus
+    * setup call status, when there is an asynchronous
+    * operation is handling by the CSetupCallCallRequestHandler
+    * we will save some status information
+    */
+    enum TSetupCallStatus
+        {
+        ESetupCallIdle = 0,
+        ESetupCallDialWaiting,
+        ESetupCallTerminateWaiting,
+        ESetupCallEmergencyWaiting
+        };
+    
+    
 protected:
 
 // from base class CActive
@@ -115,33 +133,6 @@
      */
     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();
@@ -153,7 +144,7 @@
      *
      * @since S60 3.2
      */
-    void DoSetupCallL();
+    void DoSetupCall( CSetupCallRequestHandler& aHandler );
 
     /**
      * Return terminal response filled according to dial result.
@@ -192,21 +183,11 @@
      * @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 CreateEmergencyCallL();
+    void CreateEmergencyCall( CSetupCallRequestHandler& aHandler );
     
 private: // data
 
@@ -251,15 +232,10 @@
     TSatQueryRspV1Pckg iQueryRspPckg;
 
     /**
-     * Service handler to make normal call.
+     * Handing the asynchronous request
      */
-    CAiwServiceHandler* iServiceHandler;
-
-    /**
-     * Utility to handle emergency calls.
-     */
-    CPhCltEmergencyCall* iEmergencyCallApi;
-
+    CSetupCallRequestHandler* iRequestHandler;
+      
     /**
      * Current call is an emergency call.
      */