示例#1
0
TDataRecognitionResult CApaAppListServer::RecognizeDataL(RFile& aFile, TInt aPreferredBufSize)
	{
	CRecognitionResult* result = RecognizeDataAsCRecognitionResultL(aFile, aPreferredBufSize);
	TDataRecognitionResult ret;
	result->Get(ret);
	result->Close();
	return ret;
	}
示例#2
0
/**
Searches the cache for the particular recognition result. If the file was not modified since the
file was recognized, the stored recognition result is returned.
@internalComponent
*/
TBool CApsRecognitionCache::Get(const TDesC& aDirectory, const TDesC& aFileName, TDataRecognitionResult& aRecognitionResult)
	{
	TTime lastModified;
	TFileName fileName(aDirectory);
	fileName.Append(aFileName);
	const TInt error = iFs.Modified(fileName, lastModified);
	if(error != KErrNone) 
		{
		return EFalse;
		}

	CRecognitionResult* result = DoGet(aDirectory, aFileName, lastModified);
	if(result)
		{
		result->Get(aRecognitionResult);
		result->Close(); // decrease reference count since we're not exposing the object
		return ETrue;
		}
	return EFalse;
	}