localconnectivityservice/dun/atext/inc/DunAtCmdHandler.h
changeset 33 0b722902461e
parent 32 51f207bebb06
child 38 3dcb815346df
equal deleted inserted replaced
32:51f207bebb06 33:0b722902461e
    84      * Index in iInputBuffer for decoding to iDecodeBuffer
    84      * Index in iInputBuffer for decoding to iDecodeBuffer
    85      */
    85      */
    86     TInt iDecodeIndex;
    86     TInt iDecodeIndex;
    87 
    87 
    88     /**
    88     /**
       
    89      * Index in iInputBuffer for extended character position 
       
    90      */
       
    91     TInt iExtendedIndex;
       
    92 
       
    93     /**
    89      * Previous character in parsing
    94      * Previous character in parsing
    90      */
    95      */
    91     TChar iPrevChar;
    96     TChar iPrevChar;
    92 
    97 
    93     /**
    98     /**
    94      * Flag to indicate if previous character exists
    99      * Flag to indicate if previous character exists
    95      */
   100      */
    96     TBool iPrevExists;
   101     TBool iPrevExists;
    97 
   102 
       
   103     /**
       
   104      * Flag to indicate if assignment mark found
       
   105      */
       
   106     TBool iAssignFound;
       
   107 
       
   108     /**
       
   109      * Flag to indicate if processing inside quotes 
       
   110      */
       
   111     TBool iInQuotes;
       
   112 
       
   113     /**
       
   114      * Flag to indicate if special subcommand found
       
   115      */
       
   116     TBool iSpecialFound;
       
   117     
    98     /**
   118     /**
    99      * Buffer for parsing
   119      * Buffer for parsing
   100      */
   120      */
   101     TBuf8<KDunInputBufLength> iDecodeBuffer;
   121     TBuf8<KDunInputBufLength> iDecodeBuffer;
   102 
   122 
   517      * Finds start of a decoded AT command
   537      * Finds start of a decoded AT command
   518      *
   538      *
   519      * @since S60 5.0
   539      * @since S60 5.0
   520      * @param aDes String descriptor
   540      * @param aDes String descriptor
   521      * @param aStartIndex Start index for search
   541      * @param aStartIndex Start index for search
   522      * @pram aExtended ETrue if extended command, EFalse otherwise
       
   523      * @return Index if found, KErrNotFound otherwise
   542      * @return Index if found, KErrNotFound otherwise
   524      */
   543      */
   525     TInt FindStartOfDecodedCommand( TDesC8& aDes,
   544     TInt FindStartOfDecodedCommand( TDesC8& aDes,
   526                                     TInt aStartIndex,
   545                                     TInt aStartIndex );
   527                                     TBool& aExtended );
       
   528 
   546 
   529     /**
   547     /**
   530      * Checks if character is delimiter character
   548      * Checks if character is delimiter character
   531      *
   549      *
   532      * @since S60 5.0
   550      * @since S60 5.0
   543      * @return ETrue if extended character, EFalse otherwise
   561      * @return ETrue if extended character, EFalse otherwise
   544      */
   562      */
   545     TBool IsExtendedCharacter( TChar aCharacter );
   563     TBool IsExtendedCharacter( TChar aCharacter );
   546 
   564 
   547     /**
   565     /**
   548      * Checks extended command
   566      * Checks special command
   549      *
   567      *
   550      * @since S60 5.0
   568      * @since S60 5.0
   551      * @param aStartIndex Start index (doesn't change)
   569      * @param aStartIndex Start index (doesn't change)
   552      * @param aEndIndex End index (changes)
   570      * @param aEndIndex End index (changes)
   553      * @return ETrue if end of extended found, EFalse otherwise
   571      * @return Symbian error code on error, KErrNone otherwise
   554      */
   572      */
   555     TBool CheckExtendedCommand( TInt aStartIndex, TInt& aEndIndex );
   573     TBool CheckSpecialCommand( TInt aStartIndex,
   556 
   574                                TInt& aEndIndex );
   557     /**
   575 
   558      * Checks special command
   576     /**
   559      *
   577      * Saves character decode state for a found character
   560      * @since S60 5.0
   578      *
       
   579      * @since TB9.2
       
   580      * @param aCharacter Character to save a state for
       
   581      * @param aAddSpecial ETrue to add character for special command,
       
   582      *                    EFalse otherwise
       
   583      * @return Symbian error code on error, KErrNone otherwise
       
   584      */
       
   585     void SaveFoundCharDecodeState( TChar aCharacter,
       
   586                                    TBool aAddSpecial=ETrue );
       
   587     
       
   588     /**
       
   589      * Saves character decode state for a not found character
       
   590      *
       
   591      * @since TB9.2
   561      * @param aStartIndex Start index (doesn't change)
   592      * @param aStartIndex Start index (doesn't change)
   562      * @param aEndIndex End index (changes)
   593      * @param aEndIndex End index (changes)
   563      * @return Symbian error code on error, KErrNone otherwise
   594      * @return Symbian error code on error, KErrNone otherwise
   564      */
   595      */
   565     TBool CheckSpecialCommand( TInt aStartIndex,
   596     void SaveNotFoundCharDecodeState();
   566                                TInt& aEndIndex );
   597 
   567 
   598     /**
   568     /**
   599      * Find quotes within subcommands
   569      * Checks basic command
   600      *
   570      *
   601      * @since TB9.2
   571      * @since S60 5.0
   602      * @param aCharacter Character to check
   572      * @param aStartIndex Start index (doesn't change)
   603      * @param aStartIndex Start index (doesn't change)
   573      * @param aEndIndex End index (changes)
   604      * @param aEndIndex End index (changes)
   574      * @param aACmdFound ETrue if one character "A" command found,
   605      * @return Symbian error code on error, KErrNone otherwise
   575      *                   EFalse otherwise
   606      */
   576      * @return Symbian error code on error, KErrNone otherwise
   607     TBool FindSubCommandQuotes( TChar aCharacter, TInt aStartIndex, TInt& aEndIndex );
   577      */
   608 
   578     TInt CheckBasicCommand( TInt aStartIndex,
   609     /**
   579                             TInt& aEndIndex,
   610      * Check if in next subcommand's extended border
   580                             TBool& aOneCharCmd );
   611      *
   581 
   612      * @since TB9.2
   582     /**
   613      * @param aCharacter Extended character to check
   583      * Check if any one character command
       
   584      *
       
   585      * @since S60 5.0
       
   586      * @param aStartIndex Start index (doesn't change)
   614      * @param aStartIndex Start index (doesn't change)
   587      * @return ETrue if any one character command, EFalse otherwise
   615      * @param aEndIndex End index (changes)
   588      */
   616      * @return ETrue if in next command's extended border, EFalse otherwise
   589     TBool IsOneCharacterCommand( TInt aStartIndex );
   617      */
   590 
   618     TBool IsExtendedBorder( TChar aCharacter, TInt aStartIndex, TInt& aEndIndex );
   591     /**
   619     
   592      * Check if one character "A" command
   620     /**
   593      *
   621      * Finds subcommand with alphanumeric borders
   594      * @since S60 5.0
   622      *
       
   623      * @since TB9.2
       
   624      * @param aCharacter Character to check
       
   625      * @param aEndIndex End index (changes)
       
   626      * @return ETrue if alpha border found, EFalse otherwise
       
   627      */
       
   628     TBool FindSubCommandAlphaBorder( TChar aCharacter, TInt& aEndIndex );
       
   629 
       
   630     /**
       
   631      * Finds subcommand
       
   632      *
       
   633      * @since TB9.2
   595      * @param aStartIndex Start index (doesn't change)
   634      * @param aStartIndex Start index (doesn't change)
   596      * @return ETrue if one character "A" command, EFalse otherwise
   635      * @param aEndIndex End index (changes)
   597      */
   636      * @return Symbian error code on error, KErrNone otherwise
   598     TBool IsOneCharacterACommand( TInt aStartIndex );
   637      */
       
   638     TInt FindSubCommand( TInt aStartIndex, TInt& aEndIndex );
   599 
   639 
   600     /**
   640     /**
   601      * Check if "A/" command
   641      * Check if "A/" command
   602      *
   642      *
   603      * @since S60 5.0
   643      * @since S60 5.0