CNssVASDatabase Class Reference

class CNssVASDatabase : public CBase

The CNssVasDatabase class definition.

NssVASApi.lib
Since
2.8

Inherits from

Public Member Functions
~CNssVASDatabase ()
void AddObserverL ( MNssVASDatabaseObserver *)
void CloseDatabase ()
TInt CreateDb ()
TInt DeleteContext (const TDesC &)
TInt DeleteContext ( CNssContext *)
TInt DeleteTag (const TDesC &)
TInt DeleteTag ( CNssTag *)
TInt DeleteTag (const TUint32 )
TInt DeleteTags (const RArray < TUint32 > &)
CArrayPtrFlat < CNssContext > * GetAllContexts ()
CArrayPtrFlat < CNssContext > * GetContext (const TDesC &)
TInt GetDefaultModelBankId ( TUint32 &)
CArrayPtrFlat < CNssContext > * GetGlobalContexts ()
MNssTagListArray * GetTag (const TDesC &)
MNssTagListArray * GetTag ( CNssContext *)
MNssTagListArray * GetTag (const TInt , const TInt )
MNssTagListArray * GetTag ( CNssContext *, const TDesC &)
MNssTagListArray * GetTag (const TUint32 )
MNssTagListArray * GetTagList ( CNssContext *, TInt , TInt )
MNssTagListArray * GetTagList ( CNssContext *, TDesC &, TInt )
CArrayPtrFlat < MNssTagReference > * GetTagReferenceList ( CNssContext *)
MNssTagListArray * GetTags ( TNssGrammarIdRuleIdListArray &)
TBool ModelBankAndLexiconExist ( TUint32 &, TUint32 &)
CNssVASDatabase * NewL ( TInt )
CNssVASDatabase * NewLC ( TInt )
TInt OpenDatabase ()
TInt RemoveObserver ( MNssVASDatabaseObserver *)
TInt ResetModelBank ( TUint32 )
TInt SaveContext ( CNssContext *, TInt &)
TInt SaveContextClientData ( CNssContext *)
TInt SaveTag ( CNssTag *, TInt &)
TInt SaveTags ( RPointerArray < CNssTag > *)
void StartMonitoringDatabaseL ()
TInt TagCount ( CNssContext *)
TBool TagExist ( CNssContext *)
TInt TransferContextList ()
TInt TransferTagList ()
TInt TransferTagReferenceList ()
TInt UpdateTagRuleIDs (const RArray < TNssSpeechItem > &)
Private Member Functions
CNssVASDatabase ( TInt )
void ConstructL ()
MNssVASDatabaseClient::TNssVASDBClientReturnCode ConvertDBError ( TInt )
void ConvertTNssTagRefToMNssTagRefL ( TNssTagReferenceListArray *, CArrayPtrFlat < MNssTagReference > *)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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()
Private Member Enumerations
enum TState {
EStateGetContext  = 0, EStateTransferContext , EStateGetTag , EStateTransferTag , EStateDeleteContext , EStateDeleteTag , EStateSaveContext , EStateSaveTag , EStateGetTagReference , EStateTransferTagReference
}
Private Attributes
CArrayPtrFlat < CNssContext > * iCNssContextList
CArrayPtrFlat < CNssTag > * iCNssTagList
CArrayPtrFlat < CNssTagReference > * iCNssTagRefList
TInt iConnected
CNssContextBuilder * iContextBuilder
TPckgCTNssGrammarIdRuleId * iGrammarIdRuleIdPackage
TBool iIsLocked
CNssSpeechItemBuilder * iSpeechItemBuilder
TInt iState
TNssGrammarIdRuleId iTNssGrammarIdRuleId
TNssTagReferenceListArray * iTNssTagRefList
TUint32 iTagId
CNssVASDBEventMonitor * iVASDBEventMonitor
CNssVasDb * iVasDb

Constructor & Destructor Documentation

CNssVASDatabase(TInt)

CNssVASDatabase ( TInt aPriority ) [private]

Parameters

TInt aPriority

~CNssVASDatabase()

~CNssVASDatabase ( )

Destructor

Member Functions Documentation

AddObserverL(MNssVASDatabaseObserver *)

void AddObserverL ( MNssVASDatabaseObserver * aObserver )
Method use to add observers to vas database.
Since
2.0

Parameters

MNssVASDatabaseObserver * aObserver

CloseDatabase()

void CloseDatabase ( )
Method to close vas database.
Since
2.0

ConstructL()

void ConstructL ( ) [private]

ConvertDBError(TInt)

MNssVASDatabaseClient::TNssVASDBClientReturnCode ConvertDBError ( TInt aError ) [private]

Parameters

TInt aError

ConvertTNssTagRefToMNssTagRefL(TNssTagReferenceListArray *, CArrayPtrFlat< MNssTagReference > *)

