adaptationlayer/modematadaptation/modematcontroller_exe/inc/cmodemathandler.h
changeset 9 8486d82aef45
parent 8 6295dc2169f3
--- a/adaptationlayer/modematadaptation/modematcontroller_exe/inc/cmodemathandler.h	Wed Apr 21 14:29:55 2010 +0300
+++ b/adaptationlayer/modematadaptation/modematcontroller_exe/inc/cmodemathandler.h	Tue Oct 19 13:16:20 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -23,7 +23,6 @@
 #include <e32base.h>
 #include "mmodematobserver.h"
 
-
 // FORWARD DECLARATIONS
 class CModemAtSrv;
 class RIscApi;
@@ -48,7 +47,7 @@
      * @param aServer
      * @return Instance of self
      */
-    static CModemAtHandler* NewL( CModemAtSrv& aServer );
+    static CModemAtHandler* NewL( CModemAtSrv& aServer, TInt aChannel );
 
     /**
      * Destructor.
@@ -57,13 +56,11 @@
     
     /**
      * Sends AT-command to Modem AT-server
-     * @param aDteId 
      * @param aPluginType AText/Common
      * @param aMessageType 0=normal, 1=getnvram status
      * @param aCmd AT-command
      */
     TInt SendATCommand(
-        const TUint8 aDteId,
         const TATPluginInterface aPluginType,
         const TUint8 aMessageType,
         const TDesC8& aCmd );
@@ -75,14 +72,14 @@
       *  @return KErrNoMemory
       */
 
-    TInt Connect( const TUint8 aDteId );
+    TInt Connect( TUint8 aDevId, TUint8 aObjId );
 
     /**
      *  Disconnects handler from modem
      *  @param TUint8 aDteId
      *  @return Disconnect status
      */
-    TInt Disconnect( const TUint8 aDteId );
+    TInt Disconnect();
     
     /**
      *  Check if disconnect is called directly
@@ -98,17 +95,16 @@
     
     /**
      *  SendAtModemDataRedirectResultReq
-     *  @param TUint8 aDteId
      *  @param TUint aResult
      */
-    void SendAtModemDataRedirectResultReq( const TUint8 aDteId, const TUint aResult);
+    void SendAtModemDataRedirectResultReq( const TUint aResult );
 
     /**
-     *  SendEscapeSignalDetection
-     *  @param TUint8 aDteId
+     *  SendSignalDetection
+     *  @param TUint8 aSignal
      *  @return Symbian error code if error
      */
-    TInt SendEscapeSignalDetection( const TUint8 aDteId );
+    TInt SendSignalDetection( const TUint8 aSignal );
 
     /**
      *  HandleSignalDetectedResp
@@ -118,9 +114,8 @@
 
     /**
      *  RemovePipe
-     *  @param TUint8 aDteId
      */
-    void RemovePipe( const TUint8 aDteId );
+    void RemovePipe();
 
     /**
      *  IsPluginConnected
@@ -136,9 +131,68 @@
     
     /**
      *  SendAtModemConnectReq
-     *  @param TUint8 aDteId
+     */
+    TInt SendAtModemConnectReq();
+
+    /**
+     *  Check if pipe is in data mode
+     *  @return ETrue, if pipe is in datamode
+     */
+    TBool IsPipeInDataMode();
+
+    /**
+     *  Check if text message mode is on
+     *  @return ETrue, if +CMGS or +CMGS command has been received
+     */
+    TBool IsTextMessageMode();
+
+    /**
+     *  Set text message mode. Modem indications will be ignored during this mode.
+     *  @param TBool aTextMode
+     */
+    void SetTextMessageMode( TBool aTextMode );
+
+    /**
+     *  Pipe creation result and pipe handle is informed 
+     *  with this function
+     *  @param TUint8 aPipeHandle
+     *  @param TInt aError
      */
-    TInt SendAtModemConnectReq( const TUint8 aDteId );
+    void PipeCreated( TUint8 aPipeHandle, TInt aError );
+
+     /**
+     *  Stores device info so that it's available when
+     *  plugin for the device is created 
+     *  @param TUint8 aDevId
+     *  @param TUint8 aObjId
+     */
+    void AddDevice( TUint8 aDevId, TUint8 aObjId );
+
+     /**
+     *  Remove device info
+     *  @param TUint8 aDevId
+     *  @param TUint8 aObjId
+     */
+    void RemoveDevice( TUint8 aDevId, TUint8 aObjId );
+
+    /**
+     *  Get Dataport object id
+     *  @param TUint8& aObjId
+     */
+    void GetDataportObjectId( TUint& aObjId );
+    
+    /**
+     *  Get secondary dataport object id (e.g. if usb and bluetooth connect without PNS_NAME_ADD_IND)
+     *  @param TUint8& aObjId
+     */
+    void GetSecondaryDataportObjectId( TUint& aObjId );
+
+    /**
+     *  Get ISC channel id used by handler
+     *  @return TUint8 channel id
+     */
+    TInt GetChannelId();
+
 
 protected:
     // from CActive
@@ -149,7 +203,7 @@
     /**
      * Default C++ constructor.
      */
-    CModemAtHandler( CModemAtSrv& aServer );
+    CModemAtHandler( CModemAtSrv& aServer, TInt aChannel );
 
     /**
      *  2nd phase constructor
@@ -188,17 +242,19 @@
     TIsiReceiveC*  iReceivedMessage;
     
     TUint iPepObjId;    //controller pep
-    
+    TUint iDataportObjId;
+
     CModemAtPipeController* iPipeController;
 #ifdef __WINSCW__
     TInt iEmulatedValue;
-    TUint8 iDteId;
-    TUint8 iChannel;
     TATPluginInterface iPluginType;
 #endif
     TUint8 iLastTransactionId;
     TBool iDisconnected;
     TBool iModemAtExistInCmt;
+    TBool iTextMessageMode;
+    TUint8 iDteId;
+    TInt iChannel;
     };
 
 #endif  // CMODEMATHANDLER_H