localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp
branchRCL_3
changeset 12 031b9cffe6e4
parent 9 a2f12998bb04
child 19 2702348f1fe7
equal deleted inserted replaced
11:87d139e87731 12:031b9cffe6e4
    83     iNvramListen = NULL;
    83     iNvramListen = NULL;
    84     delete iModeListen;
    84     delete iModeListen;
    85     iModeListen = NULL;
    85     iModeListen = NULL;
    86     delete iEcomListen;
    86     delete iEcomListen;
    87     iEcomListen = NULL;
    87     iEcomListen = NULL;
       
    88     delete iAtSpecialCmdHandler;
       
    89     iAtSpecialCmdHandler = NULL;
    88     if ( iAtCmdExtCommon.Handle() )
    90     if ( iAtCmdExtCommon.Handle() )
    89         {
    91         {
    90         iAtCmdExtCommon.SynchronousClose();
    92         iAtCmdExtCommon.SynchronousClose();
    91         iAtCmdExtCommon.Close();
    93         iAtCmdExtCommon.Close();
    92         }
    94         }
   329     CleanupStack::Pop( &iAtCmdExtCommon );
   331     CleanupStack::Pop( &iAtCmdExtCommon );
   330     CleanupStack::Pop( &iAtCmdExt );
   332     CleanupStack::Pop( &iAtCmdExt );
   331     iEcomListen = ecomListen;
   333     iEcomListen = ecomListen;
   332     iModeListen = modeListen;
   334     iModeListen = modeListen;
   333     iNvramListen = nvramListen;
   335     iNvramListen = nvramListen;
       
   336     
       
   337     iAtSpecialCmdHandler = CDunAtSpecialCmdHandler::NewL();
   334     FTRACE(FPrint( _L("CDunAtCmdHandler::ConstructL() complete") ));
   338     FTRACE(FPrint( _L("CDunAtCmdHandler::ConstructL() complete") ));
   335     }
   339     }
   336 
   340 
   337 // ---------------------------------------------------------------------------
   341 // ---------------------------------------------------------------------------
   338 // Initializes this class
   342 // Initializes this class
   858     TBool oneCharCmd = EFalse;
   862     TBool oneCharCmd = EFalse;
   859     TBool specialCmd = EFalse;
   863     TBool specialCmd = EFalse;
   860     TInt endIndex = KErrNotFound;
   864     TInt endIndex = KErrNotFound;
   861     if ( extendedCmd )
   865     if ( extendedCmd )
   862         {
   866         {
   863         extendedEnd = CheckExtendedCommand( startIndex, endIndex );
   867         if( iAtSpecialCmdHandler->IsCompleteSubCommand(iInputBuffer, startIndex, endIndex) == EFalse )
       
   868             {
       
   869             extendedEnd = CheckExtendedCommand( startIndex, endIndex );
       
   870             }
   864         }
   871         }
   865     else
   872     else
   866         {
   873         {
   867         specialCmd = CheckSpecialCommand( startIndex, endIndex );
   874         specialCmd = CheckSpecialCommand( startIndex, endIndex );
   868         if ( !specialCmd )
   875         if ( !specialCmd )
  1005 TBool CDunAtCmdHandler::IsDelimiterCharacter( TChar aCharacter )
  1012 TBool CDunAtCmdHandler::IsDelimiterCharacter( TChar aCharacter )
  1006     {
  1013     {
  1007     FTRACE(FPrint( _L("CDunAtCmdHandler::IsDelimiterCharacter()") ));
  1014     FTRACE(FPrint( _L("CDunAtCmdHandler::IsDelimiterCharacter()") ));
  1008     if ( aCharacter.IsSpace() || aCharacter==';' || aCharacter==0x00 )
  1015     if ( aCharacter.IsSpace() || aCharacter==';' || aCharacter==0x00 )
  1009         {
  1016         {
  1010         FTRACE(FPrint( _L("CDunAtCmdHandler::IsExtendedCharacter() complete") ));
  1017         FTRACE(FPrint( _L("CDunAtCmdHandler::IsDelimiterCharacter() complete") ));
  1011         return ETrue;
  1018         return ETrue;
  1012         }
  1019         }
  1013     FTRACE(FPrint( _L("CDunAtCmdHandler::IsDelimiterCharacter() (not delimiter) complete") ));
  1020     FTRACE(FPrint( _L("CDunAtCmdHandler::IsDelimiterCharacter() (not delimiter) complete") ));
  1014     return EFalse;
  1021     return EFalse;
  1015     }
  1022     }
  1069         if ( IsDelimiterCharacter(character) )
  1076         if ( IsDelimiterCharacter(character) )
  1070             {
  1077             {
  1071             endFound = ETrue;
  1078             endFound = ETrue;
  1072             break;
  1079             break;
  1073             }
  1080             }
       
  1081         if( IsExtendedCharacter(character) && (aEndIndex != aStartIndex) && iDecodeInfo.iPrevExists )
       
  1082             {
       
  1083             if( iDecodeInfo.iPrevChar.IsAlphaDigit() )
       
  1084                 {
       
  1085                 aEndIndex--;
       
  1086                 // End found but return EFalse in order to calling function can proceed correct way,
       
  1087                 // no extended end.
       
  1088                 return EFalse;
       
  1089                 }
       
  1090             }
  1074         iDecodeInfo.iPrevExists = ETrue;
  1091         iDecodeInfo.iPrevExists = ETrue;
  1075         iDecodeInfo.iPrevChar = character;
  1092         iDecodeInfo.iPrevChar = character;
  1076         }
  1093         }
  1077     aEndIndex--;
  1094     aEndIndex--;
  1078     FTRACE(FPrint( _L("CDunAtCmdHandler::CheckExtendedCommand() complete") ));
  1095     FTRACE(FPrint( _L("CDunAtCmdHandler::CheckExtendedCommand() complete") ));