MPtiCore Class Reference

#include <mw/PtiCore.h>

class MPtiCore
Public Member Functions
pure virtual TInt AddUserDictionaryEntry(MPtiUserDictionaryEntry &, CPtiUserDictionary *)
pure virtual voidAppendKeyPress(TPtiKey)
pure virtual TInt AttachUserDictionary(CPtiUserDictionary *)
pure virtual TInt CancelTimerActivity()
pure virtual voidClearBuffer()
pure virtual TInt CloseLanguageL()
pure virtual TInt CommitCurrentWord()
pure virtual MPtiEngineCompositionDataInterface *CompositionData()
pure virtual TInt Convert(TPtiCharConversion, TAny *, TInt, TAny *)
pure virtual CPtiUserDictionary *CreateEmptyUserDictionaryL(TInt)
pure virtual voidDeleteKeyPress()
pure virtual TBool DetachUserDictionary(CPtiUserDictionary *)
pure virtual voidDropLanguages(CArrayPtrFlat< CPtiCoreLanguage > *)
pure virtual TInt GetCandidateListL(CDesCArray &)
pure virtual TPtrC GetCandidatePage()
pure virtual HBufC *GetCandidatesByInputString(const TDesC &, RPointerArray< HBufC > &, const TBool)
pure virtual MPtiCoreInfo *GetCoreInfo()
pure virtual TPtrC GetCurrentWord()
pure virtual TInt GetFirstCandidate(TDes &)
pure virtual TInt GetNextCandidate(TDes &)
pure virtual TInt GetNextWordCandidateListL(CDesCArray &)
pure virtual TPtrC GetPhoneticSpelling(TInt)
pure virtual TInt GetPreviousCandidate(TDes &)
pure virtual TInt GetSpelling(TUint16, TDes &, TPtiSpelling)
pure virtual TInt GetUserDictionaryEntry(TInt, MPtiUserDictionaryEntry &, CPtiUserDictionary *)
pure virtual TInt HandleCommandL(TPtiEngineCommand, TAny *)
pure virtual voidInitializeL(CPtiEngine *, TDes *, CArrayPtrFlat< CPtiCoreLanguage > *, TBool)
pure virtual TBool IsToneMarkValidForSpelling()
pure virtual TBool MoreCandidatePages()
pure virtual TBool NextCandidatePage()
pure virtual TInt NumberOfCandidates()
pure virtual TInt NumberOfEntriesInUserDictionary(CPtiUserDictionary *)
pure virtual TInt OpenLanguageL(CPtiCoreLanguage *)
pure virtual TInt PhoneticSpellingCount()
pure virtual TBool PreviousCandidatePage()
pure virtual TPtrC ReadingTextL()
pure virtual TInt RemoveUserDictionaryEntry(MPtiUserDictionaryEntry &, CPtiUserDictionary *)
pure virtual TBool SelectPhoneticSpelling(TInt)
pure virtual TInt SelectedPhoneticSpelling()
pure virtual voidSetCandidatePageLength(TInt)
pure virtual TInt SetCurrentInputSequence(TPtrC8)
pure virtual TInt SetExternalKeyMapL(TPtiEngineInputMode, TPtiKey, TDesC &, TPtiTextCase)
pure virtual TBool SetPredictiveChineseChar(const TDesC &)
pure virtual TInt SetReordering(TBool)
pure virtual TBool SetToneMark(TInt)
pure virtual TBool ToneMark(TText &)

Detailed Description

This is abstract base class of all PtiEngine core objects. A PtiEngine core object implements set of input modes and input related services for a set of languages. This class defines core side PtiEngine API.

Member Function Documentation

AddUserDictionaryEntry ( MPtiUserDictionaryEntry &, CPtiUserDictionary * )

TInt AddUserDictionaryEntry(MPtiUserDictionaryEntry &aEntry,
CPtiUserDictionary *aDict
)[pure virtual]

AppendKeyPress ( TPtiKey )

voidAppendKeyPress(TPtiKeyaKey)[pure virtual]

This is the single most important core API method, most of the text input functionality will be utilize this method. Call to this method indicates core object that a key was pressed and it should act accordingly and fill the output buffer.

Since
2.6
ParameterDescription
aKeyEnum value for pressed key.

AttachUserDictionary ( CPtiUserDictionary * )

TInt AttachUserDictionary(CPtiUserDictionary *aDict)[pure virtual]

CancelTimerActivity ( )

TInt CancelTimerActivity()[pure virtual]

Cancels all on-going core obejct timner activity.

Since
2.6

Returns: KErrNone or system wide error code.

ClearBuffer ( )

voidClearBuffer()[pure virtual]

Call to this method notifys core object that input buffer was cleared.

Since
2.6

CloseLanguageL ( )

TInt CloseLanguageL()[pure virtual]

Closes currently activate language and frees resources associated to it.

Since
2.6

