predictivesearch/PcsUtils/src/CPcsDebug.cpp
branchRCL_3
changeset 6 e8e3147d53eb
parent 0 e686773b3f54
child 13 a6539d1e8e43
equal deleted inserted replaced
5:81f8547efd4f 6:e8e3147d53eb
   148 
   148 
   149 	PRINT2 ( _L("#### [%S] Latency Measurement End, Time taken = %d (ms) ####"), &buf, mytime );
   149 	PRINT2 ( _L("#### [%S] Latency Measurement End, Time taken = %d (ms) ####"), &buf, mytime );
   150 }
   150 }
   151 
   151 
   152 // ----------------------------------------------------------------------------
   152 // ----------------------------------------------------------------------------
   153 // CPcsDebug::PrintQuery
   153 // CPcsDebug::PrintQueryL
   154 // Prints the query as array of query items (query items cannot be spaces)
   154 // Prints the query as array of query items (query items cannot be spaces)
   155 // Used only for debugging
   155 // Used only for debugging
   156 // ----------------------------------------------------------------------------
   156 // ----------------------------------------------------------------------------
   157 EXPORT_C void CPcsDebug::PrintQueryL(const TDesC& aPreTxt, CPsQuery& aQuery)
   157 EXPORT_C void CPcsDebug::PrintQueryL(const TDesC& aPreTxt, CPsQuery& aQuery)
   158 {
   158 {
   159     for ( TInt i = 0; i < aQuery.Count(); i++ )
   159     for ( TInt i = 0; i < aQuery.Count(); i++ )
   160     {
   160     {
   161         TUint inputKey = aQuery.GetItemAtL(i).Character().GetUpperCase();
   161         CPsQueryItem& item = aQuery.GetItemAtL(i);
       
   162         TUint inputKey = item.Character().GetUpperCase();
   162         TBuf<2> buffer;
   163         TBuf<2> buffer;
   163         buffer.Format(_L("%c"), inputKey);
   164         buffer.Format(_L("%c"), inputKey);
   164         switch ( aQuery.GetItemAtL(i).Mode() )
   165         switch ( item.Mode() )
   165         {
   166         {
   166             case EItut:
   167             case ENonPredictive:
   167                 PRINT3 ( _L("%SQuery[%d].{Character.Up=%S, Mode=EItut}"), &aPreTxt, i, &buffer);
   168                 PRINT3 ( _L("%SQuery[%d].{Character.Up=%S, Mode=ENonPredictive}"),
   168                 break;
   169                          &aPreTxt, i, &buffer);
   169             case EQwerty:
   170                 break;
   170                 PRINT3 ( _L("%SQuery[%d].{Character.Up=%S, Mode=EQwerty}"), &aPreTxt, i, &buffer);
   171             case EPredictiveDefaultKeyboard:
   171                 break;          
   172                 PRINT3 ( _L("%SQuery[%d].{Character.Up=%S, Mode=EPredictiveDefaultKeyboard}"),
       
   173                          &aPreTxt, i, &buffer);
       
   174                 break;
       
   175             case EPredictiveItuT:
       
   176                 PRINT3 ( _L("%SQuery[%d].{Character.Up=%S, Mode=EPredictiveItuT}"),
       
   177                          &aPreTxt, i, &buffer);
       
   178                 break;
       
   179             case EPredictiveQwerty:
       
   180                 PRINT3 ( _L("%SQuery[%d].{Character.Up=%S, Mode=EPredictiveQwerty}"),
       
   181                          &aPreTxt, i, &buffer);
       
   182                 break;
   172             default:
   183             default:
   173                 PRINT3 ( _L("%SQuery[%d].{Character.Up=%S, Mode=EModeUndefined}"), &aPreTxt, i, &buffer);
   184                 PRINT4 ( _L("%SQuery[%d].{Character.Up=%S, Mode=%d (Error}"),
       
   185                          &aPreTxt, i, &buffer, item.Mode());
   174                 break;
   186                 break;
   175         }
   187         }
   176     }
   188     }
   177 }
   189 }
   178 
   190