speechsrv_plat/ui_voice_recognition_api/inc/vuivoicerecogdefs.h
changeset 13 57b735022c18
parent 1 b13cd05eeb2f
equal deleted inserted replaced
1:b13cd05eeb2f 13:57b735022c18
     1 /*
       
     2 * Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Constant definitions 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef VUIVOICERECOGDEFS_H
       
    20 #define VUIVOICERECOGDEFS_H
       
    21 
       
    22 const TInt KRecogFinal = 32;
       
    23 const TInt KRecogInterval = 1;
       
    24 const TInt KRecogIncrement = 1;
       
    25 const TInt KRecogDelay = 1;
       
    26 const TInt KKRecogInterval = 125000;
       
    27 
       
    28 const TInt KMaxPhoneNumberLength = 48;  // taken from Phonebook
       
    29 const TInt KMaxNameLength = 110;    // taken from Phonebook
       
    30 const TInt KMaxFieldLength = 150;    // taken from Phonebook, EMail address length
       
    31 
       
    32 const TInt KSindMaxResults = 6;    // The number of voice tags needed for the N-Best List.
       
    33 
       
    34 const TInt KTimeoutMicroseconds = 4*1000000; // 4 seconds
       
    35 const TInt KErrorMessageTimeoutMicroseconds = 3*1000000; // 3 seconds
       
    36 const TInt KPlaybackTimeout = 45;    // ~2.5s depending on HW
       
    37 
       
    38 const TInt KVerificationCommands = 3;
       
    39 const TInt KVerificationResults = 3;
       
    40 const TInt KVerificationTries = 3;
       
    41 
       
    42 _LIT( KVoiceDialContext, "NAMEDIAL" );    // context for phonebook contact voice tags
       
    43 _LIT( KVoiceCommandContext, "COMMAND" );    // context for voice commands application tags
       
    44 _LIT( KVoiceVerificationContext, "VERIFICATION" );    // context for voice verification commands tags
       
    45 
       
    46 _LIT( KDirAndFile,"z:voiceui.mbm" );
       
    47 
       
    48 _LIT8( KVoiceUiMode, "DEVICELOCKMODE" );    // Startup mode for device lock functionality
       
    49 
       
    50 const TUid KVCommandAppUid = { 0x101F8555 };
       
    51 const TUid KVoiceUiUID = { 0x101F8543 };
       
    52 
       
    53 const TInt KProfileValue = 200;
       
    54 
       
    55 // Voice Ui error codes
       
    56 const TInt KErrInit                     = -1000;
       
    57 const TInt KErrNoMatch                  = -1001;
       
    58 const TInt KErrNoResults                = -1002;
       
    59 const TInt KErrCallInProgress           = -1003;
       
    60 const TInt KErrNoContacts               = -1004;
       
    61 const TInt KErrRecogFailed              = -1005;
       
    62 const TInt KErrNoSpeech                 = -1006;
       
    63 const TInt KErrTooEarly                 = -1007;
       
    64 const TInt KErrTooLong                  = -1008;
       
    65 const TInt KErrTooShort                 = -1009;
       
    66 const TInt KErrNoVerificationTrained    = -1009;
       
    67 
       
    68 // Verification modes
       
    69 enum TVuiVerificationMode
       
    70     {
       
    71     EAutomatic = 0,
       
    72     EManual,
       
    73     EVoice
       
    74     };
       
    75 
       
    76 // Voice Ui keypress codes
       
    77 enum TVuiKeypress
       
    78     {
       
    79     ENoKeypress = 1000,
       
    80     EShortKeypress,
       
    81     ELongKeypress,
       
    82     EEndCallKeypress,
       
    83     EUpKeypress,
       
    84     EDownKeypress,
       
    85     ESelectKeypress,
       
    86     EDirectSelectKeypress,
       
    87     EOpenKeypress,
       
    88     EMoreKeypress,
       
    89     EOptionsKeypress,
       
    90     EScrollKeypress,
       
    91     EDragKeypress
       
    92     };
       
    93 
       
    94 struct VTimerModel
       
    95     {
       
    96     TInt iFinalValue;
       
    97     TInt iHundreths;
       
    98     TInt iIncrement;
       
    99     TBool iRunning;
       
   100     };
       
   101     
       
   102 // Read capability: ReadDeviceData.
       
   103 _LIT_SECURITY_POLICY_C1( KVoiceUiReadPolicy, ECapabilityReadDeviceData );
       
   104     
       
   105 // Write capability: WriteDeviceData.
       
   106 _LIT_SECURITY_POLICY_C1( KVoiceUiWritePolicy, ECapabilityWriteDeviceData );
       
   107 
       
   108 #endif    // VUIVOICERECOGDEFS_H
       
   109 
       
   110 // End of File
       
   111