CNssContextMgr Class Reference

class CNssContextMgr : public CActive
CContextMgr is the implementation class for MNssContextMgr interface. NssVASApi.lib
Since
2.8

Inherits from

Public Member Functions
~CNssContextMgr ()
void CancelGetContext ()
MNssContext * CreateContextL ()
TInt DeleteContext ( MNssDeleteContextClient *, MNssContext *)
void DoCancel ()
TInt GetContext ( MNssGetContextClient *, const TDesC &)
TInt GetContextList ( MNssGetContextClient *)
TMNssContextList * GetGlobalContexts ()
void HandleDeleteSrsDBCompleted ()
void HandleResetSrsDBCompleted ()
void HandleSaveSrsDBCompleted ()
void HandleSrsDBError ( MNssCoreSrsDBEventHandler::TNssSrsDBResult )
CNssContextMgr * NewL ( CNssVASDatabase *)
CNssContextMgr * NewLC ( CNssVASDatabase *)
TInt ResetFactoryModels ( MNssResetFactoryModelsClient *)
TInt RunError ( TInt )
void RunL ()
TInt SaveClientData ( MNssContext *)
TInt SaveContext ( MNssSaveContextClient *, MNssContext *)
TBool TagExist ( CNssContext *)
void VASDatabaseComplete ( CArrayPtrFlat < CNssContext > *, CArrayPtrFlat < CNssTag > *, CArrayPtrFlat < CNssTagReference > *, TNssVASDBClientReturnCode)
Private Member Functions
CNssContextMgr ()
CNssContextMgr ( CNssVASDatabase *)
void CNssContextListToMNssContextListConvertorL ( CArrayPtrFlat < CNssContext > *)
void ConstructL ()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum TNssCallBackState {
ENone , EGetContextClientGetContext , EGetContextClientGetContextList , EDeleteContextClient , ESaveContextClient , ESaveClientDataClient , EInterCompContextMgrClientGetContext , EInterCompContextMgrClientGetContextList , EInterCompContextMgrClientGetGlobalContexts
}
Inherited Enumerations
CActive:TPriority
Private Attributes
CNssContextBuilder * iContextBuilder
CArrayPtrFlat < CNssContext > * iContextList
MNssDeleteContextClient * iDeleteContextClient
MNssGetContextClient * iGetContextClient
MNssInterCompContextMgrClient * iInterCompContextMgrClient
TUint32 iLexiconId
CNssContext * iLocalContext
TBool iModelBankAndLexiconExist
TSIModelBankID iModelBankId
TBool iRecovery
MNssResetFactoryModelsClient * iResetClient
MNssSaveContextClient * iSaveContextClient
TNssCallBackState iState
CNssVASDatabase * iVasDatabase
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CNssContextMgr()

CNssContextMgr ( ) [private]

C++ Constructor.

CNssContextMgr(CNssVASDatabase *)

CNssContextMgr ( CNssVASDatabase * aVASDatabase ) [private]

C++ overloaded Constructor.

Parameters

CNssVASDatabase * aVASDatabase

~CNssContextMgr()

~CNssContextMgr ( )

Destructor.

Member Functions Documentation

CNssContextListToMNssContextListConvertorL(CArrayPtrFlat< CNssContext > *)

void CNssContextListToMNssContextListConvertorL ( CArrayPtrFlat < CNssContext > * aSourceList ) [private]

Utility function for CContext to MNssContext List conversion, and call back to client

Parameters

CArrayPtrFlat < CNssContext > * aSourceList a CContext list

CancelGetContext()

void CancelGetContext ( )
Cancel get context / get context list / get global contexts
Since
2.8

ConstructL()

void ConstructL ( ) [private]

Symbian constructor

CreateContextL()

MNssContext * CreateContextL ( )
Creates an empty context object
Since
2.8

DeleteContext(MNssDeleteContextClient *, MNssContext *)

