CApaDataRecognizerType Class Reference

class CApaDataRecognizerType : public CBase

Abstract base class for a recognizer.

Concrete recognizers need to define and implement a derived class; specifically, they need to provide an implementation of the DoRecognizeL(), SupportedDataTypeL() and PreferredBufSize() functions.

The class is implemented as part of a DLL. The ordinal 1 function of the DLL must construct an instance of, and return a pointer to, a CApaDataRecognizerType derived class.

Inherits from

  • CApaDataRecognizerType

Constructor & Destructor Documentation

CApaDataRecognizerType(TUid, TInt)

IMPORT_CCApaDataRecognizerType(TUidaUid,
TIntaPriority
)[protected]

Parameters

TUid aUid
TInt aPriority

~CApaDataRecognizerType()

IMPORT_C~CApaDataRecognizerType()

Member Functions Documentation

Confidence()

TInt Confidence()const [inline]

Gets the recognizer's confidence rating for the most recently recognized data.

The confidence rating. This is one of the TRecognitionConfidence enumeration values.

CApaDataRecognizerType::TRecognitionConfidence

iConfidence

CreateDataRecognizerL(TUid)

IMPORT_C CApaDataRecognizerType *CreateDataRecognizerL(TUidaImplUid)[static]

Parameters

TUid aImplUid

DataRecognizerExtension()

CDataRecognizerExtension *DataRecognizerExtension()

DoRecognizeL(const TDesC &, const TDesC8 &)

IMPORT_C voidDoRecognizeL(const TDesC &aName,
const TDesC8 &aBuffer
)[private, virtual]

Parameters

const TDesC & aName
const TDesC8 & aBuffer

FilePassedByHandleL()

IMPORT_C RFile *FilePassedByHandleL()[protected]

Lock()

IMPORT_C voidLock()

Locked()

TInt Locked()const [inline]

Tests whether the recognizer is locked.

If zero, the recognizer is not locked; if greater than 0, the recognizer is locked.

Lock()

Unlock()

MimeType()

IMPORT_C TDataTypeMimeType()

MimeTypesCount()

TInt MimeTypesCount()const [inline]

Gets the number of data (MIME) types supported by this recognizer.

The number of data types.

iCountDataTypes

PreferredBufSize()

IMPORT_C TUintPreferredBufSize()[virtual]

Priority()

TInt Priority()const [inline]

Gets the recognizer's priority.

The priority defines the likelihood that the recognizer will successfully identify data. This is one of the CApaDataRecognizerType::TRecognizerPriority enumerators.

The priority value.

CApaDataRecognizerType::TRecognizerPriority

RecognizeL(const TDesC &, const TDesC8 &)

IMPORT_C TDataRecognitionResultRecognizeL(const TDesC &aName,
const TDesC8 &aBuffer
)

Parameters

const TDesC & aName
const TDesC8 & aBuffer

RecognizeL(TDataToRecognize &)

TDataRecognitionResult RecognizeL(TDataToRecognize &aDataToRecognize)

Parameters

TDataToRecognize & aDataToRecognize

Reserved_1()

IMPORT_C voidReserved_1()[private, virtual]

SupportedDataTypeL(TInt)

IMPORT_C TDataTypeSupportedDataTypeL(TIntaIndex)const [pure virtual]

Gets one of the data (MIME) types that the recognizer can recognize.

The data (MIME) type.

Parameters

TInt aIndexAn index that identifies the data type. Typically, the minimum value is zero and the maximum value is the value of MimeTypesCount() - 1.

TypeUid()

TUid TypeUid()const [inline]

Gets the UID that identifies the recognizer.

The UID.

Unlock()

IMPORT_C voidUnlock()

UpdateDataTypesL()

IMPORT_C voidUpdateDataTypesL()

Member Enumerations Documentation

Enum TRecognitionConfidence

A set of values describing the probability that the recognizer assigns to its belief that the most recently sampled data is of the type ascribed to it.

Enumerators

ECertain = KMaxTInt

The data is definitely of the data type.

EProbable = 100

A level of confidence between ECertain and EPossible.

EPossible = 0

The data is possibly of the data type.

EUnlikely = -100

A level of confidence between EPossible and ENotRecognized.

ENotRecognized = KMinTInt

The data is not recognized.

Enum TRecognizerPriority

A set of values used to indicate the probability that the recognizer will successfully identify data. The Application Architecture framework uses this set to determine the order in which recognizers are invoked.

CApaDataRecognizerType()

Priority()

Enumerators

EHigh = 100

The highest recognizer priority. Recognizers with this priority are invoked before those with any other priority.

ENormal = 0

The normal recognizer priority. Recognizers with this priority are invoked after those with a EHigh priority but before those with a ELow priority.

ELow = -100

The lowest recognizer priority.

Member Data Documentation

TInt iConfidence

TInt iConfidence[protected]

The recognizer's confidence rating of the most recently recognized data.

Users of the derived class use Confidence() to get this value.

TInt iCountDataTypes

TInt iCountDataTypes[protected]

The number of data (MIME) types supported by this recognizer. Typically, this is set during construction of an instance of the derived class.

Users of the derived class use MimeTypesCount() to get this value.

CDataRecognizerExtension * iDataRecognizerExtn

CDataRecognizerExtension *iDataRecognizerExtn[private]

TDataType iDataType

TDataType iDataType[protected]

The data (MIME) type of the most recently recognized data.

Users of the derived class use MimeType() to get this value.

TInt iLock

TInt iLock[private]

const TInt iPriority

const TIntiPriority[protected]

const TUid iTypeUid

const TUidiTypeUid[protected]