Returns: KErrNone of system wide error ocde.

CommitCurrentWord ( )

TInt CommitCurrentWord()[pure virtual]

Commits current word. Commiting means that user has added current word as part of text. Frequency information and other related attributes can then be updated.

Since
2.6

Returns: KErrNone or a system wide error code.

CompositionData ( )

MPtiEngineCompositionDataInterface *CompositionData()[pure virtual]

Convert ( TPtiCharConversion, TAny *, TInt, TAny * )

TInt Convert(TPtiCharConversionaType,
TAny *aInput,
TIntaInputLength,
TAny *aOutput
)[pure virtual]

Converts given string from one character set to another. Possible conversion types are defined in PtiDefs.h

Since
2.6
ParameterDescription
aTypeConversion type.
aInputPointer to input string to be converted.
aInputLengthLength of input buffer.
aOutputpointer to output buffer.

Returns: KErrNone or a system wide error code.

CreateEmptyUserDictionaryL ( TInt )

CPtiUserDictionary *CreateEmptyUserDictionaryL(TIntaMaxSize)[pure virtual]

DeleteKeyPress ( )

voidDeleteKeyPress()[pure virtual]

Indicates core object that it should perform 'delete key press'-operation.

Since
2.6

DetachUserDictionary ( CPtiUserDictionary * )

TBool DetachUserDictionary(CPtiUserDictionary *aDict)[pure virtual]

DropLanguages ( CArrayPtrFlat< CPtiCoreLanguage > * )

voidDropLanguages(CArrayPtrFlat< CPtiCoreLanguage > *aLanguageList)[pure virtual]

Removes languages associated to this core object from given language list. Languages not associated to this core abject are not touched.

Since
2.6
ParameterDescription
aLanguageListA language list to be cleaned.

GetCandidateListL ( CDesCArray & )

TInt GetCandidateListL(CDesCArray &aList)[pure virtual]

Returns a list of candidate words for currently entered key sequence.

Since
2.6
ParameterDescription
aListA list to be filled with candidate words.

Returns: Number of candidate works in aList.

GetCandidatePage ( )

TPtrC GetCandidatePage()[pure virtual]

GetCandidatesByInputString ( const TDesC &, RPointerArray< HBufC > &, const TBool )

HBufC *GetCandidatesByInputString(const TDesC &aInputString,
RPointerArray< HBufC > &aList,
const TBoolaIsPredictive
)[pure virtual]

GetCoreInfo ( )

MPtiCoreInfo *GetCoreInfo()[pure virtual]

Returns a pointer core info structure. Core info struct contains useful information about core object and its features.

GetCurrentWord ( )

TPtrC GetCurrentWord()const [pure virtual]

Returns the contents of text buffer.

Since
2.6

Returns: A constant pointer to text buffer.

GetFirstCandidate ( TDes & )

TInt GetFirstCandidate(TDes &aResult)[pure virtual]

Returns first word in list of candidate words for current input sequence.

Since
2.6
ParameterDescription
aResultA descriptor where resulting word will be stored.

Returns: KErrnNone or system wide error code.

GetNextCandidate ( TDes & )

TInt GetNextCandidate(TDes &aResult)[pure virtual]

Returns next word in list of candidate words for current input sequence.

Since
2.6
ParameterDescription
aResultA descriptor where resulting word will be stored.

Returns: KErrnNone or system wide error code.

GetNextWordCandidateListL ( CDesCArray & )

TInt GetNextWordCandidateListL(CDesCArray &aList)[pure virtual]

Returns next word candidate list. Next word candidates are words potentially related to currently selected candidate. Next word prediction feature must supported by the engine and turned on.

Since
2.6

GetPhoneticSpelling ( TInt )

TPtrC GetPhoneticSpelling(TIntaIndex)const [pure virtual]

GetPreviousCandidate ( TDes & )

TInt GetPreviousCandidate(TDes &aResult)[pure virtual]

Returns previous word in list of candidate words for current input sequence.

Since
2.6
ParameterDescription
aResultA descriptor where resulting word will be stored.

Returns: KErrnNone or system wide error code.

GetSpelling ( TUint16, TDes &, TPtiSpelling )

TInt GetSpelling(TUint16aInput,
TDes &aOutput,
TPtiSpellingaType
)[pure virtual]

Returns alternate spelling for given unicode characters. Possible conversion types are defined in header PtiDefs.h.

2.6 A character to be converted. Resulting alternate spelling will be stored here. Spelling conversion type.

Returns: KErrNone or system wide error code.

GetUserDictionaryEntry ( TInt, MPtiUserDictionaryEntry &, CPtiUserDictionary * )

TInt GetUserDictionaryEntry(TIntaIndex,
MPtiUserDictionaryEntry &aResult,
CPtiUserDictionary *aDict
)[pure virtual]

HandleCommandL ( TPtiEngineCommand, TAny * )

