os/mm/mmdevicefw/speechrecogsupport/ASR/inc/mmf/common/SpeechRecognitionCustomCommands.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) 2002-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
//
sl@0
    15
sl@0
    16
#ifndef __SPEECHRECOGNITIONCUSTOMCOMMANDS_H__
sl@0
    17
#define __SPEECHRECOGNITIONCUSTOMCOMMANDS_H__
sl@0
    18
sl@0
    19
//  INCLUDES
sl@0
    20
#include	<mmf/common/mmfcontroller.h>
sl@0
    21
#include 	<mmf/common/speechrecognitiondataclient.h>
sl@0
    22
sl@0
    23
/**
sl@0
    24
@publishedAll
sl@0
    25
@released
sl@0
    26
sl@0
    27
This is the main class of Speech Recognition Custom Commands.
sl@0
    28
sl@0
    29
@since  8.0
sl@0
    30
*/
sl@0
    31
class RSpeechRecognitionCustomCommands : public RMMFCustomCommandsBase
sl@0
    32
	{
sl@0
    33
public:
sl@0
    34
	/**
sl@0
    35
	Public C++ constructor for RSpeechRecognitionCustomCommands class.
sl@0
    36
sl@0
    37
	@param  aController			
sl@0
    38
	        A reference to a RMMFController object.
sl@0
    39
sl@0
    40
	@since  8.0
sl@0
    41
	*/
sl@0
    42
	IMPORT_C RSpeechRecognitionCustomCommands(RMMFController& aController);
sl@0
    43
	
sl@0
    44
	/** 
sl@0
    45
	Adds a new pronunciation for the given model into the specified lexicon.
sl@0
    46
sl@0
    47
	@param  aLexiconID
sl@0
    48
	        The lexicon ID to where the new pronunciation is added.
sl@0
    49
	@param  aModelBankID
sl@0
    50
	        The model bank ID.
sl@0
    51
	@param  aModelID
sl@0
    52
	        The model ID.
sl@0
    53
	@param  aPronunciationID
sl@0
    54
	        A reference to where a new pronunciation ID is assigned.
sl@0
    55
sl@0
    56
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
    57
	        another of the system-wide error codes.
sl@0
    58
sl@0
    59
	@since  8.0
sl@0
    60
	*/
sl@0
    61
	IMPORT_C TInt AddPronunciation(TLexiconID aLexiconID,
sl@0
    62
					TModelBankID aModelBankID, TModelID aModelID,
sl@0
    63
					TPronunciationID& aPronunciationID);
sl@0
    64
sl@0
    65
	/**
sl@0
    66
	Adds a new rule for the given pronunciation into the specified grammar.
sl@0
    67
sl@0
    68
	@param  aGrammarID			
sl@0
    69
	        The grammar ID to where the new rule is added.
sl@0
    70
	@param  aLexiconID			
sl@0
    71
	        The lexicon ID.
sl@0
    72
	@param  aPronunciationID	
sl@0
    73
	        The pronunciation ID.
sl@0
    74
	@param  aRuleID				
sl@0
    75
	        A reference to where a new rule ID is assigned.
sl@0
    76
sl@0
    77
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
    78
	        another of the system-wide error codes.
sl@0
    79
sl@0
    80
	@since  8.0
sl@0
    81
	*/
sl@0
    82
	IMPORT_C TInt AddRule(TGrammarID aGrammarID, TLexiconID aLexiconID,
sl@0
    83
					TPronunciationID aPronunciationID, TRuleID& aRuleID);
sl@0
    84
sl@0
    85
	/**
sl@0
    86
	Cancels the current operation.
sl@0
    87
sl@0
    88
	@since  8.0
sl@0
    89
	*/
sl@0
    90
	IMPORT_C void Cancel();
sl@0
    91
sl@0
    92
	/**
sl@0
    93
	Commits the current train operation to the database.
sl@0
    94
sl@0
    95
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
    96
	        another of the system-wide error codes.
sl@0
    97
sl@0
    98
	@since  8.0
sl@0
    99
	*/
sl@0
   100
	IMPORT_C TInt CommitChanges();
sl@0
   101
sl@0
   102
	/**
sl@0
   103
	Creates a new grammar.
sl@0
   104
sl@0
   105
	@param  aGrammarID
sl@0
   106
	        A reference to where the grammar ID is stored.
sl@0
   107
sl@0
   108
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   109
	        another of the system-wide error codes.
sl@0
   110
sl@0
   111
	@since  8.0
sl@0
   112
    */
sl@0
   113
	IMPORT_C TInt CreateGrammar(TGrammarID& aGrammarID);
sl@0
   114
sl@0
   115
	/**
sl@0
   116
	Creates a new lexicon.
sl@0
   117
sl@0
   118
	@param  aLexiconID			
sl@0
   119
	        A reference where lexicon ID is stored.
sl@0
   120
sl@0
   121
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   122
	        another of the system-wide error codes.
sl@0
   123
sl@0
   124
	@since  8.0
sl@0
   125
    */
sl@0
   126
	IMPORT_C TInt CreateLexicon(TLexiconID& aLexiconID);
sl@0
   127
sl@0
   128
    /**
sl@0
   129
	Creates a new model bank.
sl@0
   130
sl@0
   131
	@param  aModelBankID		
sl@0
   132
	        A reference to where a new model bank ID is assigned.
sl@0
   133
sl@0
   134
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   135
	        another of the system-wide error codes.
sl@0
   136
sl@0
   137
	@since  8.0
sl@0
   138
    */
sl@0
   139
	IMPORT_C TInt CreateModelBank(TModelBankID& aModelBankID);
sl@0
   140
sl@0
   141
	/**
sl@0
   142
	Ends the current recognition session.
sl@0
   143
	
sl@0
   144
	The resources allocated for recognition are freed.
sl@0
   145
sl@0
   146
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   147
	        another of the system-wide error codes.
sl@0
   148
sl@0
   149
	@since  8.0
sl@0
   150
    */
sl@0
   151
	IMPORT_C TInt EndRecSession();
sl@0
   152
sl@0
   153
	/**
sl@0
   154
	Returns all grammar IDs owned by the client.
sl@0
   155
sl@0
   156
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   157
	        another of the system-wide error codes.
sl@0
   158
sl@0
   159
	@since  8.0
sl@0
   160
    */
sl@0
   161
	IMPORT_C TInt GetAllClientGrammarIDs();
sl@0
   162
sl@0
   163
	/**
sl@0
   164
	Returns all lexicon IDs owned by the client.
sl@0
   165
sl@0
   166
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   167
	        another of the system-wide error codes.
sl@0
   168
	
sl@0
   169
	@since  8.0
sl@0
   170
    */
sl@0
   171
	IMPORT_C TInt GetAllClientLexiconIDs();
sl@0
   172
sl@0
   173
	/**
sl@0
   174
	Returns all modelBank IDs owned by the client.
sl@0
   175
sl@0
   176
    @return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   177
	           another of the system-wide error codes.
sl@0
   178
sl@0
   179
	@since  8.0
sl@0
   180
    */
sl@0
   181
	IMPORT_C TInt GetAllClientModelBankIDs();
sl@0
   182
sl@0
   183
	/**
sl@0
   184
	Returns all grammar IDs owned by the client.
sl@0
   185
sl@0
   186
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   187
	        another of the system-wide error codes.
sl@0
   188
sl@0
   189
	@since  8.0
sl@0
   190
    */
sl@0
   191
	IMPORT_C TInt GetAllGrammarIDs();
sl@0
   192
sl@0
   193
	/**
sl@0
   194
	Returns all lexicon IDs owned by the client.
sl@0
   195
sl@0
   196
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   197
	        another of the system-wide error codes.
sl@0
   198
sl@0
   199
	@since  8.0
sl@0
   200
    */
sl@0
   201
	IMPORT_C TInt GetAllLexiconIDs();
sl@0
   202
sl@0
   203
sl@0
   204
	/**
sl@0
   205
	Returns all modelBank IDs owned by the client.
sl@0
   206
sl@0
   207
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   208
	        another of the system-wide error codes.
sl@0
   209
sl@0
   210
	@since  8.0
sl@0
   211
    */
sl@0
   212
	IMPORT_C TInt GetAllModelBankIDs();
sl@0
   213
sl@0
   214
	/**
sl@0
   215
	Returns all model IDs that exist in the specified model bank.
sl@0
   216
sl@0
   217
	@param  aModelBankID		
sl@0
   218
	        The model bank ID.
sl@0
   219
sl@0
   220
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   221
	        another of the system-wide error codes.
sl@0
   222
sl@0
   223
	@since  8.0
sl@0
   224
    */
sl@0
   225
	IMPORT_C TInt GetAllModelIDs(TModelBankID aModelBankID);
sl@0
   226
sl@0
   227
	/**
sl@0
   228
	Returns all pronunciation IDs that exist in the specified lexicon.
sl@0
   229
sl@0
   230
	@param  aLexiconID			
sl@0
   231
	        The lexicon ID.
sl@0
   232
sl@0
   233
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   234
	        another of the system-wide error codes.
sl@0
   235
sl@0
   236
	@since  8.0
sl@0
   237
    */
sl@0
   238
	IMPORT_C TInt GetAllPronunciationIDs(TLexiconID aLexiconID);
sl@0
   239
sl@0
   240
	/**
sl@0
   241
	Returns all rule IDs that exist in the specified grammar.
sl@0
   242
sl@0
   243
    @param  aGrammarID			
sl@0
   244
	        The grammar ID.
sl@0
   245
sl@0
   246
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   247
	        another of the system-wide error codes.
sl@0
   248
sl@0
   249
	@since  8.0
sl@0
   250
    */
sl@0
   251
	IMPORT_C TInt GetAllRuleIDs(TGrammarID aGrammarID);
sl@0
   252
sl@0
   253
	/**
sl@0
   254
	Returns the number of models available for training system wide,
sl@0
   255
	based on available disk space.
sl@0
   256
sl@0
   257
	@param  aAvailableStorage	
sl@0
   258
	        The number of models that can be held in available storage space.
sl@0
   259
sl@0
   260
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   261
	        another of the system-wide error codes.
sl@0
   262
sl@0
   263
	@since  8.0
sl@0
   264
    */
sl@0
   265
	IMPORT_C TInt GetAvailableStorage(TInt& aAvailableStorage);
sl@0
   266
sl@0
   267
	/**
sl@0
   268
	Returns the engine properties specified by the engine property
sl@0
   269
	ID array. On return aPropertyValue contains an array of engine
sl@0
   270
	properties.
sl@0
   271
sl@0
   272
	@param  aPropertyId		
sl@0
   273
	        A constant reference to an array of engine property IDs.
sl@0
   274
	@param  aPropertyValue	
sl@0
   275
	        A reference to an array of engine property values.
sl@0
   276
sl@0
   277
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   278
	        another of the system-wide error codes.
sl@0
   279
sl@0
   280
	@since  8.0
sl@0
   281
    */
sl@0
   282
	IMPORT_C TInt GetEngineProperties(const RArray<TInt>& aPropertyId,
sl@0
   283
					RArray<TInt>& aPropertyValue);
sl@0
   284
sl@0
   285
	/**
sl@0
   286
	Returns the number of models in the specified model bank.
sl@0
   287
sl@0
   288
	@param  aModelBankID		
sl@0
   289
	        The model bank ID.
sl@0
   290
	@param  aModelCount			
sl@0
   291
	        The reference where the number of models is set.
sl@0
   292
sl@0
   293
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   294
	        another of the system-wide error codes.
sl@0
   295
sl@0
   296
	@since  8.0
sl@0
   297
    */
sl@0
   298
	IMPORT_C TInt GetModelCount(TModelBankID aModelBankID,
sl@0
   299
					TInt& aModelCount);
sl@0
   300
sl@0
   301
sl@0
   302
	/**
sl@0
   303
	Checks if the rule is valid or not.
sl@0
   304
sl@0
   305
	@param  aGrammarID			
sl@0
   306
            The grammar ID.
sl@0
   307
	@param  aRuleID				
sl@0
   308
	        The rule ID.
sl@0
   309
	@param  aValid				
sl@0
   310
	        A reference where the validity of the rule is set.
sl@0
   311
sl@0
   312
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   313
	        another of the system-wide error codes.
sl@0
   314
sl@0
   315
	@since  8.0
sl@0
   316
    */
sl@0
   317
	IMPORT_C TInt GetRuleValidity(TGrammarID aGrammarID, TRuleID aRuleID, 
sl@0
   318
					TBool& aValid);
sl@0
   319
sl@0
   320
	/**
sl@0
   321
    *
sl@0
   322
    *	Returns the duration of the utterance for the specified model.
sl@0
   323
    * @since 8.0
sl@0
   324
    * @param	aModelBankID		model bank Id
sl@0
   325
	* @param	aModelID			model Id
sl@0
   326
	* @param	aDuration			reference where the duration of 
sl@0
   327
	*								utterance is set
sl@0
   328
    * @return	System-wide errors
sl@0
   329
    */
sl@0
   330
	IMPORT_C TInt GetUtteranceDuration(TModelBankID aModelBankID, 
sl@0
   331
				TModelID aModelID, TTimeIntervalMicroSeconds32& aDuration);
sl@0
   332
sl@0
   333
	/**
sl@0
   334
    Loads the specified grammar into the recognizer; done prior to recognition.
sl@0
   335
sl@0
   336
    @param  aGrammarID			
sl@0
   337
	        The grammar ID.
sl@0
   338
sl@0
   339
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   340
	        another of the system-wide error codes.
sl@0
   341
sl@0
   342
    @since  8.0
sl@0
   343
    */
sl@0
   344
	IMPORT_C TInt LoadGrammar(TGrammarID aGrammarID);
sl@0
   345
sl@0
   346
	/**
sl@0
   347
	Loads the specified lexicon into the recognizer; done prior to recognition.
sl@0
   348
sl@0
   349
	@param  aLexiconID			
sl@0
   350
	        The lexicon ID.
sl@0
   351
sl@0
   352
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   353
	        another of the system-wide error codes.
sl@0
   354
sl@0
   355
	@since  8.0
sl@0
   356
    */
sl@0
   357
	IMPORT_C TInt LoadLexicon(TLexiconID aLexiconID);
sl@0
   358
sl@0
   359
	/**
sl@0
   360
	Loads the specified model bank into the recognizer; done prior to recognition.
sl@0
   361
sl@0
   362
	@param  aModelBankID		
sl@0
   363
	        The model bank ID.
sl@0
   364
sl@0
   365
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   366
	        another of the system-wide error codes.
sl@0
   367
sl@0
   368
	@since  8.0
sl@0
   369
    */
sl@0
   370
	IMPORT_C TInt LoadModels(TModelBankID aModelBankID);
sl@0
   371
sl@0
   372
	/**
sl@0
   373
	Plays the previously trained utterance.
sl@0
   374
sl@0
   375
	@param  aModelBankID		
sl@0
   376
	        The model bank ID.
sl@0
   377
	@param  aModelID			
sl@0
   378
	        The model ID, whose utterance is played.
sl@0
   379
sl@0
   380
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   381
	        another of the system-wide error codes.
sl@0
   382
sl@0
   383
	@since  8.0
sl@0
   384
    */
sl@0
   385
	IMPORT_C TInt PlayUtterance(TModelBankID aModelBankID,
sl@0
   386
					TModelID aModelID);
sl@0
   387
sl@0
   388
	/**
sl@0
   389
	Initiates recognition; performed following loading of model bank, lexicon, and grammar.
sl@0
   390
sl@0
   391
	@param  aResultSet			
sl@0
   392
	        A reference where the recognition result is set.
sl@0
   393
sl@0
   394
    @return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   395
            another of the system-wide error codes.
sl@0
   396
sl@0
   397
	@since  8.0
sl@0
   398
    */
sl@0
   399
	IMPORT_C TInt Recognize(CSDClientResultSet& aResultSet);
sl@0
   400
sl@0
   401
	/**
sl@0
   402
	Records the user utterance for training and recognition.
sl@0
   403
sl@0
   404
	@param  aRecordTime			
sl@0
   405
	        The recording time in microseconds.
sl@0
   406
sl@0
   407
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   408
	         another of the system-wide error codes.
sl@0
   409
sl@0
   410
	@since  8.0
sl@0
   411
    */
sl@0
   412
	IMPORT_C TInt Record(TTimeIntervalMicroSeconds32 aRecordTime);
sl@0
   413
sl@0
   414
	/**
sl@0
   415
	Removes the specified grammar from the permanent storage.
sl@0
   416
sl@0
   417
	Removing a grammar will remove all rules within the grammar.
sl@0
   418
sl@0
   419
	@param  aGrammarID			
sl@0
   420
	        The grammar ID.
sl@0
   421
sl@0
   422
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   423
	        another of the system-wide error codes.
sl@0
   424
	
sl@0
   425
	@since  8.0
sl@0
   426
    */
sl@0
   427
	IMPORT_C TInt RemoveGrammar(TGrammarID aGrammarID);
sl@0
   428
sl@0
   429
	/**
sl@0
   430
	Removes the specified lexicon from the permanent storage.
sl@0
   431
sl@0
   432
	Removing a lexicon will remove all pronunciations within the lexicon.
sl@0
   433
sl@0
   434
	@param  aLexiconID			
sl@0
   435
	        The lexicon ID.
sl@0
   436
sl@0
   437
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   438
	        another of the system-wide error codes.
sl@0
   439
	@since  8.0
sl@0
   440
    */
sl@0
   441
	IMPORT_C TInt RemoveLexicon(TLexiconID aLexiconID);
sl@0
   442
sl@0
   443
	/**
sl@0
   444
	Removes the specified model bank from the permanent storage.
sl@0
   445
sl@0
   446
	Removing a model bank will remove all models within the model bank.
sl@0
   447
sl@0
   448
	@param  aModelBankID		
sl@0
   449
	        The model bank ID.
sl@0
   450
sl@0
   451
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   452
	        another of the system-wide error codes.
sl@0
   453
sl@0
   454
	@since  8.0
sl@0
   455
    */
sl@0
   456
	IMPORT_C TInt RemoveModelBank(TModelBankID aModelBankID);
sl@0
   457
sl@0
   458
	/**
sl@0
   459
	Removes the specified model from the specified model bank permanently.
sl@0
   460
sl@0
   461
	@param  aModelBankID		
sl@0
   462
	        The model bank ID.
sl@0
   463
	@param  aModelID			
sl@0
   464
	        The model ID.
sl@0
   465
sl@0
   466
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   467
	        another of the system-wide error codes.
sl@0
   468
sl@0
   469
	@since  8.0
sl@0
   470
    */
sl@0
   471
	IMPORT_C TInt RemoveModel(TModelBankID aModelBankID,
sl@0
   472
								TModelID aModelID);
sl@0
   473
sl@0
   474
	/**
sl@0
   475
	Removes the specified pronunciation from the specified lexicon permanently.
sl@0
   476
sl@0
   477
	@param  aLexiconID
sl@0
   478
	        The lexicon ID.
sl@0
   479
	@param  aPronunciationID
sl@0
   480
	        The pronunciation ID.
sl@0
   481
sl@0
   482
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   483
	        another of the system-wide error codes.
sl@0
   484
sl@0
   485
	@since	8.0
sl@0
   486
    */
sl@0
   487
	IMPORT_C TInt RemovePronunciation(TLexiconID aLexiconID,
sl@0
   488
								TPronunciationID aPronunciationID);
sl@0
   489
sl@0
   490
	/**
sl@0
   491
	Removes the specified rule from the specified grammar permanently.
sl@0
   492
sl@0
   493
	@param  aGrammarID			
sl@0
   494
	        The grammar ID.
sl@0
   495
	@param  aRuleID				
sl@0
   496
	        The rule ID.
sl@0
   497
sl@0
   498
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   499
	        another of the system-wide error codes.
sl@0
   500
sl@0
   501
	@since  8.0
sl@0
   502
    */
sl@0
   503
	IMPORT_C TInt RemoveRule(TGrammarID aGrammarID, TRuleID aRuleID);
sl@0
   504
sl@0
   505
	/**
sl@0
   506
	Sets the client UID for client.
sl@0
   507
sl@0
   508
	@param  aClientUid			
sl@0
   509
	        The client UID.
sl@0
   510
sl@0
   511
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   512
	        another of the system-wide error codes.
sl@0
   513
sl@0
   514
	@since  8.0
sl@0
   515
	*/
sl@0
   516
	IMPORT_C TInt SetClientUid(TUid aClientUid);
sl@0
   517
sl@0
   518
	/**
sl@0
   519
	Starts a new recognition session.
sl@0
   520
sl@0
   521
	@param  aMode				
sl@0
   522
	        The recognition mode.
sl@0
   523
sl@0
   524
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   525
	        another of the system-wide error codes.
sl@0
   526
sl@0
   527
	@since  8.0
sl@0
   528
    */
sl@0
   529
	IMPORT_C TInt StartRecSession(TRecognitionMode aMode);
sl@0
   530
sl@0
   531
    /**
sl@0
   532
	Trains a new model into the specified model bank.
sl@0
   533
sl@0
   534
	@param  aModelBankID		
sl@0
   535
	        The model bank ID.
sl@0
   536
	@param  aModelID			
sl@0
   537
	        The reference to where a new model ID is assigned.
sl@0
   538
sl@0
   539
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   540
	        another of the system-wide error codes.
sl@0
   541
sl@0
   542
	@since  8.0
sl@0
   543
    */
sl@0
   544
	IMPORT_C TInt Train(TModelBankID aModelBankID, TModelID& aModelID);
sl@0
   545
sl@0
   546
	/**
sl@0
   547
	Unloads the specified rule from the specified grammar in temporary
sl@0
   548
	memory, previously loaded with LoadGrammarL(). The rule in the
sl@0
   549
	permanent storage remains intact.
sl@0
   550
sl@0
   551
	@param  aGrammarID
sl@0
   552
	        The grammar ID.
sl@0
   553
	@param  aRuleID
sl@0
   554
	        The rule ID.
sl@0
   555
sl@0
   556
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   557
	        another of the system-wide error codes.
sl@0
   558
sl@0
   559
	@since  8.0
sl@0
   560
    */
sl@0
   561
	IMPORT_C TInt UnloadRule(TGrammarID aGrammarID, TRuleID aRuleID);
sl@0
   562
sl@0
   563
	/**
sl@0
   564
	Uploads the specified parameters into the engine.
sl@0
   565
sl@0
   566
	@param  aParameterId		
sl@0
   567
	        An array of parameter IDs.
sl@0
   568
	@param  aParameterValue
sl@0
   569
	        An array of parameter values.
sl@0
   570
sl@0
   571
	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
sl@0
   572
	        another of the system-wide error codes.
sl@0
   573
sl@0
   574
	@since  8.0
sl@0
   575
    */
sl@0
   576
	IMPORT_C TInt LoadEngineParameters(const RArray<TInt>& aParameterId,
sl@0
   577
								const RArray<TInt>& aParameterValue);
sl@0
   578
sl@0
   579
	/**
sl@0
   580
	Gets an array of pronunciation IDs previously requested by GetAllPronunciationIDs.
sl@0
   581
sl@0
   582
	@param  aPronunciationIDs
sl@0
   583
	        An array to store pronunciation IDs.
sl@0
   584
sl@0
   585
    @since  8.0
sl@0
   586
    */
sl@0
   587
	IMPORT_C void GetPronunciationIDArrayL(RArray<TPronunciationID>& aPronunciationIDs);
sl@0
   588
sl@0
   589
	/**
sl@0
   590
	Gets an array of rule IDs previously requested by GetAllRuleIDs.
sl@0
   591
sl@0
   592
	@param  aRuleIDs
sl@0
   593
	        An array to store rule IDs.
sl@0
   594
sl@0
   595
    @since  8.0
sl@0
   596
    */
sl@0
   597
	IMPORT_C void GetRuleIDArrayL(RArray<TRuleID>& aRuleIDs);
sl@0
   598
sl@0
   599
	/**
sl@0
   600
	Gets an array of model IDs previously requested by GetAllModelIDs.
sl@0
   601
sl@0
   602
	@param  aModelIDs
sl@0
   603
	        An array to store model IDs.
sl@0
   604
sl@0
   605
    @since  8.0
sl@0
   606
    */
sl@0
   607
	IMPORT_C void GetModelIDArrayL(RArray<TModelID>& aModelIDs);
sl@0
   608
sl@0
   609
	/**
sl@0
   610
	Gets an array of grammar IDs previously requested by GetAllGrammarIDs.
sl@0
   611
sl@0
   612
	@param  aGrammarIDs
sl@0
   613
	        An array to store grammar IDs.
sl@0
   614
sl@0
   615
    @since  8.0
sl@0
   616
    */
sl@0
   617
	IMPORT_C void GetGrammarIDArrayL(RArray<TGrammarID>& aGrammarIDs);
sl@0
   618
sl@0
   619
	/**
sl@0
   620
	Gets an array of lexicon IDs previously requested by GetAllLexiconIDs.
sl@0
   621
sl@0
   622
	@param  aLexiconIDs
sl@0
   623
	        An array to store lexicon IDs.
sl@0
   624
sl@0
   625
	@since  8.0
sl@0
   626
    */
sl@0
   627
	IMPORT_C void GetLexiconIDArrayL(RArray<TLexiconID>& aLexiconIDs);
sl@0
   628
sl@0
   629
sl@0
   630
	/**
sl@0
   631
	Gets an array of modelBank IDs previously requested by GetAllModelBankIDs.
sl@0
   632
sl@0
   633
	@param  aModelBankIDs
sl@0
   634
	        An array to store modelBank IDs.
sl@0
   635
sl@0
   636
    @since  8.0
sl@0
   637
    */
sl@0
   638
	IMPORT_C void GetModelBankIDArrayL(RArray<TModelBankID>& aModelBankIDs);
sl@0
   639
sl@0
   640
sl@0
   641
	/**
sl@0
   642
	Gets a client result set previously created by a call to Recognise().
sl@0
   643
sl@0
   644
	@param  aResultSet
sl@0
   645
	        The ResultSet used to contain the recognition results
sl@0
   646
sl@0
   647
    @since  8.0
sl@0
   648
    */
sl@0
   649
	IMPORT_C void GetResultSetL(CSDClientResultSet& aResultSet);
sl@0
   650
	
sl@0
   651
private:
sl@0
   652
	void DoGetEnginePropertiesL(const RArray<TInt>& aPropertyId, 
sl@0
   653
					RArray<TInt>& aPropertyValue);
sl@0
   654
	void DoLoadEngineParametersL(const RArray<TInt>& aParameterId, 
sl@0
   655
								const RArray<TInt>& aParameterValue);
sl@0
   656
sl@0
   657
					
sl@0
   658
	CBufFlat* ExternalizeIntArrayL(const RArray<TInt>& aArray);
sl@0
   659
	void InternalizeIntArrayL(TDes8& aDes, TInt aNumberElements, RArray<TInt>& aArray);
sl@0
   660
	
sl@0
   661
	void DoRecognizeL(CSDClientResultSet& aResultSet);
sl@0
   662
private:
sl@0
   663
	TAny* iReservedPtr_1;	// reserved for future expansion
sl@0
   664
	TAny* iReservedPtr_2;	// reserved for future expansion
sl@0
   665
};
sl@0
   666
sl@0
   667
#endif  // __SPEECHRECOGNITIONCUSTOMCOMMANDS_H__