localconnectivityservice/lccustomplugin/inc/lccustomplugin.h
changeset 13 0feebc799606
parent 0 c3e98f10fcf4
--- a/localconnectivityservice/lccustomplugin/inc/lccustomplugin.h	Tue Feb 02 00:45:58 2010 +0200
+++ b/localconnectivityservice/lccustomplugin/inc/lccustomplugin.h	Fri Mar 19 09:42:38 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 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"
@@ -15,7 +15,6 @@
 *
 */
 
-
 #ifndef C_LCCUSTOMPLUGIN_H
 #define C_LCCUSTOMPLUGIN_H
 
@@ -23,6 +22,7 @@
 
 class CLcCustomPlugin;
 
+/** Character types: carriage return, line feed or backspace */
 enum TCharacterTypes
     {
     ECharTypeCR,  // Carriage return
@@ -30,12 +30,30 @@
     ECharTypeBS   // Backspace
     };
 
+/** Type of modes (quiet, verbose) */
 enum TModeTypes
     {
     EModeTypeQuiet,   // Quiet mode
     EModeTypeVerbose  // Verbose mode
     };
 
+/**  Handler types for the four types */
+enum TCmdHandlerType
+    {
+    ECmdHandlerTypeUndefined = KErrNotFound,
+    ECmdHandlerTypeBase      = 0x01,  // For command "AT+COMMAND"
+    ECmdHandlerTypeSet       = 0x02,  // For command "AT+COMMAND="
+    ECmdHandlerTypeRead      = 0x04,  // For command "AT+COMMAND?"
+    ECmdHandlerTypeTest      = 0x08,  // For command "AT+COMMAND=?"
+    };
+
+/**  Detected commands */
+enum TDetectedCmd
+    {
+    EDetectedCmdUndefined,
+    EDetectedCmdCLAC  // For command "AT+CLAC"
+    };
+
 /**
  *  Class for common AT command handler interface
  *
@@ -116,8 +134,6 @@
      *
      * @since S60 5.0
      * @param aReplyType Type of reply
-     * @param aDstBuffer Destination buffer; used for the API requiring the
-     *                   AT command reply
      * @param aSrcBuffer Source buffer; used only if aReplyType is EReplyTypeOther
      * @param aError Completion code. If not KErrNone then other arguments are
      *               ignored and the request is completed to ATEXT with
@@ -125,7 +141,6 @@
      * @return None
      */
     virtual TInt CreateReplyAndComplete( TATExtensionReplyType aReplyType,
-                                         RBuf8& aDstBuffer,
                                          const TDesC8& aSrcBuffer=KNullDesC8,
                                          TInt aError=KErrNone ) = 0;
 
@@ -142,6 +157,17 @@
                                        TBool aOkReply ) = 0;
 
     /**
+     * Checks if the command is a base, set, read or test type of command
+     *
+     * @since TB9.2
+     * @param aCmdBase Base part of the command to check
+     * @param aCmdFull Full command to check
+     * @return Type of command
+     */
+    virtual TCmdHandlerType CheckCommandType( const TDesC8& aCmdBase,
+                                              const TDesC8& aCmdFull ) = 0;
+
+    /**
      * Returns the array of supported commands
      *
      * @since S60 5.0
@@ -347,8 +373,6 @@
      *
      * @since S60 5.0
      * @param aReplyType Type of reply
-     * @param aDstBuffer Destination buffer; used for the API requiring the
-     *                   AT command reply
      * @param aSrcBuffer Source buffer; used only if aReplyType is EReplyTypeOther
      * @param aError Completion code. If not KErrNone then other arguments are
      *               ignored and the request is completed to ATEXT with
@@ -356,7 +380,6 @@
      * @return None
      */
     TInt CreateReplyAndComplete( TATExtensionReplyType aReplyType,
-                                 RBuf8& aDstBuffer,
                                  const TDesC8& aSrcBuffer=KNullDesC8,
                                  TInt aError=KErrNone );
 
@@ -375,6 +398,18 @@
 
     /**
      * From MLcCustomPlugin.
+     * Checks if the command is a base, set, read or test type of command
+     *
+     * @since S60 5.0
+     * @param aCmdBase Base part of the command to check
+     * @param aCmdFull Full command to check
+     * @return Type of command
+     */
+    TCmdHandlerType CheckCommandType( const TDesC8& aCmdBase,
+                                      const TDesC8& aCmdFull );
+
+    /**
+     * From MLcCustomPlugin.
      * Returns the array of supported commands
      *
      * @since S60 5.0
@@ -420,6 +455,18 @@
     CLcCustomPluginBase* iHandler;
 
     /**
+     * Buffer for handle command's command
+     * Not own.
+     */
+    const TDesC8* iHcCmd;
+
+    /**
+     * Buffer for handle command reply
+     * Not own.
+     */
+    RBuf8* iHcReply;
+
+    /**
      * Global reply buffer for the AT command replies
      */
     RBuf8 iReplyBuffer;