mmlibs/mmfw/Recogniser/src/reader.cpp
changeset 58 b6dbf97aba93
parent 0 40261b775718
equal deleted inserted replaced
57:1cbb0d5bf7f2 58:b6dbf97aba93
   170 		
   170 		
   171 	iBufPos += aOffset;
   171 	iBufPos += aOffset;
   172 	return KErrNone;
   172 	return KErrNone;
   173 	}
   173 	}
   174 	
   174 	
       
   175 //
       
   176 // Skips forwards or backwards aOffset number of bytes.
       
   177 //
       
   178 TInt CReader::Seek(TInt64 aOffset)
       
   179     {
       
   180     TInt64 newBufPos = iBufPos + aOffset;
       
   181     
       
   182     if ((newBufPos < 0) || (newBufPos >= iBuffer.Length()))
       
   183         {
       
   184         // Trying to seek past the bounds of the buffer.
       
   185         return KErrUnderflow;
       
   186         }
       
   187         
       
   188     iBufPos += aOffset;
       
   189     return KErrNone;
       
   190     }
   175 
   191 
   176 
       
   177