void ConvertTNssTagRefToMNssTagRefL ( TNssTagReferenceListArray * aTNssTagRef,
CArrayPtrFlat < MNssTagReference > * aCNssTagRef
) [private]

Parameters

TNssTagReferenceListArray * aTNssTagRef
CArrayPtrFlat < MNssTagReference > * aCNssTagRef

CreateDb()

TInt CreateDb ( )
Method to create vas database
Since
2.0

DeleteContext(const TDesC &)

TInt DeleteContext ( const TDesC & aName )
Method to delete context by name.
Since
2.0

Parameters

const TDesC & aName

DeleteContext(CNssContext *)

TInt DeleteContext ( CNssContext * aContext )
Method to delete context.
Since
2.0

Parameters

CNssContext * aContext

DeleteTag(const TDesC &)

TInt DeleteTag ( const TDesC & aName )
Method to delete tag by name.
Since
2.0

Parameters

const TDesC & aName

DeleteTag(CNssTag *)

TInt DeleteTag ( CNssTag * aTag )
Initiate the Select Tag event.
Since
2.0

Parameters

CNssTag * aTag The voice tag which was selected.

DeleteTag(const TUint32)

TInt DeleteTag ( const TUint32 aTagId )
Method to delete a tag by id
Since
2.0

Parameters

const TUint32 aTagId

DeleteTags(const RArray< TUint32 > &)

TInt DeleteTags ( const RArray < TUint32 > & aTagIdArray )
Method to delete several tags.
Since
2.8

Parameters

const RArray < TUint32 > & aTagIdArray

GetAllContexts()

CArrayPtrFlat < CNssContext > * GetAllContexts ( )
Method to get all contexts.
Since
2.0

GetContext(const TDesC &)

CArrayPtrFlat < CNssContext > * GetContext ( const TDesC & aName )
Method to get context by name
Since
2.0

Parameters

const TDesC & aName - The name of the context.

GetDefaultModelBankId(TUint32 &)

TInt GetDefaultModelBankId ( TUint32 & aId )
Method to get the default model bank id
Since
2.8

Parameters

TUint32 & aId reference where to put the model bank Id

GetGlobalContexts()

CArrayPtrFlat < CNssContext > * GetGlobalContexts ( )
Method to get all global contexts.
Since
2.0

GetTag(const TDesC &)

MNssTagListArray * GetTag ( const TDesC & aName )
Method to get a tag by name.
Since
2.0

Parameters

const TDesC & aName

GetTag(CNssContext *)

MNssTagListArray * GetTag ( CNssContext * aContext )
Initiate the Select Tag event.
Since
2.0

Parameters

CNssContext * aContext

GetTag(const TInt, const TInt)

MNssTagListArray * GetTag ( const TInt aGrammarID,
const TInt aRuleID
)
Method to get tag by grammar id and rule id.
Since
2.0

Parameters

const TInt aGrammarID
const TInt aRuleID

GetTag(CNssContext *, const TDesC &)

MNssTagListArray * GetTag ( CNssContext * aContext,
const TDesC & aName
)
Method to get a tag by context and name.
Since
2.0

Parameters

CNssContext * aContext - The context of the tag.
const TDesC & aName - The name of the tag.

GetTag(const TUint32)

MNssTagListArray * GetTag ( const TUint32 aTagId )
Method to get a tag by tagid.
Since
2.0

Parameters

const TUint32 aTagId - The tagid of the voice tag.

GetTagList(CNssContext *, TInt, TInt)

MNssTagListArray * GetTagList ( CNssContext * aContext,
TInt aNum,
TInt aPosition
)
Method to get tags based on a rrd int value and position
Since
2.0

Parameters

CNssContext * aContext
TInt aNum - The rrd int value
TInt aPosition - The int value position in the rrd intarray

GetTagList(CNssContext *, TDesC &, TInt)

MNssTagListArray * GetTagList ( CNssContext * aContext,
TDesC & aText,
TInt aPosition
)
Method to get tags based on a rrd text value and position
Since
2.0

Parameters

CNssContext * aContext
TDesC & aText - The rrd text value
TInt aPosition - The text value position in the rrd textarray

GetTagReferenceList(CNssContext *)

CArrayPtrFlat < MNssTagReference > * GetTagReferenceList ( CNssContext * aContext )

Parameters

CNssContext * aContext

GetTags(TNssGrammarIdRuleIdListArray &)

MNssTagListArray * GetTags ( TNssGrammarIdRuleIdListArray & aGrammarIdRuleIds )

Method to tags by theirgrammar id and rule id.

Parameters

TNssGrammarIdRuleIdListArray & aGrammarIdRuleIds

ModelBankAndLexiconExist(TUint32 &, TUint32 &)

TBool ModelBankAndLexiconExist ( TUint32 & aModelBankId,
TUint32 & aLexiconId
)
Method to determine if modelbank and lexicon ids exist.
Since
2.0

Parameters

TUint32 & aModelBankId
TUint32 & aLexiconId - The lexicon id