TInt HandleCommandL(TPtiEngineCommandaCommand,
TAny *aParams
)[pure virtual]

A generic command handling method for extending PtiEngine API without adding new base class methods. It is recommended to use this only in force major situations, where there is no other way.

Since
2.6
ParameterDescription
aCommandA Command id value. Platform wide command ids are defined in PtiDefs.h.
aParamsTAny pointer for passing any required parameters.

Returns: An integer containing possible return value related to command.

InitializeL ( CPtiEngine *, TDes *, CArrayPtrFlat< CPtiCoreLanguage > *, TBool )

voidInitializeL(CPtiEngine *aOwner,
TDes *aTextBuffer,
CArrayPtrFlat< CPtiCoreLanguage > *aLanguageList,
TBoolaUseDefautUserDictionary
)[pure virtual]

Initialized core object. This method is called by PtiEngine framework when core object is loaded.

Since
2.6
ParameterDescription
aOwnerPointer to onwing PtiEngine framework instance.
aTextBufferA pointer to PtiEngine main text buffer.
aLanguageListA language list to be filled with language bindings to this core onbject
aUseDefautUserDictionaryA boolean value indicating whether default user dictionary shoulkd be used (in case this core object supports user dictionaries).

IsToneMarkValidForSpelling ( )

TBool IsToneMarkValidForSpelling()[pure virtual]

MoreCandidatePages ( )

TBool MoreCandidatePages()[pure virtual]

NextCandidatePage ( )

TBool NextCandidatePage()[pure virtual]

NumberOfCandidates ( )

TInt NumberOfCandidates()[pure virtual]

Returns number of candidates for currently entered key sequence.

Since
2.6

Returns: Number of prediction candidates for currently entered key sequence.

NumberOfEntriesInUserDictionary ( CPtiUserDictionary * )

TInt NumberOfEntriesInUserDictionary(CPtiUserDictionary *aDict)[pure virtual]

OpenLanguageL ( CPtiCoreLanguage * )

TInt OpenLanguageL(CPtiCoreLanguage *aLanguage)[pure virtual]

Opens resources for given language and itinialized them.

Since
2.6
ParameterDescription
aLanguageSymbian OS language code a language to be initialized.

Returns: KErrNone or a system wide error code.

PhoneticSpellingCount ( )

TInt PhoneticSpellingCount()const [pure virtual]

PreviousCandidatePage ( )

TBool PreviousCandidatePage()[pure virtual]

ReadingTextL ( )

TPtrC ReadingTextL()[pure virtual]

RemoveUserDictionaryEntry ( MPtiUserDictionaryEntry &, CPtiUserDictionary * )

TInt RemoveUserDictionaryEntry(MPtiUserDictionaryEntry &aEntry,
CPtiUserDictionary *aDict
)[pure virtual]

SelectPhoneticSpelling ( TInt )

TBool SelectPhoneticSpelling(TIntaIndex)[pure virtual]

SelectedPhoneticSpelling ( )

TInt SelectedPhoneticSpelling()const [pure virtual]

SetCandidatePageLength ( TInt )

voidSetCandidatePageLength(TIntaLength)[pure virtual]

SetCurrentInputSequence ( TPtrC8 )

TInt SetCurrentInputSequence(TPtrC8aInput)[pure virtual]

Sets current input sequence. The end result of this operation must be same as if user had entered keys in input array as individual key presses.

Since
2.6
ParameterDescription
aInputAn array containing sequence of key presses (type TPtiKey).

Returns: KErrNone or a system wide error code.

SetExternalKeyMapL ( TPtiEngineInputMode, TPtiKey, TDesC &, TPtiTextCase )

TInt SetExternalKeyMapL(TPtiEngineInputModeaMode,
TPtiKeyaKey,
TDesC &aKeyMap,
TPtiTextCaseaCase
)[pure virtual]

Re-defines keymappings for given key / input mode / case combination. Previous keymapping will be deleted and new mappings will be used instead.

Since
2.6
ParameterDescription
aModeInput mode for new key mapping.
aKeyA key to be replaced.
aKeyMapNew keymapping data for aKey.
aCaseText case to be replaced.

Returns: KErrNone or system wide error code.

SetPredictiveChineseChar ( const TDesC & )

TBool SetPredictiveChineseChar(const TDesC &aChar)[pure virtual]

SetReordering ( TBool )

TInt SetReordering(TBoolaStatus)[pure virtual]

Turns reoreding feature on or off. Reordering means that prediction engine maintains frequency information for used words and modifys the order of candidate list based on that information. This feature may not be supported by all prediction engines.

Since
2.6
ParameterDescription
aStatusNew status for reorderinf feature.

Returns: KErrNone or a system wide error code.

SetToneMark ( TInt )

TBool SetToneMark(TIntaToneMark)[pure virtual]

ToneMark ( TText & )

TBool ToneMark(TText &aToneMark)const [pure virtual]