srsf/sisrscontrollerplugin/src/sicontrollerplugininterface.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  This is the main interface of the SI Controller Plugin.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SICONTROLLERPLUGININTERFACE_H
       
    21 #define SICONTROLLERPLUGININTERFACE_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <mmfcontroller.h>
       
    25 #include <nsssispeechrecognitioncustomcommandimplementor.h>
       
    26 #include <nsssispeechrecognitiondataclient.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CSIControllerPlugin;
       
    30 class CSDClientResultSet;
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  This is the main interface class of SI Controller Plugin
       
    37 *
       
    38 *  @lib SIControllerPlugin.lib
       
    39 *  @since 2.8
       
    40 */
       
    41 class CSIControllerPluginInterface : public CMMFController,
       
    42 public MSISpeechRecognitionCustomCommandImplementor
       
    43 {
       
    44 public:  // Constructors and destructor
       
    45 	
       
    46     /**
       
    47     * Two-phased constructor.
       
    48 	*/
       
    49 	static CSIControllerPluginInterface* NewL();
       
    50 	
       
    51 	/**
       
    52 	* Destructor.
       
    53 	*/
       
    54 	virtual ~CSIControllerPluginInterface();
       
    55 	
       
    56 public: // Functions from base classes
       
    57 	
       
    58     /**
       
    59     * From CMMFController
       
    60     * Add a data source to the controller plugin.
       
    61     * @since 2.8
       
    62     * @param aDataSource reference to the data source to be added
       
    63 	*/
       
    64 	void AddDataSourceL( MDataSource& aDataSource );
       
    65 	
       
    66 	/**
       
    67 	* From CMMFController
       
    68 	* Add a data sink to the controller plugin. Not supported.
       
    69 	* @since 2.8
       
    70 	* @param	aDataSink			reference to the data sink to be added
       
    71 	*/
       
    72 	void AddDataSinkL( MDataSink& aDataSink );
       
    73 	
       
    74 	/**
       
    75 	* From CMMFController
       
    76 	* Remove a data source from the controller plugin. Not supported.
       
    77 	* @since 2.8
       
    78 	* @param	aDataSource			reference to the data source to be removed
       
    79 	*/
       
    80 	void RemoveDataSourceL( MDataSource& aDataSource );
       
    81 	
       
    82 	/**
       
    83 	* From CMMFController
       
    84 	* Remove a data sink from the controller plugin. Not supported.
       
    85 	* @since 2.8
       
    86 	* @param	aDataSink			reference to the data sink to be removed
       
    87 	*/
       
    88 	void RemoveDataSinkL( MDataSink& aDataSink );
       
    89 	
       
    90 	/**
       
    91 	* From CMMFController
       
    92 	* Reset the controller plugin. Not supported.
       
    93 	* @since 2.8
       
    94 	*/
       
    95 	void ResetL();
       
    96 	
       
    97 	/**
       
    98 	* From CMMFController
       
    99 	* Prime the controller plugin. Not supported.
       
   100 	* @since 2.8
       
   101 	*/
       
   102 	void PrimeL();
       
   103 	
       
   104 	/**
       
   105 	* From CMMFController
       
   106 	* Commence playback. Not supported.
       
   107 	* @since 2.8
       
   108 	*/
       
   109 	void PlayL();
       
   110 	
       
   111 	/**
       
   112 	* From CMMFController
       
   113 	* Pause the controller plugin. Not supported.
       
   114 	* @since 2.8
       
   115 	*/
       
   116 	void PauseL();
       
   117 	
       
   118 	/**
       
   119 	* From CMMFController
       
   120 	* Stop the controller plugin. Not supported.
       
   121 	* @since 2.8
       
   122 	*/
       
   123 	void StopL();
       
   124 	
       
   125 	/**
       
   126 	* From CMMFController
       
   127 	* Get the current position. Not supported.
       
   128 	* @since 2.8
       
   129 	*/
       
   130 	TTimeIntervalMicroSeconds PositionL() const;
       
   131 	
       
   132 	/**
       
   133 	* From CMMFController
       
   134 	* Set the current position. Not supported.
       
   135 	* @since 2.8
       
   136 	* @param	aPosition			desired position in microseconds
       
   137 	*/
       
   138 	void SetPositionL( const TTimeIntervalMicroSeconds& aPosition );
       
   139 	
       
   140 	/**
       
   141 	* From CMMFController
       
   142 	* Get the duration of the clip. Not supported.
       
   143 	* @since 2.8
       
   144 	*/
       
   145 	TTimeIntervalMicroSeconds DurationL() const;
       
   146 	
       
   147 	/**
       
   148 	* From CMMFController
       
   149 	* Set the priority settings for this controller.
       
   150 	* @since 2.8
       
   151 	* @param	aPrioritySettings	new priority settings
       
   152 	*/
       
   153 	void SetPrioritySettings( const TMMFPrioritySettings& aPrioritySettings );
       
   154 	
       
   155 	/**
       
   156 	* From CMMFController
       
   157 	* Retrieve the number of meta data entries in the clip. Not supported.
       
   158 	* @since 2.8
       
   159 	* @param	aNumberOfEntries	reference where the number of entries is set
       
   160 	*/
       
   161 	void GetNumberOfMetaDataEntriesL( TInt& aNumberOfEntries );
       
   162 	
       
   163 	/**
       
   164 	* From CMMFController
       
   165 	*	Retrieve a meta data entry from the clip. Not supported.
       
   166 	* @since 2.8
       
   167 	* @param	aIndex				index of the meta data entry to retrieve
       
   168 	*/
       
   169 	CMMFMetaDataEntry* GetMetaDataEntryL( TInt aIndex );
       
   170 	
       
   171 	/**
       
   172 	* From MSISpeechRecognitionCustomCommandImplementor
       
   173 	* Adds a new pronunciation for the given model into the specified lexicon.
       
   174 	* @since 2.8
       
   175 	* @param	aLexiconID			lexicon Id, where the new pronunciation is added to
       
   176 	* @param	aModelBankID		model bank Id
       
   177 	* @param	aModelID			model Id
       
   178 	* @param	aPronunciationID	reference where a new pronunciation Id is assigned to
       
   179 	*/
       
   180 	//SD Remove
       
   181 	void MSrAddPronunciationL( TSILexiconID aLexiconID, TSIModelBankID aModelBankID,
       
   182 		TSIModelID aModelID,TSIPronunciationID& aPronunciationID );
       
   183 	
       
   184     /**
       
   185     * From MSISpeechRecognitionCustomCommandImplementor
       
   186     * Adds a new rule for the given pronunciation into the specified grammar.
       
   187     * @since 2.8
       
   188     * @param	aGrammarID			grammar Id, where the new rule is added to
       
   189     * @param	aLexiconID			lexicon Id
       
   190     * @param	aPronunciationID	pronunciation Id
       
   191     * @param	aRuleID				reference where a new rule Id is assigned to
       
   192 	*/
       
   193 	//SD Remove
       
   194 	void MSrAddRuleL( TSIGrammarID aGrammarID, TSILexiconID aLexiconID,
       
   195 		TSIPronunciationID aPronunciationID, TSIRuleID& aRuleID );
       
   196 	
       
   197 	/**
       
   198     * From MSISpeechRecognitionCustomCommandImplementor
       
   199     * Cancels the current activity and returns the plugin to Idle state.
       
   200     * @since 2.8
       
   201 	*/
       
   202 	void MSrCancel();
       
   203 	
       
   204 	/**
       
   205 	* From MSISpeechRecognitionCustomCommandImplementor
       
   206 	* Commits (saves) the current trained model into a permanent storage.
       
   207 	* @since 2.8
       
   208 	*/
       
   209 	void MSrCommitChangesL();
       
   210 	
       
   211 	/**
       
   212 	* From MSISpeechRecognitionCustomCommandImplementor
       
   213 	* Creates a new grammar.
       
   214 	* @since 2.8
       
   215 	* @param	aGrammarID			reference where a new rule Id is assigned to
       
   216 	*/
       
   217 	void MSrCreateGrammarL( TSIGrammarID& aGrammarID );
       
   218 	
       
   219 	/**
       
   220 	* From MSISpeechRecognitionCustomCommandImplementor
       
   221 	* Creates a new lexicon.
       
   222 	* @since 2.8
       
   223 	* @param	aLexiconID			reference where a new lexicon Id is assigned to
       
   224 	*/
       
   225 	void MSrCreateLexiconL( TSILexiconID& aLexiconID );
       
   226 	
       
   227 	/**
       
   228 	* From MSISpeechRecognitionCustomCommandImplementor
       
   229 	* Creates a new model bank.
       
   230 	* @since 2.8
       
   231 	* @param	aModelBankID		reference where a new model bank Id is assigned to
       
   232 	*/
       
   233 	void MSrCreateModelBankL( TSIModelBankID& aModelBankID );
       
   234 	
       
   235 	/**
       
   236 	* From MSISpeechRecognitionCustomCommandImplementor
       
   237 	* Ends the current recognition session.  Resources allocated for recognition are freed.
       
   238 	* @since 2.8
       
   239 	* @param	aModelBankID		reference where a new model bank Id is assigned to
       
   240 	*/
       
   241 	void MSrEndRecSessionL();
       
   242 	
       
   243 	/**
       
   244 	* From MSISpeechRecognitionCustomCommandImplementor
       
   245 	* Returns all grammar Ids that belong to the current client, whose UID was set
       
   246 	* with MSrSetClientUid().
       
   247 	* @since 2.8
       
   248 	* @param	aGrammarIDs			reference where grammar Ids are stored
       
   249 	*/
       
   250 	void MSrGetAllClientGrammarIDsL( RArray<TSIGrammarID>& aGrammarIDs );
       
   251 	
       
   252 	/**
       
   253 	* From MSISpeechRecognitionCustomCommandImplementor
       
   254 	* Returns all lexicon Ids that belong to the current client, whose UID was set
       
   255 	* with MSrSetClientUid().
       
   256 	* @since 2.8
       
   257 	* @param	aLexiconIDs			reference where lexicon Ids are stored
       
   258 	*/
       
   259 	void MSrGetAllClientLexiconIDsL( RArray<TSILexiconID>& aLexiconIDs );
       
   260 	
       
   261 	/**
       
   262 	* From MSISpeechRecognitionCustomCommandImplementor
       
   263 	* Returns all model bank Ids that belong to the current client, whose UID was set
       
   264 	* with MSrSetClientUid().
       
   265 	* @since 2.8
       
   266 	* @param	aModelBankIDs		reference where model bank Ids are stored
       
   267 	*/
       
   268 	void MSrGetAllClientModelBankIDsL( RArray<TSIModelBankID>& aModelBankIDs );
       
   269 	
       
   270 	/**
       
   271 	* From MSISpeechRecognitionCustomCommandImplementor
       
   272 	* Returns all grammar Ids that exist (for all clients).
       
   273 	* @since 2.8
       
   274 	* @param	aGrammarIDs			reference where grammar Ids are stored
       
   275 	*/
       
   276 	void MSrGetAllGrammarIDsL( RArray<TSIGrammarID>& aGrammarIDs );
       
   277 	
       
   278 	/**
       
   279 	* From MSISpeechRecognitionCustomCommandImplementor
       
   280 	* Returns all lexicon Ids that exist (for all clients).
       
   281 	* @since 2.8
       
   282 	* @param	aLexiconIDs			reference where lexicon Ids are stored
       
   283 	*/
       
   284 	void MSrGetAllLexiconIDsL( RArray<TSILexiconID>& aLexiconIDs );
       
   285 	
       
   286 	/**
       
   287 	* From MSISpeechRecognitionCustomCommandImplementor
       
   288 	* Returns all model bank Ids that exist (for all clients).
       
   289 	* @since 2.8
       
   290 	* @param	aModelBankIDs		reference where model bank Ids are stored
       
   291 	*/
       
   292 	void MSrGetAllModelBankIDsL( RArray<TSIModelBankID>& aModelBankIDs );
       
   293 	
       
   294 	/**
       
   295 	* From MSISpeechRecognitionCustomCommandImplementor
       
   296 	* Returns all model Ids that exist in the specified model bank.
       
   297 	* @since 2.8
       
   298 	* @param	aModelBankID		model bank Id
       
   299 	* @param	aModelIDs			reference where model Ids are stored
       
   300 	*/
       
   301 	//SD
       
   302 	void MSrGetAllModelIDsL( TSIModelBankID aModelBankID, RArray<TSIModelID>& aModelIDs );
       
   303 	
       
   304 	/**
       
   305 	* From MSISpeechRecognitionCustomCommandImplementor
       
   306 	* Returns all pronunciation Ids that exist in the specified lexicon.
       
   307 	* @since 2.8
       
   308 	* @param	aLexiconID			lexicon Id
       
   309 	* @param	aPronunciationIDs	reference where pronunciation Ids are stored
       
   310 	*/
       
   311 	void MSrGetAllPronunciationIDsL( TSILexiconID aLexiconID,
       
   312 		RArray<TSIPronunciationID>& aPronunciationIDs );
       
   313 	
       
   314     /**
       
   315     * From MSISpeechRecognitionCustomCommandImplementor
       
   316     * Returns all rule Ids that exist in the specified grammar.
       
   317     * @since 2.8
       
   318     * @param	aGrammarID			grammar Id
       
   319     * @param	aRuleIDs			reference where rule Ids are stored
       
   320 	*/
       
   321 	void MSrGetAllRuleIDsL( TSIGrammarID aGrammarID, RArray<TSIRuleID>& aRuleIDs );
       
   322 	
       
   323 	/**
       
   324 	* From MSISpeechRecognitionCustomCommandImplementor
       
   325 	* Returns the number of models available for training system wide, based on
       
   326 	* available disk space.
       
   327 	* @since 2.8
       
   328 	* @param	aCount				reference where the number of available models is set
       
   329 	*/
       
   330 	//SD
       
   331 	void MSrGetAvailableStorageL( TInt& aCount );
       
   332 	
       
   333 	/**
       
   334 	* From MSISpeechRecognitionCustomCommandImplementor
       
   335 	* Returns the engine properties specified by the engine property ID array.
       
   336 	* On return aPropertyValue contains an array of engine properties.
       
   337 	* @since 2.8
       
   338 	* @param	aPropertyId			constant reference to array of engine property Ids
       
   339 	* @param	aPropertyValue		reference to array of engine property values
       
   340 	*/
       
   341 	void MSrGetEnginePropertiesL( const RArray<TInt>& aPropertyId,
       
   342 		RArray<TInt>& aPropertyValue );
       
   343 	
       
   344     /**
       
   345     * From MSISpeechRecognitionCustomCommandImplementor
       
   346     * Returns the number of models in the specified model bank.
       
   347     * @since 2.8
       
   348     * @param	aModelBankID		model bank Id
       
   349     * @param	aCount				reference where the number of models is set
       
   350 	*/
       
   351 	//SD
       
   352 	void MSrGetModelCountL( TSIModelBankID aModelBankID, TInt& aCount );
       
   353 	
       
   354 	/**
       
   355 	* From MSISpeechRecognitionCustomCommandImplementor
       
   356 	* Checks if the rule is valid or not.
       
   357 	* @since 2.8
       
   358 	* @param	aGrammarID			grammar Id
       
   359 	* @param	aRuleID				rule Id
       
   360 	* @param	aValid				reference where the validity of the rule is set
       
   361 	*/
       
   362 	void MSrGetRuleValidityL( TSIGrammarID aGrammarID, TSIRuleID aRuleID, TBool& aValid );
       
   363 	
       
   364 	/**
       
   365 	* From MSISpeechRecognitionCustomCommandImplementor
       
   366 	* Returns the duration of the utterance for the specified model.
       
   367 	* @since 2.8
       
   368 	* @param	aModelBankID		model bank Id
       
   369 	* @param	aModelID			model Id
       
   370 	* @param	aDuration			reference where the duration of utterance is set
       
   371 	*/
       
   372 	//SD
       
   373 	void MSrGetUtteranceDurationL( TSIModelBankID aModelBankID, TSIModelID aModelID,
       
   374 		TTimeIntervalMicroSeconds32& aDuration );
       
   375 	
       
   376     /**
       
   377     * From MSISpeechRecognitionCustomCommandImplementor
       
   378     * Loads the specified recognizer parameter(s).  These parameters are used to
       
   379     * alter the recognizer's default parameters.  The parameters are specified as
       
   380     * attribute and value pairs.
       
   381     * @since 2.8
       
   382     * @param	aParameterID		list of parameter Ids
       
   383     * @param	aParameterValue		list of parameter values
       
   384 	*/
       
   385 	void MSrLoadEngineParametersL( const RArray<TInt>& aParameterId,
       
   386 		const RArray<TInt>& aParameterValue );
       
   387 	
       
   388     /**
       
   389     * From MSISpeechRecognitionCustomCommandImplementor
       
   390     * Loads the specified grammar into the recognizer; done prior to recognition.
       
   391     * @since 2.8
       
   392     * @param	aGrammarID			grammar Id
       
   393 	*/
       
   394 	void MSrLoadGrammarL( TSIGrammarID aGrammarID );
       
   395 	
       
   396 	/**
       
   397 	* From MSISpeechRecognitionCustomCommandImplementor
       
   398 	* Loads the specified lexicon into the recognizer; done prior to recognition.
       
   399 	* @since 2.8
       
   400 	* @param	aLexiconID			lexicon Id
       
   401 	*/
       
   402 	void MSrLoadLexiconL( TSILexiconID aLexiconID );
       
   403 	
       
   404 	/**
       
   405 	* From MSISpeechRecognitionCustomCommandImplementor
       
   406 	* Loads the specified model bank into the recognizer; done prior to recognition.
       
   407 	* @since 2.8
       
   408 	* @param	aModelBankID		model bank Id
       
   409 	*/
       
   410 	void MSrLoadModelsL( TSIModelBankID aModelBankID );
       
   411 	
       
   412 	/**
       
   413 	* From MSISpeechRecognitionCustomCommandImplementor
       
   414 	* Plays the previously trained utterance.
       
   415 	* @since 2.8
       
   416 	* @param	aModelBankID		model bank Id
       
   417 	* @param	aModelID			model Id, whose utterance is played
       
   418 	*/
       
   419 	//SD
       
   420 	void MSrPlayUtteranceL( TSIModelBankID aModelBankID, TSIModelID aModelID );
       
   421 	
       
   422 	/**
       
   423 	* From MSISpeechRecognitionCustomCommandImplementor
       
   424 	* Initiates recognition; performed following loading of model bank, lexicon, and grammar.
       
   425 	* @since 2.8
       
   426 	* @param	aResultSet			reference where the recognition result is set
       
   427 	*/
       
   428 	//SD
       
   429 	void MSrRecognizeL( CSDClientResultSet& aResultSet );
       
   430 	
       
   431 	/**
       
   432 	* From MSISpeechRecognitionCustomCommandImplementor
       
   433 	* Records uder utterance for training and recognition.
       
   434 	* @since 2.8
       
   435 	* @param	aRecordTime			recording time in microseconds
       
   436 	*/
       
   437 	void MSrRecordL( TTimeIntervalMicroSeconds32 aRecordTime );
       
   438 	
       
   439     /**
       
   440 	* From MSISpeechRecognitionCustomCommandImplementor.
       
   441 	* Starts sampling before MSrRecordL call.
       
   442 	*
       
   443 	* @since 3.2
       
   444 	*/
       
   445 	void MSrPreStartSamplingL();	
       
   446 	
       
   447 	/**
       
   448 	* From MSISpeechRecognitionCustomCommandImplementor
       
   449 	* Removes the specified grammar from the permanent storage.
       
   450 	* Removing a grammar will remove all rules within the grammar.
       
   451 	* @since 2.8
       
   452 	* @param	aGrammarID			grammar Id
       
   453 	*/
       
   454 	void MSrRemoveGrammarL( TSIGrammarID aGrammarID );
       
   455 	
       
   456 	/**
       
   457 	* From MSISpeechRecognitionCustomCommandImplementor
       
   458 	* Removes the specified lexicon from the permanent storage.
       
   459 	* Removing a lexicon will remove all pronunciations within the lexicon.
       
   460 	* @since 2.8
       
   461 	* @param	aLexiconID			lexicon Id
       
   462 	*/
       
   463 	void MSrRemoveLexiconL( TSILexiconID aLexiconID );
       
   464 	
       
   465 	/**
       
   466 	* From MSISpeechRecognitionCustomCommandImplementor
       
   467 	* Removes the specified model bank from the permanent storage.
       
   468 	* Removing a model bank will remove all models within the model bank.
       
   469 	* @since 2.8
       
   470 	* @param	aModelBankID		model bank Id
       
   471 	*/
       
   472 	void MSrRemoveModelBankL( TSIModelBankID aModelBankID );
       
   473 	
       
   474 	/**
       
   475 	* From MSISpeechRecognitionCustomCommandImplementor
       
   476 	* Removes the specified model from the specified model bank.
       
   477 	* @since 2.8
       
   478 	* @param	aModelBankID		model bank Id
       
   479 	* @param	aModelID			model Id
       
   480 	*/
       
   481 	//SD
       
   482 	void MSrRemoveModelL( TSIModelBankID aModelBankID, TSIModelID aModelID );
       
   483 	
       
   484 	/**
       
   485 	* From MSISpeechRecognitionCustomCommandImplementor
       
   486 	* Removes the specified pronunciation from the specified lexicon.
       
   487 	* @since 2.8
       
   488 	* @param	aLexiconID			lexicon Id
       
   489 	* @param	aPronunciationID	pronunciation Id
       
   490 	*/
       
   491 	void MSrRemovePronunciationL( TSILexiconID aLexiconID, TSIPronunciationID aPronunciationID );
       
   492 	
       
   493 	/**
       
   494 	* From MSISpeechRecognitionCustomCommandImplementor
       
   495 	* Removes the specified rule from the specified grammar.
       
   496 	* @since 2.8
       
   497 	* @param	aGrammarID			grammar Id
       
   498 	* @param	aRuleID				rule Id
       
   499 	*/
       
   500 	void MSrRemoveRuleL( TSIGrammarID aGrammarID, TSIRuleID aRuleID );
       
   501 	
       
   502     /**
       
   503 	* From MSISpeechRecognitionCustomCommandImplementor
       
   504     * Removes the specified rules from the specified grammar permanently.
       
   505     * If the rule contains rule variants, they are also destoryed.
       
   506     * @since	2.8
       
   507     * @param	aGrammarID			grammar Id
       
   508     * @param	aRuleIDs			array of rule ids
       
   509     */
       
   510     void MSrRemoveRulesL( TSIGrammarID aGrammarID, RArray<TSIRuleID>& aRuleIDs );
       
   511 
       
   512 	/**
       
   513 	* From MSISpeechRecognitionCustomCommandImplementor
       
   514 	* Sets the client's UID for data ownership identification.
       
   515 	* @since 2.8
       
   516 	* @param	aClientUid			client's UID
       
   517 	*/
       
   518 	void MSrSetClientUid( TUid aClientUid );
       
   519 	
       
   520 	/**
       
   521 	* From MSISpeechRecognitionCustomCommandImplementor
       
   522 	* Starts a new recognition session.
       
   523 	* @since 2.8
       
   524 	* @param	aMode				recognition mode
       
   525 	*/
       
   526 	void MSrStartRecSessionL( TNSSRecognitionMode aMode );
       
   527 	
       
   528 	/**
       
   529 	* From MSISpeechRecognitionCustomCommandImplementor
       
   530 	* Trains a new model into the specified model bank.
       
   531 	* @since 2.8
       
   532 	* @param	aModelBankID		model bank Id
       
   533 	* @param	aModelID			reference where a new model Id is assigned to
       
   534 	*/
       
   535 	//SD
       
   536 	void MSrTrainL( TSIModelBankID aModelBankID, TSIModelID& aModelID );
       
   537 	
       
   538 	/**
       
   539 	* From MSISpeechRecognitionCustomCommandImplementor
       
   540 	* Unloads the specified rule from the specified grammar in temporary memory, previously
       
   541 	* loaded with LoadGrammarL.  The rule in the permanent storage remains intact.
       
   542 	* @since 2.8
       
   543 	* @param	aGrammarID			grammar Id
       
   544 	* @param	aRuleID				rule Id
       
   545 	*/
       
   546 	void MSrUnloadRuleL( TSIGrammarID aGrammarID, TSIRuleID aRuleID );
       
   547 	
       
   548 	///SI Component
       
   549 	
       
   550 	
       
   551 	/**
       
   552 	* From MSISpeechRecognitionCustomCommandImplementor
       
   553 	* Does speaker adapation to speaker independent models
       
   554 	* @since 2.8
       
   555 	* @param	aResultSet			a recognition result containing adaptation data
       
   556 	* @param	aCorrect			identifies the correct recognition result from the N-best list.
       
   557 	*/           
       
   558 	void MSrAdaptL( CSIClientResultSet& aResultSet ,TInt aCorrect);
       
   559 
       
   560 	/**
       
   561 	* From MSISpeechRecognitionCustomCommandImplementor
       
   562 	* Adds a new pronunciation for the given model into the specified lexicon.
       
   563 	* @since 2.8
       
   564 	* @param	aLexiconID			lexicon Id
       
   565 	* @param	aTrainText:			the text to be trained
       
   566  	* @param	aLanguage			the pronunciation language	
       
   567 	* @param	aPronunciationID: reference where a new pronunciation identifier is set.
       
   568 	*/
       
   569 	void MSrAddPronunciationL(TSILexiconID aLexiconID, const TDesC& aTrainText,
       
   570 		TLanguage aLanguage, TSIPronunciationID& aPronunciationID) ;
       
   571 	
       
   572 	
       
   573     /**
       
   574     * From MSISpeechRecognitionCustomCommandImplementor
       
   575     * Adds a new rule variant for the given pronunciation into the specified grammar.
       
   576     * @since 2.8
       
   577     * @param	aGrammarID			grammar Id, where the new rule is added to
       
   578     * @param	aLexiconID			lexicon Id
       
   579     * @param	aPronunciationIDs	pronunciation Id array
       
   580     * @param	aRuleVariantID		reference where a new rule Variant Id is assigned to
       
   581 	*/
       
   582 	void MSrAddRuleVariantL(TSIGrammarID aGrammarID, TSILexiconID aLexiconID,
       
   583 		RArray<TSIPronunciationID>& aPronunciationIDs, TSIRuleID aRuleID, TSIRuleVariantID& aRuleVariantID );
       
   584 	
       
   585     /**
       
   586     * From MSISpeechRecognitionCustomCommandImplementor
       
   587     * Trains a new voice tag. The recognition phrase is the concatenation of words in the aTrainArray. 
       
   588     * Pronunciations are created with all given languages, which are supported.
       
   589     * @since 2.8
       
   590     * @param	aTrainArray:		Recognition phrase is formed by concatenating the descriptors in this array.
       
   591     * @param	aLanguageArray		Pronunciations are created with these languages. Not all languages are supported. The argument can be NULL.
       
   592     * @param	aLexiconID			lexicon Id
       
   593     * @param	aGrammarID			grammar Id, where the new rule is added to
       
   594     * @param	aRuleID		reference where a new rule Id is assigned to
       
   595 	*/
       
   596 	void MSrAddVoiceTagL( MDesCArray& aTrainArray,  RArray<TLanguage>& aLanguageArray, 
       
   597 		TSILexiconID aLexiconID, TSIGrammarID aGrammarID, TSIRuleID& aRuleID);
       
   598 	
       
   599     /**
       
   600     * From MSISpeechRecognitionCustomCommandImplementor
       
   601     * Adds several new voice tags.
       
   602     * @since 2.8
       
   603     * @param	aTrainArray : An array of MDesCArrays. The recognition phrases are formed by concatenating the descriptors in the MDesCArrays.
       
   604     * @param	aLanguageArray		Pronunciations are created with these languages. Not all languages are supported. The argument can be NULL.
       
   605     * @param	aLexiconID			lexicon Id
       
   606     * @param	aGrammarID			grammar Id, where the new rule is added to
       
   607     * @param	aRuleID		reference where a new rule Id is assigned to
       
   608 	*/
       
   609 	void MSrAddVoiceTagsL( RPointerArray<MDesCArray>* aTrainArray,  RArray<TLanguage>& aLanguageArray, TSILexiconID aLexiconID,
       
   610 		TSIGrammarID aGrammarID,  RArray<TSIRuleID>& aRuleID );
       
   611 	
       
   612 	/**
       
   613     * From MSISpeechRecognitionCustomCommandImplementor
       
   614     * Creates a new empty rule.
       
   615     * @since 2.8
       
   616     * @param	aGrammarID			grammar Id, where the new rule is added to
       
   617     * @param	aRuleID		reference where a new rule Id is assigned to
       
   618 	*/
       
   619 	void MSrCreateRuleL( TSIGrammarID aGrammarID, TSIRuleID& aRuleID );
       
   620 
       
   621 	/**
       
   622 	* From MSISpeechRecognitionCustomCommandImplementor
       
   623 	* Initiates recognition; performed following loading of model bank, lexicon, and grammar.
       
   624 	* @since 2.8
       
   625 	* @param	aResultSet: reference where the recognition result is set. 
       
   626 	*/		
       
   627 	void MSrRecognizeL( CSIClientResultSet& aResultSet );
       
   628 	
       
   629 	/**
       
   630 	* From MSISpeechRecognitionCustomCommandImplementor
       
   631 	* Ends recording. Unlike Cancel(), this function may return a recognition 
       
   632 	* result if adequate number of samples was already recorded.		
       
   633 	* @since 2.8
       
   634 	*/				
       
   635 	void MSrEndRecordL();
       
   636 	
       
   637 	/**
       
   638 	* From MSISpeechRecognitionCustomCommandImplementor
       
   639 	* Unloads the specified grammar from the temporary memory, 
       
   640 	* previously loaded with MSrLoadGrammarL. The grammar in the permanent storage remains intact. 
       
   641 	* result if adequate number of samples was already recorded.		
       
   642 	* @since 2.8
       
   643 	* @param	aGrammarID			grammar Id,  
       
   644 	*/	
       
   645 	void MSrUnloadGrammarL( TSIGrammarID aGrammarID );
       
   646 		
       
   647 	/**
       
   648 	* From MSISpeechRecognitionCustomCommandImplementor
       
   649 	* Activiate specified grammar after deactivating. 	
       
   650 	* @since 2.8
       
   651 	* @param	aGrammarID			grammar Id,  
       
   652 	*/	
       
   653 	void MSrActivateGrammarL( TSIGrammarID aGrammarID );
       
   654 			
       
   655 	/**
       
   656 	* 
       
   657 	* Deactivates a specified grammar.
       
   658 	* @since 2.8
       
   659 	* @param	aGrammarID			grammar Id,  
       
   660 	*/	
       
   661 	void MSrDeactivateGrammarL( TSIGrammarID aGrammarID );
       
   662 				
       
   663 	/**
       
   664 	* 
       
   665 	* Get the number of Pronunciations in the lexicon  
       
   666 	* @since 2.8
       
   667 	* @param	aLexiconID			lexicon Id, 
       
   668 	* @param	aCount				number of pronunciations, 		
       
   669 	*/	
       
   670 	void MSrGetPronunciationCountL( TSILexiconID aLexiconID, TInt& aCount );
       
   671 	
       
   672 	/**
       
   673 	* 
       
   674 	* Get the number of rules in the Grammar 
       
   675 	* @since 2.8
       
   676 	* @param	aGrammarID			grammar Id, 
       
   677 	* @param	aCount				number of rules, 		
       
   678 	*/	
       
   679 	void MSrGetRuleCountL( TSIGrammarID aGrammarID, TInt& aCount );
       
   680 
       
   681     
       
   682     /**
       
   683     * From MSISpeechRecognitionCustomCommandImplementor
       
   684     * Trains one SINDE voice tag. Adds the text to the lexicon, and 
       
   685     * creates the required rules and rule variants.
       
   686     * 
       
   687     * @since 3.1
       
   688     * @param aTrainArray The phrase to be trained, split into subwords
       
   689     * @param aLanguageArray The pronunciation languages for each of the 
       
   690     * @param aLexiconID Lexicon identifier
       
   691     * @param aGrammarID Grammar identifier
       
   692     * @param aRuleID Reference, where the new rule identifier is assigned to.
       
   693     */
       
   694     void MSrAddSindeVoiceTagL( MDesCArray& aTrainArray,
       
   695                                RArray<RLanguageArray>& aLanguageArray,
       
   696                                TSILexiconID aLexiconID,
       
   697                                TSIGrammarID aGrammarID,
       
   698                                TSIRuleID& aRuleID );
       
   699     
       
   700     /**
       
   701     * From MSISpeechRecognitionCustomCommandImplementor
       
   702     * Trains SINDE voice tags. If the training fails for some of the names
       
   703     * (but not all), it is signaled by setting the Rule ID to KInvalidRuleID.
       
   704     * 
       
   705     * @since 3.1
       
   706     * @param aTrainArray The phrase to be trained, split into subwords
       
   707     * @param aLanguageArray The pronunciation languages
       
   708     * @param aLexiconID Lexicon identifier
       
   709     * @param aGrammarID Grammar identifier
       
   710     * @param aRuleID Referenceto an array, where the new
       
   711     *                rule identifiers are assigned to.
       
   712     */
       
   713     void MSrAddSindeVoiceTagsL( RPointerArray<MDesCArray>* aTrainArray,
       
   714                                 RArray<RLanguageArray>& aLanguageArray,
       
   715                                 TSILexiconID aLexiconID,
       
   716                                 TSIGrammarID aGrammarID,
       
   717                                 RArray<TSIRuleID>& aRuleID );
       
   718     
       
   719     
       
   720 	public: // New functions
       
   721 		
       
   722         /**
       
   723         * Sends an event to the client.
       
   724         * @since 2.8
       
   725         * @param	aEvent				event
       
   726         * @param	aResult				result
       
   727         */
       
   728         void SendSrsEvent( TUid aEvent, TInt aResult );
       
   729 	
       
   730     private:
       
   731 		
       
   732         /**
       
   733         * C++ default constructor.
       
   734         */
       
   735         CSIControllerPluginInterface();
       
   736 		
       
   737         /**
       
   738         * By default Symbian 2nd phase constructor is private.
       
   739         */
       
   740 		void ConstructL();
       
   741 		
       
   742 		
       
   743     private:    // Data
       
   744 		
       
   745 		// SI Controller Plugin Implementation
       
   746 		CSIControllerPlugin* iController;
       
   747 
       
   748     };
       
   749 	
       
   750 #endif // SICONTROLLERPLUGININTERFACE_H
       
   751 	
       
   752 // End of File