TInt DeleteContext ( MNssDeleteContextClient * aContextClient,
MNssContext * aContext
)
DeleteContext is called to remove a context from the VAS DB. This method is asynchronous. A call back will be made to either DeleteContextCompleted() or DeleteContextFailed() as defined in the MNssDeleteContextClient interface. It also returns an error code validating success of call to VAS DB.
Since
2.8

Parameters

MNssDeleteContextClient * aContextClient - call back address
MNssContext * aContext - context object to delete

DoCancel()

void DoCancel ( ) [virtual]
Look at CActive documentation for exaplanation. CActive
Since
2.8

GetContext(MNssGetContextClient *, const TDesC &)

TInt GetContext ( MNssGetContextClient * aContextClient,
const TDesC & aName
)
GetContext is called to retrieve a context from the VAS DB. This method is asynchronous. A call back will be made to either GetContextCompleted() or GetContextFailed() as defined in the MNssGetContextClient interface. It also returns an error code validating success of call to VAS DB.
Since
2.8

Parameters

MNssGetContextClient * aContextClient - call back address
const TDesC & aName - name of context to retreive

GetContextList(MNssGetContextClient *)

TInt GetContextList ( MNssGetContextClient * aContextClient )
GetContextList is called to retrieve a context list from the VAS DB. This method is asynchronous. A call back will be made to either GetContextListCompleted() or GetContextFailed() as defined in the MNssGetContextClient interface. It also returns an error code validating success of call to VAS DB.
Since
2.8

Parameters

MNssGetContextClient * aContextClient - call back address

GetGlobalContexts()

TMNssContextList * GetGlobalContexts ( )
GetGlobalContexts is called to get the list of global contexts in VAS DB. This method is synchronous (It used to be asynchronous before 2.8. A call back was made to either GetGlobalContextsCompleted() or GetContextFailed() as defined in the MNssInterCompContextMgrClient interface. It also returned an error code validating success of call to VAS DB). This method is for use by internal VAS components.
Since
2.8

HandleDeleteSrsDBCompleted()

void HandleDeleteSrsDBCompleted ( )
Call back function from SRS DB, through interface MNssCoreSrsDBEventHandler Called after deleting from SRS DB is successful
Since
2.8

HandleResetSrsDBCompleted()

void HandleResetSrsDBCompleted ( )
Call back function from SRS DB, through interface MNssCoreSrsDBEventHandler Called after deleting from SRS DB is successful
Since
2.8

HandleSaveSrsDBCompleted()

void HandleSaveSrsDBCompleted ( )
Call back function from SRS DB, through interface MNssCoreSrsDBEventHandler Called after saving to SRS DB is successful
Since
2.8

HandleSrsDBError(MNssCoreSrsDBEventHandler::TNssSrsDBResult)

void HandleSrsDBError ( MNssCoreSrsDBEventHandler::TNssSrsDBResult aResult )
Call back function from SRS DB, through interface MNssCoreSrsDBEventHandler Called after saving or deleting to SRS DB is unsuccessful
Since
2.8

Parameters

MNssCoreSrsDBEventHandler::TNssSrsDBResult aResult result code

NewL(CNssVASDatabase *)

CNssContextMgr * NewL ( CNssVASDatabase * aVASDatabase ) [static]

2 Phase construction

Parameters

CNssVASDatabase * aVASDatabase - Reference to the database.

NewLC(CNssVASDatabase *)

CNssContextMgr * NewLC ( CNssVASDatabase * aVASDatabase ) [static]

2 Phase construction

Parameters

CNssVASDatabase * aVASDatabase - Reference to the database.

ResetFactoryModels(MNssResetFactoryModelsClient *)

TInt ResetFactoryModels ( MNssResetFactoryModelsClient * aClient )
Deletes the speaker adapted models and creates new, speaker independent ones. Asynchronous.
Since
2.8

Parameters

MNssResetFactoryModelsClient * aClient Callback to signal success or failure

RunError(TInt)

TInt RunError ( TInt aError ) [virtual]
Error handler if RunL leaves. CActive
Since
2.8

