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