os/mm/mmdevicefw/speechrecogsupport/tsrc/ASR/src/Database/testdatabaseconstants.h
First public contribution.
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #ifndef __TESTDATABASECONSTANTS_H__
19 #define __TESTDATABASECONSTANTS_H__
21 #include "Database/sddatabase.h"
23 _LIT(KFileNameTestDatabase, "C:\\data\\speechrecognition.db");
25 // some constants to create a dummy database to test
26 const TInt KNumParameters = 2;
28 const TInt KNumGrammars = 2;
29 const TInt KNumLexicons = 2;
30 const TInt KNumModelBanks = 2;
32 const TInt KNumRules = 3;
33 const TInt KNumPronunciations = 3;
34 const TInt KNumModels = 3;
37 const TGrammarID KGrammarIDs[KNumGrammars] = {1 ,2 };
38 const TLexiconID KLexiconIDs[KNumLexicons] = {3 ,4 };
39 const TModelBankID KModelBankIDs[KNumModelBanks] = {5 ,6 };
41 // Test rules for the dummy database
42 const CSDDatabase::TRuleData KRuleIDs[KNumGrammars][KNumRules] = {{{7,3,13},{8,3,15},{9,4,18}},
43 {{10,4,17},{11,4,16},{12,3,15}}};
45 // Test pronunciations for the dummy database
46 const CSDDatabase::TPronunciationData KPronunciationIDs[KNumLexicons][KNumPronunciations] = {{{13,5,19},{14,5,20},{15,6,22}},
47 {{16,6,23},{17,5,20},{18,5,19}}};
49 // Test Models for the dummy database
50 const CSDDatabase::TModelData KModelIDs[KNumModelBanks][KNumModels] = {{{19, 2000},{20,3000}, {21, 5000}},
51 {{22, 3000},{23, 4000},{24,7000}}};
54 #define KMaxAvailableResults 2
55 #define KNumParameters 2
57 // intially stored parameters for the dummy database
58 const TInt KParameterIDs[KNumParameters] = {1,2};
59 const TInt KParameterValues[KNumParameters] = {101,222};
61 const TGrammarID KResultsGrammarID[KMaxAvailableResults] = {2,1};
62 const TRuleID KResultsRuleID[KMaxAvailableResults] = {11,9};
64 const TUid KUidTestASRClient = {0x101};
65 const TUid KUidTestASRClient2 = {0x102};
67 const TInt KIndex0 = 0;
68 const TInt KIndex1 = 1;
69 const TInt KIndex2 = 2;
71 // IDs that do not exist in the database defined above
72 const TLexiconID KBadLexiconID = 100000;
73 const TGrammarID KBadGrammarID = 100001;
74 const TModelID KBadModelID = 100002;
75 const TRuleID KBadRuleID = 100003;
76 const TModelBankID KBadModelBankID = 100004;
77 const TPronunciationID KBadPronunciationID = 100002;
79 const TInt KBadMode = 1000; // an invalid enum value for TRecognitionMode
81 const TInt KNumberOfModelsInFreeStorage = 0;
82 const TInt KUtteranceDuration = 100;