Parameters

TInt aError

RunL()

void RunL ( ) [virtual]
Look at CActive documentation for exaplanation. CActive
Since
2.8

SaveClientData(MNssContext *)

TInt SaveClientData ( MNssContext * aContext )

SaveClientData is called to save client-specific data about the context. This method is asynchronous. A call back will be made to either SaveContextCompleted or SaveContextFailed() as defined in the MNssSaveContextClient interface. It also returns an error code validating success of call to VAS DB.

VasMNssContextMgr
Since
2.8

Parameters

MNssContext * aContext - the client data of this context will be updated.

SaveContext(MNssSaveContextClient *, MNssContext *)

TInt SaveContext ( MNssSaveContextClient * aContextClient,
MNssContext * aContext
)
SaveContext is called to store a context to the VAS DB. This method is asynchronous. A call back will be made to either SaveContextCompleted() or SaveContextFailed() as defined in the MNssSaveContextClient interface. It also returns an error code validating success of call to VAS DB.
Since
2.8

Parameters

MNssSaveContextClient * aContextClient - call back address
MNssContext * aContext - context object to save

TagExist(CNssContext *)

TBool TagExist ( CNssContext * aContext )
Determine if tag exists in the VAS Database for a context
Since
2.8

Parameters

CNssContext * aContext

VASDatabaseComplete(CArrayPtrFlat< CNssContext > *, CArrayPtrFlat< CNssTag > *, CArrayPtrFlat< CNssTagReference > *, TNssVASDBClientReturnCode)

void VASDatabaseComplete ( CArrayPtrFlat < CNssContext > * aContextList,
CArrayPtrFlat < CNssTag > * aTagList,
CArrayPtrFlat < CNssTagReference > * aTagRefList,
TNssVASDBClientReturnCode aCode
)
Call back function from CVASDatabase, through interface MNssVASDatabaseClient
Since
2.8

Parameters

CArrayPtrFlat < CNssContext > * aContextList - list of contexts
CArrayPtrFlat < CNssTag > * aTagList - list of tags (not used by context manager)
CArrayPtrFlat < CNssTagReference > * aTagRefList - list of tag references
TNssVASDBClientReturnCode aCode - success status

Member Enumerations Documentation

Enum TNssCallBackState

Enumerators

ENone
EGetContextClientGetContext
EGetContextClientGetContextList
EDeleteContextClient
ESaveContextClient
ESaveClientDataClient
EInterCompContextMgrClientGetContext
EInterCompContextMgrClientGetContextList
EInterCompContextMgrClientGetGlobalContexts

Member Data Documentation

CNssContextBuilder * iContextBuilder

CNssContextBuilder * iContextBuilder [private]

CArrayPtrFlat< CNssContext > * iContextList

CArrayPtrFlat < CNssContext > * iContextList [private]

MNssDeleteContextClient * iDeleteContextClient

MNssDeleteContextClient * iDeleteContextClient [private]

MNssGetContextClient * iGetContextClient

MNssGetContextClient * iGetContextClient [private]

MNssInterCompContextMgrClient * iInterCompContextMgrClient

MNssInterCompContextMgrClient * iInterCompContextMgrClient [private]

TUint32 iLexiconId

TUint32 iLexiconId [private]

CNssContext * iLocalContext

CNssContext * iLocalContext [private]

TBool iModelBankAndLexiconExist

TBool iModelBankAndLexiconExist [private]

TSIModelBankID iModelBankId

TSIModelBankID iModelBankId [private]

TBool iRecovery

TBool iRecovery [private]

MNssResetFactoryModelsClient * iResetClient

MNssResetFactoryModelsClient * iResetClient [private]

MNssSaveContextClient * iSaveContextClient

MNssSaveContextClient * iSaveContextClient [private]

TNssCallBackState iState

TNssCallBackState iState [private]

CNssVASDatabase * iVasDatabase

CNssVASDatabase * iVasDatabase [private]