NewL(TInt)

CNssVASDatabase * NewL ( TInt aPriority ) [static]

Two-phased constructor.

Parameters

TInt aPriority

NewLC(TInt)

CNssVASDatabase * NewLC ( TInt aPriority ) [static]

Two-phased constructor.

Parameters

TInt aPriority

OpenDatabase()

TInt OpenDatabase ( )
Method to open vas database
Since
2.0

RemoveObserver(MNssVASDatabaseObserver *)

TInt RemoveObserver ( MNssVASDatabaseObserver * aObserver )
Method used to stop observering vas database.
Since
2.0

Parameters

MNssVASDatabaseObserver * aObserver

ResetModelBank(TUint32)

TInt ResetModelBank ( TUint32 aNewId )
Modifies the context table so that all contexts start using the new id as their model bank id.
Since
2.8

Parameters

TUint32 aNewId new model bank id

SaveContext(CNssContext *, TInt &)

TInt SaveContext ( CNssContext * aContext,
TInt & aNewContextId
)
Method to save context.
Since
2.0

Parameters

CNssContext * aContext - .
TInt & aNewContextId

SaveContextClientData(CNssContext *)

TInt SaveContextClientData ( CNssContext * aContext )
Updates the client data of the context
Since
2.8

Parameters

CNssContext * aContext - .

SaveTag(CNssTag *, TInt &)

TInt SaveTag ( CNssTag * aTag,
TInt & aNewId
)
Method to save a tag.
Since
2.0

Parameters

CNssTag * aTag The voice tag to save.
TInt & aNewId

SaveTags(RPointerArray< CNssTag > *)

TInt SaveTags ( RPointerArray < CNssTag > * aTagArray )
Method to save several tags.
Since
2.8

Parameters

RPointerArray < CNssTag > * aTagArray The voice tags to save.

StartMonitoringDatabaseL()

void StartMonitoringDatabaseL ( )
Method use to start monitoring vas database.
Since
2.0

TagCount(CNssContext *)

TInt TagCount ( CNssContext * aContext )
Method to get the number of tags for a context
Since
2.0

Parameters

CNssContext * aContext - The context to check tags for.

TagExist(CNssContext *)

TBool TagExist ( CNssContext * aContext )
Method to determine if tags exist for a context
Since
2.0

Parameters

CNssContext * aContext - The context to check tags for.

TransferContextList()

TInt TransferContextList ( )
Method to transfer context list to client side.
Since
2.0

TransferTagList()

TInt TransferTagList ( )
Method to transfer tag list to client side.
Since
2.0

TransferTagReferenceList()

TInt TransferTagReferenceList ( )

UpdateTagRuleIDs(const RArray< TNssSpeechItem > &)

TInt UpdateTagRuleIDs ( const RArray < TNssSpeechItem > & aRetrainedTags )
Changes the Rule ID of some tags. When an already trained tag is retrained, the Rule ID changes. This function updates the change to VAS DB.
Since
2.8

Parameters

const RArray < TNssSpeechItem > & aRetrainedTags

Member Enumerations Documentation

Enum TState

Enumerators

EStateGetContext = 0
EStateTransferContext
EStateGetTag
EStateTransferTag
EStateDeleteContext
EStateDeleteTag
EStateSaveContext
EStateSaveTag
EStateGetTagReference
EStateTransferTagReference

Member Data Documentation

CArrayPtrFlat< CNssContext > * iCNssContextList

CArrayPtrFlat < CNssContext > * iCNssContextList [private]

CArrayPtrFlat< CNssTag > * iCNssTagList

CArrayPtrFlat < CNssTag > * iCNssTagList [private]

CArrayPtrFlat< CNssTagReference > * iCNssTagRefList

CArrayPtrFlat < CNssTagReference > * iCNssTagRefList [private]

TInt iConnected

TInt iConnected [private]

CNssContextBuilder * iContextBuilder

CNssContextBuilder * iContextBuilder [private]

TPckgCTNssGrammarIdRuleId * iGrammarIdRuleIdPackage

TPckgCTNssGrammarIdRuleId * iGrammarIdRuleIdPackage [private]

TBool iIsLocked

TBool iIsLocked [private]

CNssSpeechItemBuilder * iSpeechItemBuilder

CNssSpeechItemBuilder * iSpeechItemBuilder [private]

TInt iState

TInt iState [private]

TNssGrammarIdRuleId iTNssGrammarIdRuleId

TNssGrammarIdRuleId iTNssGrammarIdRuleId [private]

TNssTagReferenceListArray * iTNssTagRefList

TNssTagReferenceListArray * iTNssTagRefList [private]

TUint32 iTagId

TUint32 iTagId [private]

CNssVASDBEventMonitor * iVASDBEventMonitor

CNssVASDBEventMonitor * iVASDBEventMonitor [private]

CNssVasDb * iVasDb

CNssVasDb * iVasDb [private]