CNssContext Class Reference

class CNssContext : public CBase
CContext is the implementation class for MNssContext. It encapsulates context data. A context cannot be directly created by a client. A client has to own an instance of Context Manager which has methods for creating context objects. The CContext class also provides additional members for internal use by NssVAS. NssVASApi.lib
Since
2.0

Inherits from

Constructor & Destructor Documentation

CNssContext(CNssContextSrsPortal *)

CNssContext(CNssContextSrsPortal *aContextSrsPortal)

C++ constructor.

Parameters

CNssContextSrsPortal * aContextSrsPortal

~CNssContext()

~CNssContext()

Destructor.

Member Functions Documentation

BeginDeleteFromSrsL(MNssCoreSrsDBEventHandler *)

voidBeginDeleteFromSrsL(MNssCoreSrsDBEventHandler *aSrsDBEventHandler)
Delete the context from the SRS. for internal use deletes grammar from SRS
Since
2.0

Parameters

MNssCoreSrsDBEventHandler * aSrsDBEventHandler

BeginSaveToSrsL(MNssCoreSrsDBEventHandler *)

voidBeginSaveToSrsL(MNssCoreSrsDBEventHandler *aSrsDBEventHandler)
Save the context to the SRS. for internal use This method is used to save the context to the SRS. This creates the model bank, lexicon, and grammar for a context. Model bank, and lexicon are created only for the first time, and are thus, fixed. For every context, there is one grammar id. After, model bank, lexicon, and grammar are created, the corresponding Ids are set in the context object.
Since
2.0

Parameters

MNssCoreSrsDBEventHandler * aSrsDBEventHandler

ClientData()

const TDesC8 &ClientData()
Gets the client data.
Since
2.8

CommitSrsChanges()

TInt CommitSrsChanges()
Commit the context from the SRS. for internal use Commit the changes from SRS
Since
2.0

ContextId()

TInt ContextId()const
Get the context id for internal use
Since
2.0

ContextName()

TDesC &ContextName()
Get the name of the context
Since
2.0

CopyL()

CNssContext *CopyL()
Create a copy of the context. for internal use This function creates a new context by allocating memory for a new context, and deep copying the members of the context on which this fucntion is called. Old context and new context exist. Client need to deallocate memory.
Since
2.0

GrammarId()

TUint32 GrammarId()const
Get the grammar id for internal use
Since
2.0

IsGlobal()

TBool IsGlobal()
Is the context global
Since
2.0

LexiconId()

TUint32 LexiconId()const
Get the lexicon id for internal use
Since
2.0

ModelBankAndLexiconExist()

TBool ModelBankAndLexiconExist()
Get the iModelBankAndLexiconExist flag for internal use
Since
2.0

ModelBankId()

TUint32 ModelBankId()const
Get the model bank id for internal use
Since
2.0

RecognitionMode()

TNSSRecognitionMode RecognitionMode()const
Get the recognition mode for internal use
Since
2.8

RollbackSrsChanges()

TInt RollbackSrsChanges()
Don't commit the context from the SRS. for internal use Doesn't commit the changes from SRS
Since
2.8

SetClientData(const TDesC8 &)

voidSetClientData(const TDesC8 &aData)
Sets/Resets the client data. The data must be saved with MNssContextMgr::SaveClientData after this call.
Since
2.8

Parameters

const TDesC8 & aDataAt most 100 bytes of serialized client data.

SetContextId(TInt)

voidSetContextId(TIntaContextId)
Set the context id for internal use
Since
2.0

Parameters

TInt aContextId- the context id

SetGlobal(TBool)

voidSetGlobal(TBoolaGlobal)
Sets/Resets the global flag for the context
Since
2.0

Parameters

TBool aGlobalETrue to set the context as global, EFalse as not global

SetGrammarId(TUint32)

voidSetGrammarId(TUint32aGrammarId)
Set the grammar id for internal use
Since
2.0

Parameters

TUint32 aGrammarId- the grammar id

SetLexiconId(TUint32)

voidSetLexiconId(TUint32aLexiconId)
Set the lexicon id for internal use
Since
2.0

Parameters

TUint32 aLexiconId- the lexicon id

SetModelBankAndLexiconExist(TBool)

voidSetModelBankAndLexiconExist(TBoolaVal)
Set/Reset the iModelBankAndLexiconExist flag. for internal use
Since
2.0

Parameters

TBool aVal

SetModelBankId(TUint32)

voidSetModelBankId(TUint32aModelBankId)
Set the model bank id for internal use
Since
2.0

Parameters

TUint32 aModelBankId- the model bank id

SetNameL(const TDesC &)

voidSetNameL(const TDesC &aName)
Sets the name of the context
Since
2.0

Parameters

const TDesC & aNamename of the context as a descriptor

SetRecognitionMode(TNSSRecognitionMode)

voidSetRecognitionMode(TNSSRecognitionModeaRecognitionMode)
Set the speech technology (Speaker independent or dependent) for internal use
Since
2.0

Parameters

TNSSRecognitionMode aRecognitionMode- the recognition mode

operator=(const CNssContext &)

CNssContext &operator=(const CNssContext &aContext)
overloaded assignment operator for internal use
Since
2.0

Parameters

const CNssContext & aContext

Member Data Documentation

TBuf8< 100 > iClientData

TBuf8< 100 >iClientData[private]

TInt iContextId

TInt iContextId[private]

CNssContextSrsPortal * iContextSrsPortal

CNssContextSrsPortal *iContextSrsPortal[private]

TBool iGlobal

TBool iGlobal[private]

TUint32 iGrammarId

TUint32 iGrammarId[private]

TUint32 iLexiconId

TUint32 iLexiconId[private]

TBool iModelBankAndLexiconExist

TBool iModelBankAndLexiconExist[private]

TUint32 iModelBankId

TUint32 iModelBankId[private]

HBufC * iName

HBufC *iName[private]

TNSSRecognitionMode iRecognitionMode

TNSSRecognitionMode iRecognitionMode[private]