os/mm/mmdevicefw/speechrecogsupport/tsrc/ASR/src/Database/testdatabaseconstants.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // sddatabase.h
    15 // 
    16 //
    17 
    18 #ifndef __TESTDATABASECONSTANTS_H__
    19 #define __TESTDATABASECONSTANTS_H__
    20 
    21 #include "Database/sddatabase.h"
    22 
    23 _LIT(KFileNameTestDatabase, "C:\\data\\speechrecognition.db");
    24 
    25 // some constants to create a dummy database to test
    26 const TInt KNumParameters = 2;
    27 
    28 const TInt KNumGrammars = 2;
    29 const TInt KNumLexicons = 2;
    30 const TInt KNumModelBanks = 2;
    31 
    32 const TInt KNumRules = 3;
    33 const TInt KNumPronunciations = 3;
    34 const TInt KNumModels = 3;
    35 
    36 
    37 const TGrammarID KGrammarIDs[KNumGrammars] = {1 ,2 };
    38 const TLexiconID KLexiconIDs[KNumLexicons] = {3 ,4 };
    39 const TModelBankID KModelBankIDs[KNumModelBanks] = {5 ,6 };
    40 
    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}}};
    44 									
    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}}};
    48 
    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}}};
    52 
    53 
    54 #define KMaxAvailableResults 2
    55 #define KNumParameters 2
    56 
    57 // intially stored parameters for the dummy database
    58 const TInt KParameterIDs[KNumParameters] = {1,2};
    59 const TInt KParameterValues[KNumParameters] = {101,222};
    60 
    61 const TGrammarID KResultsGrammarID[KMaxAvailableResults] = {2,1};
    62 const TRuleID KResultsRuleID[KMaxAvailableResults] = {11,9};
    63 
    64 const TUid KUidTestASRClient = {0x101};
    65 const TUid KUidTestASRClient2 = {0x102};
    66 
    67 const TInt KIndex0 = 0;
    68 const TInt KIndex1 = 1;
    69 const TInt KIndex2 = 2;
    70 
    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;
    78 
    79 const TInt KBadMode = 1000; // an invalid enum value for TRecognitionMode
    80 
    81 const TInt KNumberOfModelsInFreeStorage = 0;
    82 const TInt KUtteranceDuration = 100;
    83 
    84 
    85 #endif