MOCREngineBase Class Reference

API published in: S60 3rd Ed FP 1

Link against: ocrsrv.lib

Capability Information

Required Capabilities

None


#include <ocrsrv.h>

Detailed Description

OCR (Optical Character Recognition) Engine Base.

Base class of the OCR engine, this offers definitions of the features which all engines shall give support


Public Member Functions

virtual TVersion  GetVersion () const =0
  Get the current version of the OCR interfaces.
virtual void  RefreshInstalledLanguageL ()=0
  This interface refreshes the installed language packages.
virtual void  SetActiveLanguageL (const RArray< TLanguage > &aActiveLanguage)=0
  This method sets the languages for the recognition, maximum 2 languages can be passed together, regardless of their position in the array.
virtual void  GetInstalledLanguage (RArray< TLanguage > &aLanguages) const =0
  This method gets the languages which are currently installed and supported.
virtual void  CancelOperation ()=0
  This method cancels the recognition Call to this method the process will be terminated, and a KErrCancel flag will be passed to MOCREngineObserver's observers and through the aError parameter.
virtual TBool  IsLanguageSupported (const TLanguage aLanguage)=0
  This method judges whether a language is supported.
virtual TBool  IsEngineActive () const =0
  This method tests whether the engine is working or not Typically you could call this method to test whether there is an outstanding request or not.

Member Function Documentation

virtual void MOCREngineBase::CancelOperation  )  [pure virtual]
 

This method cancels the recognition Call to this method the process will be terminated, and a KErrCancel flag will be passed to MOCREngineObserver's observers and through the aError parameter.

Call this method when the engine is not working will not take any effect, this method internally calls IsEngineActive method

See also:
MOCREngineObserver
Returns:
None
virtual void MOCREngineBase::GetInstalledLanguage RArray< TLanguage > &  aLanguages  )  const [pure virtual]
 

This method gets the languages which are currently installed and supported.

Parameters:
aLanguages  Array of installed languages
See also:
SetActiveLanguageL
Returns:
None
virtual TVersion MOCREngineBase::GetVersion  )  const [pure virtual]
 

Get the current version of the OCR interfaces.

Returns:
Current version
virtual TBool MOCREngineBase::IsEngineActive  )  const [pure virtual]
 

This method tests whether the engine is working or not Typically you could call this method to test whether there is an outstanding request or not.

Note that when you are trying to exit the application when there's an outstanding issue, you should first call this method and call CancelOperation method before really terminate the client application

Returns:
ETrue if the engine is working; EFalse otherwise
virtual TBool MOCREngineBase::IsLanguageSupported const TLanguage  aLanguage  )  [pure virtual]
 

This method judges whether a language is supported.

Parameters:
aLanguage  A language specifed
Returns:
ETrue if supported; EFalse otherwise
virtual void MOCREngineBase::RefreshInstalledLanguageL  )  [pure virtual]
 

This interface refreshes the installed language packages.

The OCR engine supports the languages to be installed as SIS packages and can be installed or uninstalled dynamically. This method shall be called after changes made on the installed language packages

Leave:
KErrNotFound No OCR engine found
Returns:
None
virtual void MOCREngineBase::SetActiveLanguageL const RArray< TLanguage > &  aActiveLanguage  )  [pure virtual]
 

This method sets the languages for the recognition, maximum 2 languages can be passed together, regardless of their position in the array.

Parameters:
aActiveLanguage  Array of specified languages
See also:
GetInstalledLanguage
Returns:
None
Leave:
KErrArgument Language count is more than two
Leave:
KErrNotSupported The language is not supported by current OCR engine
Leave:
KErrOcrBadLanguage Unsupported language
Leave:
KErrOcrBadDictFile Not set any language packages

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top