localconnectivityservice/dun/atext/inc/DunAtSpecialCmdHandler.h
changeset 33 0b722902461e
parent 31 3b92f7acdc91
child 38 3dcb815346df
--- a/localconnectivityservice/dun/atext/inc/DunAtSpecialCmdHandler.h	Sun May 02 21:46:11 2010 +0300
+++ b/localconnectivityservice/dun/atext/inc/DunAtSpecialCmdHandler.h	Mon May 17 11:02:52 2010 +0300
@@ -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"
@@ -21,13 +21,13 @@
 #include <e32base.h>
 #include <badesca.h>
 
-const TInt KInputBufLength  = (512 + 1);  // 512 chars for command + <CR>
+const TInt KInputBufLength = (512 + 1);  // Set this the same as in KDunInputBufLength
 
 /**
  *  Class for special AT command handler
  *
  *  @lib dunatext.lib
- *  @since S60 v5.0
+ *  @since TB9.2
  */
 NONSHARABLE_CLASS( CDunAtSpecialCmdHandler ) : public CBase
     {
@@ -45,23 +45,56 @@
     * Destructor.
     */
     ~CDunAtSpecialCmdHandler();
-    
+
 public:
-    
-    TBool IsCompleteSubCommand(TChar aCharacter);
-    TBool IsCompleteSubCommand(TDesC8& aDes, TInt aStartIndex, TInt& aEndIndex);
+
+    /**
+     * Checks if the command has to be treated special way.
+     * For example in case of MAC, it sends command AT&FE0Q0V1&C1&D2+IFC=3,1.
+     * meaning there is no delimiters in the command.
+     * In case of MAC we try to search AT&F (sub command) string from the
+     * beginning of the command.
+     * Search is done string basis.
+     *
+     * @since TB9.2
+     * @param aCharacter Character to add
+     * @return ETrue if data is ready for comparison, EFalse otherwise
+     */
+    TBool IsCompleteSubCommand( TChar aCharacter );
+
+    /**
+     * Resets the buffer used for comparisons
+     *
+     * @since TB9.2
+     * @return None
+     */
+    void ResetComparisonBuffer();
 
 private:
 
     CDunAtSpecialCmdHandler();
 
     void ConstructL();
-    
-    TBool IsDataReadyForComparison(TInt aLength);
+
+    /**
+     * Defines when comparison is excecuted, checks if the data lengths are
+     * equal.
+     *
+     * @since TB9.2
+     * @return ETrue if data is ready for comparison, EFalse otherwise
+     */
+    TBool IsDataReadyForComparison( TInt aLength );
+
+    /**
+     * Defines minimum length of the special commands.
+     *
+     * @since TB9.2
+     * @return Minimum length of the special commands
+     */
     TInt MinimumLength();
 
+private:  // data
 
-private:  // data
     /**
      * Buffer for temporary AT command input
      */
@@ -70,7 +103,8 @@
     /**
      * Special commands for parsing
      */
-    CDesC8Array *iSpecialCmds;    
+    CDesC8Array *iSpecialCmds;
+
     };
 
 #endif  // C_CDUNATSPECIALCMDHANDLER_H