srsfenginestub/common/inc/nsssispeechrecognitiondatadevasr.h
changeset 0 0ce1b5ce9557
equal deleted inserted replaced
-1:000000000000 0:0ce1b5ce9557
       
     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:     This file contains definition of the SISpeechRecognitionDataDevASR structure and API.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef __SRSIDATA_DEVASR_H__
       
    23 #define __SRSIDATA_DEVASR_H__
       
    24 
       
    25 //  INCLUDES
       
    26 #include <nsssispeechrecognitiondatacommon.h>
       
    27  
       
    28 // FORWARD DECLARATION
       
    29 class CSILexicon;
       
    30 class CSICompiledGrammar;
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  Class to encapsulate a user defined parameters
       
    37 *
       
    38 *  @lib nsssispeechrecognitiondata.lib
       
    39 *  @since 2.8
       
    40 */
       
    41 class CSIParameters : public CBase
       
    42 	{
       
    43 	public: // Constructors and destructor
       
    44 		/**
       
    45 		* Destructor.
       
    46         */
       
    47 		IMPORT_C virtual ~CSIParameters();
       
    48 
       
    49 		/**
       
    50 		* Two-phased constructor.
       
    51 		*/
       
    52 		IMPORT_C static CSIParameters* NewL();
       
    53 
       
    54 		IMPORT_C static CSIParameters* NewLC();
       
    55 	public: // New functions
       
    56 		
       
    57 		/**
       
    58         * Use to set an internal parameter.
       
    59         * @since 2.8
       
    60 		* @param aParameterIndex Parameter index
       
    61 		* @param aParameter Parameter value
       
    62         * @return None.
       
    63         */ 
       
    64 		IMPORT_C virtual void SetParameterL( const TInt aParameterID, const TInt aParameterValue );
       
    65 		
       
    66 		/**
       
    67         * Use to retrieve an internal parameter.
       
    68         * @since 2.8
       
    69 		* @param aParameterIndex Parameter index
       
    70         * @return Parameter value.
       
    71         */ 
       
    72 		IMPORT_C virtual TInt ParameterL( const TInt aParameterID ) const;
       
    73 	
       
    74 		/**
       
    75         * Internalize to a data stream
       
    76         * @since 2.8
       
    77 		* @param aStream Data stream
       
    78         * @return  None
       
    79         */ 
       
    80 		IMPORT_C virtual void InternalizeL(RReadStream& aStream );
       
    81 
       
    82 		/**
       
    83         * Externalize from a data stream
       
    84         * @since 2.8
       
    85 		* @param None
       
    86         * @return  aStream Data stream
       
    87         */ 
       
    88 		IMPORT_C virtual void ExternalizeL(RWriteStream& aStream ) const;
       
    89 
       
    90         /**
       
    91         * Returns all set parameters and their values.
       
    92         * @since 2.8
       
    93         * @param "RArray<TInt>& aParameterIDs" This array will contain parameter IDs after call.
       
    94         * @param "RArray<TInt>& aParameterValues" This array will contain parameter values after call.
       
    95         */
       
    96         IMPORT_C virtual void ListParametersL( RArray<TInt>& aParameterIDs, RArray<TInt>& aParameterValues ) const;
       
    97 
       
    98 	protected:
       
    99 		IMPORT_C virtual void ConstructL();
       
   100 		IMPORT_C CSIParameters();
       
   101 		
       
   102 	private:
       
   103 		RArray<TInt> iParameterIDs;
       
   104 		RArray<TInt> iParameterValues;	
       
   105 	};
       
   106 
       
   107 /**
       
   108 *  Class to encapsulate a Speaker Independent Rule variant
       
   109 *
       
   110 *  @lib nsssispeechRecognitionData.lib
       
   111 *  @since 2.8
       
   112 */
       
   113 class CSIRuleVariant : public CSIParameters
       
   114 	{
       
   115 	public: // Constructors and destructor
       
   116 		/**
       
   117 		* Destructor.
       
   118         */
       
   119 		IMPORT_C virtual ~CSIRuleVariant();
       
   120 		
       
   121         /**
       
   122         * Two-phased constructor.
       
   123         */
       
   124 		IMPORT_C static CSIRuleVariant* NewL( const TSIRuleVariantID aRuleVariantID, 
       
   125 											  const TSILexiconID aLexiconID);
       
   126 	    IMPORT_C static CSIRuleVariant* NewLC( const TSIRuleVariantID aRuleVariantID, 
       
   127 											  const TSILexiconID aLexiconID);
       
   128      	 
       
   129 	public: // New functions
       
   130 		
       
   131 		/**
       
   132         * Use to get the pronunciation Ids.
       
   133         * @since 2.8
       
   134 		* @param None.
       
   135         * @return Pronunciation identifier.
       
   136         */ 
       
   137 		IMPORT_C virtual void GetPronunciationIDsL( TSIPronunciationIDSequence& aPronunciationIDs ) const;
       
   138 
       
   139 		/**
       
   140         * Use to set the pronunciation Ids.
       
   141         * @since 2.8
       
   142 		* @param Pronunciation identifier .
       
   143         */ 
       
   144 		IMPORT_C virtual void SetPronunciationIDsL( const TSIPronunciationIDSequence& aPronunciationIDs );
       
   145 
       
   146 		/**
       
   147         * Get Language of the rule variant
       
   148         * @since 2.8
       
   149         * @return Language of the rule variant
       
   150         */ 
       
   151 		IMPORT_C virtual TLanguage Language() const;  
       
   152 		
       
   153 		/**
       
   154         * Set Language of the rule variant
       
   155         * @since 2.8
       
   156         * @param Language of the rule variant
       
   157         * @return None
       
   158         */ 
       
   159 		IMPORT_C virtual void SetLanguage(TLanguage aLanguage);
       
   160 		
       
   161 		
       
   162 		/**
       
   163         * Use to retrieve the lexicon Id.
       
   164         * @since 2.8
       
   165 		* @param None.
       
   166         * @return Lexicon identifier.
       
   167         */ 
       
   168 		IMPORT_C virtual TSILexiconID LexiconID() const;
       
   169 		
       
   170 		/**
       
   171         * Use to retrieve the rule variant Id.
       
   172         * @since 2.8
       
   173         * @param None.
       
   174         * @return Rule identifier.
       
   175         */ 
       
   176 		IMPORT_C virtual TSIRuleVariantID RuleVariantID() const;
       
   177 		
       
   178 		
       
   179 		
       
   180 		
       
   181 	protected:
       
   182 		IMPORT_C virtual void ConstructL();
       
   183 		IMPORT_C CSIRuleVariant( const TSIRuleVariantID aRuleVariantID, 
       
   184 			const TSILexiconID aLexiconID );
       
   185 		
       
   186 	private:
       
   187 		TSIRuleVariantID iRuleVariantID;
       
   188 		TSIPronunciationIDSequence iPronunciationIDs;
       
   189 		TSILexiconID iLexiconID;
       
   190 		TLanguage iLanguage;
       
   191 		TInt* iParameterArray;
       
   192 		TInt iNParameters;
       
   193 		TAny* iReserved;
       
   194 	};
       
   195 
       
   196 /**
       
   197 *  Class to encapsulate a Speaker Independent Rule
       
   198 *
       
   199 *  @lib nsssispeechrecognitiondata.lib
       
   200 *  @since 2.8
       
   201 */
       
   202 class CSIRule : public CBase
       
   203 	{
       
   204 	public:// Constructors and destructor
       
   205 		   /**
       
   206 		   * Destructor.
       
   207         */
       
   208 		IMPORT_C virtual ~CSIRule();
       
   209 		
       
   210         /**
       
   211         * Two-phased constructor.
       
   212         */
       
   213 		IMPORT_C static CSIRule* NewL( const TSIRuleID aRuleID );
       
   214 	    IMPORT_C static CSIRule* NewLC( const TSIRuleID aRuleID );
       
   215        	
       
   216 	public: // New functions
       
   217 		/**
       
   218 			* Use to retrieve the rule Id.
       
   219 			* @since 2.8
       
   220 			* @param None.
       
   221 			* @return Rule identifier.
       
   222         */ 
       
   223 		IMPORT_C virtual TSIRuleID RuleID() const;
       
   224 	/**
       
   225 		* Use to retrieve number of rule variants.
       
   226 		* @since 2.8
       
   227 		* @param None.
       
   228 		* @return Number of rule variants.
       
   229        */
       
   230 		IMPORT_C virtual TInt Count() const;
       
   231 		
       
   232  		/**
       
   233 		* Use to retrieve the rule variant based on index.
       
   234 		* @since 2.8
       
   235 		* @param aIndex Index of rule variant.
       
   236 		* @return Rule variant.
       
   237         */
       
   238 		IMPORT_C virtual CSIRuleVariant& AtL(TInt aIndex) const;	
       
   239 		
       
   240 	
       
   241 			/**
       
   242 		* Use to add new rule variant.
       
   243 		* @since 2.8
       
   244 		* @param aRuleVariant New rule variant.
       
   245 		* @return None.
       
   246         */
       
   247 		IMPORT_C virtual void AddL(CSIRuleVariant* aRuleVariant);
       
   248 	
       
   249 	/**
       
   250 		* Use to retrieve the rule variant index based on Id.
       
   251 		* @since 2.8
       
   252 			* @param aRuleVariantID Identifier of rule variant.
       
   253 		* @return Rule variant.
       
   254         */
       
   255 		IMPORT_C virtual TInt Find(TSIRuleVariantID aRuleVariantID) const;
       
   256 	
       
   257 
       
   258 		IMPORT_C virtual CSIRuleVariant&  RuleVariantL(TSIRuleVariantID aRuleVariantID) const;
       
   259 	
       
   260 		/**
       
   261 		* Use to delete rule variant.
       
   262 		* @since 2.8
       
   263 		* @param aRuleVariant Rule variant identifier.
       
   264 			* @return None.
       
   265         */
       
   266 		IMPORT_C virtual void DeleteL(TSIRuleVariantID aRuleVariantID);
       
   267 	 	 
       
   268         /**
       
   269         * Compares two CSIRule objects.
       
   270         * Returns 0 if rule ids are equal.
       
   271         * Returns -1 if first id is smaller.
       
   272         * Returns 1 if second id is smaller.
       
   273         *
       
   274         * @param "const CSIRule& aFirst" First rule to compare
       
   275         * @param "const CSIRule& aSecond" Second rule to compare
       
   276         * @return 0, -1 or 1
       
   277         */
       
   278 		static TInt Compare( const CSIRule& aFirst, const CSIRule& aSecond );
       
   279 
       
   280 	protected:
       
   281 		IMPORT_C virtual void ConstructL();
       
   282 		IMPORT_C CSIRule( const TSIRuleID aRuleID );
       
   283 		
       
   284 	private:
       
   285 		TSIRuleID iRuleID;
       
   286 		RPointerArray<CSIRuleVariant> iRuleVariantArray;
       
   287 		TAny* iReserved;
       
   288 	};
       
   289 
       
   290 
       
   291 /**
       
   292 *  Class to encapsulate a Speaker Independent Grammar
       
   293 *  A grammar consist of a list of rules
       
   294 *
       
   295 *  @lib nsssispeechrecognitiondata.lib
       
   296 *  @since 2.8
       
   297 */
       
   298 class CSIGrammar : public CBase
       
   299 	{
       
   300 	public:// Constructors and destructor
       
   301 		   /**
       
   302 		   * Destructor.
       
   303         */
       
   304 		IMPORT_C virtual ~CSIGrammar();
       
   305 		
       
   306         /**
       
   307         * Two-phased constructor.
       
   308         */
       
   309 		IMPORT_C static CSIGrammar* NewL(const TSIGrammarID aGrammarID);
       
   310 		IMPORT_C static CSIGrammar* NewLC(const TSIGrammarID aGrammarID);
       
   311  		
       
   312 	public: // New functions
       
   313 
       
   314 		/**
       
   315         * Use to add a rule to the grammar.
       
   316         * @since 2.8
       
   317 		* @param aRule - reference to CSIRule object.
       
   318         * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes.
       
   319         */
       
   320 		IMPORT_C virtual void AddL(CSIRule* aRule);
       
   321 		
       
   322 		
       
   323 		/**
       
   324         * Use to return a rule based at an index.
       
   325         * @since 2.8
       
   326 		* @param aIndex: an index. Value must not be negative and must not be greater than the number of rules currently in the grammar, otherwise it raises a USER-130 panic.
       
   327         * @return Reference to CSIRule object.
       
   328         */
       
   329 		IMPORT_C virtual CSIRule& AtL(TInt aIndex) const;
       
   330 
       
   331 		/**
       
   332         * Use to delete a rule to the grammar.
       
   333         * @since 2.8
       
   334 		* @param aRuleID - rule identifier.
       
   335         * @return None.
       
   336         */
       
   337 		IMPORT_C virtual void DeleteL(const TSIRuleID aRuleID);
       
   338  		
       
   339 		/**
       
   340         * Use to get the number of rules in the grammar
       
   341         * @since 2.8
       
   342 		* @param None.
       
   343         * @return Number of rules.
       
   344         */  
       
   345 		IMPORT_C virtual TInt Count() const;
       
   346 		
       
   347 		/**
       
   348 			* Use to retrieve the grammar Id of the result.
       
   349 			* @since 2.8
       
   350 			* @param None.
       
   351 			* @return Grammar identifier.
       
   352         */
       
   353 		IMPORT_C virtual TSIGrammarID GrammarID() const;
       
   354 
       
   355 		/**
       
   356         * Use to find a rule in the grammar based on rule Id.
       
   357         * @since 2.8
       
   358 		* @param aRuleID - rule identifier.
       
   359         * @return The index of the first matching rule within the grammar.  KErrNotFound, if no matching rule can be found.
       
   360         */ 
       
   361 		
       
   362 		IMPORT_C virtual TInt Find(const TSIRuleID aRuleID) const;
       
   363 
       
   364 		IMPORT_C virtual CSIRule&  RuleL(TSIRuleID aRuleID) const;
       
   365 
       
   366 		/**
       
   367         * Internalize to a data stream
       
   368         * @since 2.8
       
   369 		* @param aStream Data stream
       
   370         * @return  None
       
   371         */ 
       
   372 		IMPORT_C virtual void InternalizeL(RReadStream& aStream );
       
   373 
       
   374 		/**
       
   375         * Externalize from a data stream
       
   376         * @since 2.8
       
   377 		* @param None
       
   378         * @return  aStream Data stream
       
   379         */ 
       
   380 		IMPORT_C virtual void ExternalizeL(RWriteStream& aStream ) const;
       
   381 
       
   382  	protected:
       
   383 		
       
   384 		IMPORT_C virtual void ConstructL();
       
   385 		IMPORT_C CSIGrammar(const TSIGrammarID aGrammarID);
       
   386 		
       
   387 	private:
       
   388 		TSIGrammarID iGrammarID;
       
   389 		RPointerArray<CSIRule> iRuleArray;
       
   390 		TAny* iReserved;
       
   391 	};
       
   392 
       
   393 /**
       
   394 *  Class to encapsulate a compiled grammar (ready for recognition)
       
   395 *
       
   396 *  @lib nsssispeechrecognitiondata.lib
       
   397 *  @since 2.8
       
   398 */ 
       
   399 class CSICompiledGrammar : public CSIGrammar
       
   400 	{
       
   401 	public:// Constructors and destructor
       
   402 		   /**
       
   403 		   * Destructor.
       
   404         */
       
   405 		IMPORT_C virtual ~CSICompiledGrammar();
       
   406 		
       
   407         /**
       
   408         * Two-phased constructor.
       
   409         */
       
   410 		IMPORT_C static CSICompiledGrammar* NewL(const TSIGrammarID aGrammarID); 
       
   411 		
       
   412 		IMPORT_C static CSICompiledGrammar* NewLC(const TSIGrammarID aGrammarID); 
       
   413 	public: // New functions
       
   414  		
       
   415 
       
   416 				/**
       
   417         * Use to delete a rule to the grammar.
       
   418         * @since 2.8
       
   419 		* @param aRuleID - rule identifier.
       
   420         * @return None.
       
   421         */
       
   422 		IMPORT_C virtual void DeleteL(const TSIRuleID aRuleID);
       
   423 		/**
       
   424         * Use to add a rule to the grammar.
       
   425         * @since 2.8
       
   426 		* @param aRule - reference to CSIRule object.
       
   427         * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes.
       
   428         */
       
   429 		IMPORT_C virtual void AddL(CSIRule* aRule);
       
   430  		
       
   431 
       
   432 		/**
       
   433         * Use to retrieve the recognition data.
       
   434         * @since 2.8
       
   435 		* @param None.
       
   436         * @return Reference to the recognition data.
       
   437         */ 
       
   438  		IMPORT_C virtual void SetCompiledData( HBufC8* aCompilerData);
       
   439 		
       
   440 		/**
       
   441         * Function to get compiler data
       
   442         * @since 2.8
       
   443         * @param None
       
   444         * @return Pointer to data
       
   445         */	
       
   446 		IMPORT_C virtual TDesC8&  CompiledData() const;
       
   447 		
       
   448 		/**
       
   449         * Internalize to a data stream
       
   450         * @since 2.8
       
   451 		* @param aStream Data stream
       
   452         * @return  None
       
   453         */ 
       
   454 		IMPORT_C virtual void InternalizeL(RReadStream& aStream );
       
   455 
       
   456 		/**
       
   457         * Externalize from a data stream
       
   458         * @since 2.8
       
   459 		* @param None
       
   460         * @return  aStream Data stream
       
   461         */ 
       
   462 		IMPORT_C virtual void ExternalizeL(RWriteStream& aStream ) const;
       
   463 
       
   464 	protected:
       
   465 		IMPORT_C virtual void ConstructL();
       
   466 		
       
   467 		IMPORT_C CSICompiledGrammar(const TSIGrammarID aGrammarID);
       
   468 		
       
   469 	private:
       
   470 		// is compiled data valid
       
   471 		TBool iValidData;
       
   472 		 
       
   473 		// data of grammar compiler
       
   474 		HBufC8*  iGrammarCompilerData;
       
   475 		TAny* iReserved;
       
   476 		
       
   477 	protected:
       
   478 		
       
   479 	};
       
   480 
       
   481 /**
       
   482 *  Class to define rule variant info
       
   483 *
       
   484 *  @lib nsssispeechrecognitiondata.lib
       
   485 *  @since 2.8
       
   486 */
       
   487 class TSIRuleVariantInfo
       
   488 	{
       
   489 	public:  // Constructors and destructor
       
   490 		
       
   491         /**
       
   492         * C++ default constructor.
       
   493         */
       
   494         IMPORT_C TSIRuleVariantInfo( const TSIGrammarID aGrammarID, 
       
   495                                      const TSIRuleID aRuleID, 
       
   496                                      const TSIRuleVariantID aRuleVariantID );
       
   497 		
       
   498         /**
       
   499         * Destructor.
       
   500         */
       
   501         IMPORT_C virtual ~TSIRuleVariantInfo();
       
   502 		
       
   503 	public: // New functions
       
   504 		
       
   505 			/**
       
   506 			* Use to get Grammar ID
       
   507 			* @since 2.8
       
   508 			* @return Identifier of Grammar
       
   509 		*/
       
   510 		IMPORT_C virtual TSIGrammarID GrammarID() const;
       
   511 		
       
   512 
       
   513 			/**
       
   514 			* Use to get rule ID
       
   515 			* @since 2.8
       
   516 			* @return Identifier of rule
       
   517 		*/
       
   518 		IMPORT_C virtual TSIRuleID RuleID() const;
       
   519 		
       
   520 		/**
       
   521 		* Use to get rule variant ID
       
   522 		* @since 2.8
       
   523 		* @return Identifier of rule variant
       
   524 		*/
       
   525 		IMPORT_C virtual TSIRuleVariantID RuleVariantID() const;
       
   526 		
       
   527 	protected:    // Data
       
   528 		
       
   529 		
       
   530 		// rule identifier
       
   531 		const TSIGrammarID iGrammarID;
       
   532 		// rule identifier
       
   533 		const TSIRuleID iRuleID;
       
   534 		
       
   535 		// rule variant identifier
       
   536 		const TSIRuleVariantID iRuleVariantID;
       
   537 		
       
   538 	};
       
   539 	
       
   540 /**
       
   541 *  Class to encapsulate a Speaker Independent Pronunciation
       
   542 *
       
   543 *  @lib nsssispeechrecognitiondata.lib
       
   544 *  @since 2.8
       
   545 */
       
   546 class CSIPronunciation : public CSIParameters
       
   547 	{
       
   548 	public:// Constructors and destructor
       
   549 		   /**
       
   550 		   * Destructor.
       
   551 		*/
       
   552 		IMPORT_C virtual ~CSIPronunciation();
       
   553 		
       
   554 		/**
       
   555 		* Two-phased constructor.
       
   556 		*/
       
   557 		IMPORT_C static CSIPronunciation* NewL(const TSIPronunciationID aPronunciationID, 
       
   558 											   const TSIModelBankID aModelBankID );
       
   559 		IMPORT_C static CSIPronunciation* NewLC(const TSIPronunciationID aPronunciationID, 
       
   560 												const TSIModelBankID aModelBankID );
       
   561 		
       
   562 	public: // New functions
       
   563 		/**
       
   564 		* Use to retrieve the model bank Id of the model bank.
       
   565 		* @since 2.8
       
   566 		* @param None.
       
   567 		* @return Model bank identifier.
       
   568 		*/ 
       
   569 		IMPORT_C virtual TSIModelBankID ModelBankID() const;
       
   570  			/**
       
   571 			* Use to set the pronunciation Id of this lexicon entry.
       
   572 			* @since 2.8
       
   573 			* @param Pronunciation identifier.
       
   574 			* @return None.
       
   575 		*/ 
       
   576 		 IMPORT_C virtual void SetPronunciationID(TSIPronunciationID aPronunciationID); 
       
   577 		
       
   578 		
       
   579 			/**
       
   580 			* Use to retrieve the pronunciation Id of this lexicon entry.
       
   581 			* @since 2.8
       
   582 			* @param None.
       
   583 			* @return Pronunciation identifier.
       
   584 		*/ 
       
   585 		IMPORT_C virtual TSIPronunciationID PronunciationID() const;
       
   586 		/**
       
   587 		* Use to set phoneme sequence.
       
   588 		* @since 2.8
       
   589 		* @param aPhonemeSequence Phoneme sequence.
       
   590 		* @return None.
       
   591 		*/  
       
   592 		IMPORT_C virtual void SetPhonemeSequenceL( const TDesC8& aPhonemeSequence );
       
   593 		
       
   594 
       
   595 		/**
       
   596 		* Use to retrieve the phoneme sequence.
       
   597 		* @since 2.8
       
   598 		* @param None.
       
   599 		* @return Phoneme sequence.
       
   600 		*/  
       
   601 		IMPORT_C virtual const TDesC8& PhonemeSequence() const;
       
   602 
       
   603         /**
       
   604         * Compares two CSIPronunciation objects.
       
   605         * Returns 0 if prununciation ids are equal.
       
   606         * Returns -1 if first id is smaller.
       
   607         * Returns 1 if second id is smaller.
       
   608         *
       
   609         * @param "const CSIPronunciation& aFirst" First pronunciation to compare
       
   610         * @param "const CSIPronunciation& aSecond" Second pronunciation to compare
       
   611         * @return 0, -1 or 1
       
   612         */
       
   613 		static TInt Compare( const CSIPronunciation& aFirst, const CSIPronunciation& aSecond );
       
   614 
       
   615         /**
       
   616         * Compares two CSIPronunciation objects.
       
   617         * Returns 0 if phoneme sequences are equal.
       
   618         * Returns -1 if first phoneme sequence is smaller.
       
   619         * Returns 1 if second phoneme sequence is smaller.
       
   620         *
       
   621         * @param "const CSIPronunciation& aFirst" First pronunciation to compare
       
   622         * @param "const CSIPronunciation& aSecond" Second pronunciation to compare
       
   623         * @return 0, -1 or 1
       
   624         */
       
   625 		static TInt ComparePhonemes( const CSIPronunciation& aFirst, const CSIPronunciation& aSecond );
       
   626 
       
   627 
       
   628 	protected:
       
   629 		IMPORT_C virtual void ConstructL();
       
   630 		IMPORT_C CSIPronunciation(const TSIPronunciationID aPronunciationID, 
       
   631 								  const TSIModelBankID aModelBankID );
       
   632 		
       
   633 	private:
       
   634 		TSIPronunciationID iPronunciationID;
       
   635 		TSIModelBankID iModelBankID;
       
   636 		HBufC8* iPhonemeSequence;
       
   637 		TAny* iReserved;
       
   638 	};
       
   639 
       
   640 
       
   641 /**
       
   642 *  Class to encapsulate a Speaker Independent Lexicon
       
   643 *
       
   644 *  @lib nsssispeechrecognitiondata.lib
       
   645 *  @since 2.8
       
   646 */
       
   647 class CSILexicon : public CBase
       
   648 	{
       
   649 	public:// Constructors and destructor
       
   650 	
       
   651         /**
       
   652         * Destructor.
       
   653 		*/
       
   654 		IMPORT_C virtual ~CSILexicon();
       
   655 		
       
   656 		/**
       
   657 		* Two-phased constructor.
       
   658 		* @param aLexiconID Lexicon ID
       
   659 		* @return Created instance
       
   660 		*/
       
   661 		IMPORT_C static CSILexicon* NewL( const TSILexiconID aLexiconID );
       
   662 		IMPORT_C static CSILexicon* NewLC( const TSILexiconID aLexiconID );
       
   663 		
       
   664 	public: // New functions
       
   665 		
       
   666 		/**
       
   667 		* Use to add a lexicon entry to the lexicon.
       
   668 		* Leaves with KErrNoMemory if maximal allowed amount of pronunciations
       
   669 		* is already stored in this lexicon
       
   670 		* @since 2.8
       
   671 		* @param aPronunciation pointer to CSIPronunciation object.
       
   672 		*/
       
   673     	IMPORT_C virtual void AddL( CSIPronunciation* aPronunciation );
       
   674 		
       
   675 		/**
       
   676 		* Use to return a pronunciation based at an index.
       
   677 		* @since 2.8
       
   678 		* @param aIndex Value must not be negative and must not be greater than
       
   679 		*               the number of pronunciations currently in the lexicon.
       
   680 		* @return Reference to CSIPronunciation object.
       
   681 		*/
       
   682 		IMPORT_C virtual CSIPronunciation& AtL( TInt aIndex ) const;
       
   683 
       
   684         /**
       
   685 		* Deletes a pronunciation based on identifier.
       
   686 		* @since 2.8
       
   687 		* @param aPronunciationID pronunciation variant identifier.
       
   688         */
       
   689 		IMPORT_C virtual void DeleteL( TSIPronunciationID aPronunciationID );
       
   690 		 
       
   691 		/**
       
   692 		* Use to find a pronunciation based on pronunciation Id.
       
   693 		* @since 2.8
       
   694 		* @param aPronunciationID: pronunciation identifier.
       
   695 		* @return The index of the first matching pronunciation within the lexicon.
       
   696 		*         KErrNotFound, if no matching pronunciation can be found.
       
   697 		*/ 
       
   698 		IMPORT_C virtual TInt Find( const TSIPronunciationID aPronunciationID ) const;
       
   699 		
       
   700 		/**
       
   701 		* Use to find a pronunciation based on phoneme sequence.
       
   702 		* @since 2.8
       
   703 		* @param aPronunciation: phoneme sequence.
       
   704 		* @return The index of the first matching pronunciation within the lexicon.
       
   705 		*         KErrNotFound, if no matching pronunciation can be found.
       
   706 		*/ 
       
   707 		IMPORT_C virtual TInt Find( const TDesC8& aPhonemeSequence ) const;
       
   708 		
       
   709 		/**
       
   710 		* Use to count the number of lexicon entries in the lexicon.
       
   711 		* @since 2.8
       
   712 		* @return Number of pronunciations.
       
   713 		*/
       
   714 		IMPORT_C virtual TInt Count() const;
       
   715 
       
   716 		/**
       
   717 		* Use to retrieve the model bank Id of the model bank.
       
   718 		* @since 2.8
       
   719 		* @return Model bank identifier.
       
   720 		*/  
       
   721 		IMPORT_C virtual TSILexiconID LexiconID() const;
       
   722  		
       
   723 		/**
       
   724         * Internalize to a data stream
       
   725         * @since 2.8
       
   726 		* @param aStream Data stream
       
   727         */ 
       
   728 		IMPORT_C virtual void InternalizeL( RReadStream& aStream );
       
   729 
       
   730 		/**
       
   731         * Externalize from a data stream
       
   732         * @since 2.8
       
   733 		* @param aStream Data stream
       
   734         */ 
       
   735 		IMPORT_C virtual void ExternalizeL( RWriteStream& aStream ) const;
       
   736 
       
   737 	protected:
       
   738 		IMPORT_C void ConstructL();
       
   739 		IMPORT_C CSILexicon( const TSILexiconID aLexiconID );
       
   740 		
       
   741     private:
       
   742     
       
   743         /**
       
   744         * Utility function to add pronunciation to the end of ID-ordered array
       
   745         *
       
   746         * @param "CSIPronunciation* aPronunciation" Pronunciation which should be added.
       
   747         */
       
   748         void AddPronunciationToEndL( CSIPronunciation* aPronunciation );
       
   749 		
       
   750 	private:
       
   751         // ID of the lexicon
       
   752         TSILexiconID iLexiconID;
       
   753         // Pronunciations in the order of IDs
       
   754 		RPointerArray<CSIPronunciation> iPronunciationArray;
       
   755 		// Pronunciations in the order of the phoneme sequence
       
   756 		RPointerArray<CSIPronunciation> iPronunOrder;
       
   757 		// For future extensions
       
   758 		TAny* iReserved;
       
   759 	};
       
   760 
       
   761 
       
   762 /**
       
   763 *  Class to encapsulate a Speaker Independent Model
       
   764 *
       
   765 *  @lib nsssispeechrecognitiondata.lib
       
   766 *  @since 2.8
       
   767 */
       
   768 class CSIModel : public CSIParameters
       
   769 	{
       
   770 	public:// Constructors and destructor
       
   771 		   /**
       
   772 		   * Destructor.
       
   773 		*/
       
   774 		IMPORT_C virtual ~CSIModel();
       
   775 		
       
   776 		/**
       
   777 		* Two-phased constructors.
       
   778 		*/
       
   779 		//IMPORT_C static CSIModel* NewL();
       
   780 		//IMPORT_C static CSIModel* NewLC();
       
   781 		IMPORT_C static CSIModel* NewL( const TSIModelID aModelID );
       
   782 		IMPORT_C static CSIModel* NewLC( const TSIModelID aModelID );
       
   783 		
       
   784 	public: // New functions
       
   785 			/**
       
   786 			* Use to set the phoneme Id of this model.
       
   787 			* @since 2.8
       
   788 			* @param aModelID: phoneme identifier.
       
   789 			* @return None.
       
   790 		*/ 
       
   791 		IMPORT_C virtual void SetModelID( const TSIModelID aModelID);
       
   792 		
       
   793 		/**
       
   794 		* Use to retreive the phoneme Id of this model.
       
   795 		* @since 2.8
       
   796 		* @param None.
       
   797 		* @return Phoneme identifier.
       
   798 		*/ 
       
   799 		IMPORT_C virtual TSIModelID ModelID() const;
       
   800 		
       
   801 		/**
       
   802 		* Use to get a pointer to the acoustic model of this model.
       
   803 		* @since 2.8
       
   804 		* @param None.
       
   805 		* @return A descriptor to the acoustic model data.
       
   806 		*/
       
   807 		IMPORT_C virtual   TDesC8& AcousticModel() const;
       
   808 	
       
   809 		/**
       
   810 		* Use to set the acoustic model of the model.
       
   811 		* @since 2.8
       
   812 		* @param aAcousticModel: pointer descriptor containing the acoustic model (binary).
       
   813 		* @return None.
       
   814 		*/ 
       
   815 		IMPORT_C virtual void SetAcousticModel(  HBufC8* aAcousticModel );
       
   816 		
       
   817 		
       
   818 	protected:
       
   819 		IMPORT_C virtual void ConstructL();
       
   820 		IMPORT_C CSIModel( );
       
   821 		IMPORT_C CSIModel( const TSIModelID aModelID );
       
   822 		
       
   823 	private:
       
   824 		TSIModelID iModelID;
       
   825 		HBufC8* iAcousticModel;
       
   826 		TAny* iReserved;
       
   827 	};
       
   828 
       
   829 /**
       
   830 *  Class to encapsulate a Speaker Independent Model Bank
       
   831 *
       
   832 *  @lib nsssispeechrecognitiondata.lib
       
   833 *  @since 2.8
       
   834 */
       
   835 class CSIModelBank : public CBase
       
   836 	{
       
   837 	public:// Constructors and destructor
       
   838 		   /**
       
   839 		   * Destructor.
       
   840 		*/
       
   841 		IMPORT_C virtual ~CSIModelBank();
       
   842 		
       
   843 		/**
       
   844 		* Two-phased constructor.
       
   845 		*/
       
   846 		IMPORT_C static CSIModelBank* NewL(const TSIModelBankID aModelBankID);
       
   847 		IMPORT_C static CSIModelBank* NewLC(const TSIModelBankID aModelBankID);
       
   848 		
       
   849 	public: // New functions	
       
   850 		 
       
   851 
       
   852 
       
   853 		/**
       
   854 		* Use to add a model to the model bank.
       
   855 		* @since 2.8
       
   856 		* @param aModel: reference to CSIModel object.
       
   857 		* @return None
       
   858 		*/ 
       
   859 		IMPORT_C virtual void AddL(const CSIModel* aModel);
       
   860 		
       
   861 		/**
       
   862 		* Use to return a model at the given index.
       
   863 		* @since 2.8
       
   864 		* @param Reference to CSIModel object.
       
   865 		* @return None
       
   866 		 */ 
       
   867 		IMPORT_C virtual CSIModel& AtL(TInt aIndex) const;
       
   868 		
       
   869 		/**
       
   870 		* Deletes  a model from model bank.
       
   871 		* @since 2.8
       
   872 		* @param ID of the model 
       
   873 		* @return None 
       
   874 		*/ 
       
   875 		IMPORT_C virtual void DeleteL(TSIModelID aModelID); 
       
   876 
       
   877 		/**
       
   878 		* Use to find a model based on phoneme Id.
       
   879 		* @since 2.8
       
   880 		* @param None.
       
   881 		* @return Index of the first matching model within the model bank.  KErrNotFound, if no matching model can be found..
       
   882 		*/ 
       
   883 		IMPORT_C virtual TInt Find(TSIModelID aModelID) const;
       
   884 		
       
   885 		/**
       
   886 		* Use to retreive the number of models in the model bank.
       
   887 		* @since 2.8
       
   888 		* @param None.
       
   889 		* @return Number of models in the model bank.
       
   890 		*/
       
   891 		IMPORT_C virtual TInt Count() const;
       
   892 		
       
   893 			/**
       
   894 			* Use to return the model bank Id of the model bank.
       
   895 			* @since 2.8
       
   896 			* @param None.
       
   897 			* @return Model bank identifier.
       
   898 		*/
       
   899 		IMPORT_C virtual TSIModelBankID ModelBankID() const;
       
   900 		
       
   901 	protected:
       
   902 		IMPORT_C virtual void ConstructL();
       
   903 		IMPORT_C CSIModelBank(const TSIModelBankID aModelBankID);
       
   904 		
       
   905 	private:
       
   906 		TSIModelBankID iModelBankID;
       
   907 		RPointerArray<CSIModel> iModelArray;
       
   908 		TAny* iReserved;
       
   909 	};
       
   910 
       
   911 /**
       
   912 *  Class to define pronunciation type.
       
   913 *
       
   914 *  @lib nsssispeechrecognitiondata.lib
       
   915 *  @since 2.8
       
   916 */
       
   917 class CSIPronunciationInfo : public CSIParameters
       
   918 	{
       
   919 	public:  // Constructors and destructor
       
   920 
       
   921 		/**
       
   922 		* Two-phased constructor.
       
   923 		*/
       
   924 		IMPORT_C static CSIPronunciationInfo* NewL(RPointerArray<HBufC8>  aPronunciationArray,
       
   925 			TLanguage aLanguage );
       
   926 		IMPORT_C static CSIPronunciationInfo* NewLC(RPointerArray<HBufC8>  aPronunciationArray,
       
   927 			TLanguage aLanguage );
       
   928 		
       
   929 		/**
       
   930 		* Destructor.
       
   931 		*/
       
   932 		IMPORT_C virtual ~CSIPronunciationInfo();
       
   933 		
       
   934 	public: // New functions
       
   935 		
       
   936 			/**
       
   937 			* Use to get phoneme sequence data
       
   938 			* @since 2.8
       
   939 			* @return Phoneme sequence
       
   940 		*/
       
   941 		IMPORT_C virtual TDesC8& PronunciationL(TInt aIndex) const;
       
   942 
       
   943 			/**
       
   944 			* Use to set phoneme sequence data
       
   945 			* @since 2.8
       
   946 			* @return Phoneme sequence
       
   947 		*/
       
   948 		
       
   949 		IMPORT_C virtual void SetPronunciationL( TInt aIndex, HBufC8* aPronunciation);
       
   950 
       
   951 		IMPORT_C virtual TLanguage Language() const;
       
   952 
       
   953 		IMPORT_C virtual TInt Count() const;
       
   954 		
       
   955 
       
   956 	protected:
       
   957 		IMPORT_C virtual void ConstructL();
       
   958 		IMPORT_C CSIPronunciationInfo( RPointerArray<HBufC8> aPronunciationArray,TLanguage aLanguage);	
       
   959 
       
   960 	private:    // Data
       
   961 		
       
   962 		// phoneme sequence
       
   963 		//HBufC8* iPronunciation;
       
   964 		RPointerArray<HBufC8> iPronunciationArray;
       
   965 			
       
   966 		TLanguage iLanguage;
       
   967 		TAny* iReserved;
       
   968 	};
       
   969 
       
   970 /**
       
   971 *  Class to define word list. The list is used as input parameter for TTP.
       
   972 *
       
   973 *  @lib SiSpeechRecognitionData.lib
       
   974 *  @since 2.8
       
   975 */
       
   976 class CSITtpWordList : public CBase
       
   977 	{
       
   978 	public:  // Constructors and destructor
       
   979 		
       
   980 			 /**
       
   981 			 * Two-phased constructor.
       
   982 		*/
       
   983 		IMPORT_C static CSITtpWordList* NewL();
       
   984 		IMPORT_C static CSITtpWordList* NewLC();
       
   985 		
       
   986 		/**
       
   987 		* Destructor.
       
   988 		*/
       
   989 		IMPORT_C virtual ~CSITtpWordList();
       
   990 		
       
   991 	public: // New functions
       
   992 		
       
   993 			/**
       
   994 			* Use to add a new word
       
   995 			* @since 2.8
       
   996 			* @param aWord Word to be added
       
   997 		*/
       
   998 		IMPORT_C virtual void AddL(  MDesCArray* aWords );
       
   999 		
       
  1000 		/**
       
  1001 		* Use to get number of words
       
  1002 		* @since 2.8
       
  1003 		* @return number of words
       
  1004 		*/
       
  1005 		IMPORT_C virtual TInt Count() const;
       
  1006 		
       
  1007 		/**
       
  1008 		* Use to return word at an index
       
  1009 		* @since 2.8
       
  1010 		* @param aIndex Index of word
       
  1011 		* @return reference to word sequence
       
  1012 		*/
       
  1013 		IMPORT_C virtual  MDesCArray& AtL( const TInt aIndex ) const;
       
  1014 		
       
  1015 		
       
  1016 		/**
       
  1017 		* Use to delete word at an index
       
  1018 		* @since 2.8
       
  1019 		* @param aIndex Index of word 		
       
  1020 		* @return None
       
  1021 		*/
       
  1022 		IMPORT_C virtual void DeleteL(TInt aIndex);
       
  1023 		
       
  1024  
       
  1025 
       
  1026 		/**
       
  1027 		* Use to set pronunciation for a word
       
  1028 		* @since 2.8
       
  1029 		* @param aIndex Index of word seqence
       
  1030 		* @param aPronunciation Pronunciation to be added
       
  1031 		*/
       
  1032 		IMPORT_C virtual void AppendPronunciationL(TInt aIndex, 
       
  1033 			CSIPronunciationInfo* aPronunciation);
       
  1034 
       
  1035 		
       
  1036 			/**
       
  1037 			* Use to get pronunciations for a word
       
  1038 			* @since 2.8
       
  1039 			* @param aIndex Index of word sequence
       
  1040 			* @param aPronunciations Array where to put pronunciations
       
  1041 		*/
       
  1042 		IMPORT_C virtual void GetPronunciationsL( const TInt aIndex, 
       
  1043 			RPointerArray<CSIPronunciationInfo>& aPronunciations ) const; 
       
  1044 
       
  1045 	protected:
       
  1046 		
       
  1047 	/**
       
  1048 	* C++ default constructor.
       
  1049 		*/
       
  1050 		IMPORT_C CSITtpWordList();
       
  1051 		
       
  1052 		/**
       
  1053 		* By default Symbian 2nd phase constructor is private.
       
  1054 		*/
       
  1055 		IMPORT_C void ConstructL();
       
  1056 		
       
  1057 	private:    // Data
       
  1058 		
       
  1059 		// word array
       
  1060 	//	RArray<TPtrC> iWordArray;
       
  1061  		RPointerArray<MDesCArray> iWordArray;
       
  1062 		// index array for pronunciations
       
  1063 		RArray<TInt> iIndexArray; 
       
  1064 		// pronunciation array
       
  1065 		RPointerArray<CSIPronunciationInfo> iPronunciationArray;
       
  1066 		
       
  1067 		// Reserved pointer for future extension
       
  1068 		TAny* iReserved;
       
  1069     };
       
  1070 
       
  1071 /**
       
  1072 *  Class to encapsulate a Recognition Result
       
  1073 *
       
  1074 *  @lib nsssispeechrecognitiondata.lib
       
  1075 *  @since 2.8
       
  1076 */
       
  1077 class CSIResult : public CSIParameters
       
  1078 	{
       
  1079 	public:// Constructors and destructor
       
  1080 		   /**
       
  1081 		   * Destructor.
       
  1082 		*/
       
  1083 		IMPORT_C virtual ~CSIResult();
       
  1084 		
       
  1085 		/**
       
  1086 		* Two-phased constructor.
       
  1087 		*/
       
  1088 		IMPORT_C static CSIResult* NewL();
       
  1089 		IMPORT_C static CSIResult* NewLC();
       
  1090 		
       
  1091 	public: // New functions	
       
  1092 			/**
       
  1093 			* Use to set the grammar Id on the result.
       
  1094 			* @since 2.8
       
  1095 			* @param aGrammarID - grammar identifier.
       
  1096 			* @return None.
       
  1097 		*/
       
  1098 		IMPORT_C virtual void SetGrammarID(const TSIGrammarID aGrammarID);
       
  1099 		
       
  1100 		/**
       
  1101 		* Use to retrieve the grammar Id of the result.
       
  1102 		* @since 2.8
       
  1103 		* @param None.
       
  1104 		* @return Grammar identifier.
       
  1105 		*/
       
  1106 		IMPORT_C virtual TSIGrammarID GrammarID() const;
       
  1107 		
       
  1108 		/**
       
  1109 		* Use to set the rule Id of the result.
       
  1110 		* @since 2.8
       
  1111 		* @param aRuleID - rule identifier.
       
  1112 		* @return None.
       
  1113 		*/
       
  1114 		IMPORT_C virtual void SetRuleID(const TSIRuleID aRuleID);
       
  1115 		
       
  1116 		/**
       
  1117 		* Use to retrieve the rule Id of the result.
       
  1118 		* @since 2.8
       
  1119 		* @param None.
       
  1120 		* @return Rule identifier.
       
  1121 		*/ 
       
  1122 		IMPORT_C virtual TSIRuleID RuleID() const;
       
  1123 		
       
  1124 		/**
       
  1125 		* Use to set the rule variant Id of the result.
       
  1126 		* @since 2.8
       
  1127 		* @param aRuleID - rule variant identifier.
       
  1128 		* @return None.
       
  1129 		*/
       
  1130 		IMPORT_C virtual void SetRuleVariantID(const TSIRuleVariantID aRuleVariantID);
       
  1131 		
       
  1132 		/**
       
  1133 		* Use to retrieve the rule variant Id of the result.
       
  1134 		* @since 2.8
       
  1135 		* @param None.
       
  1136 		* @return Rule variant identifier.
       
  1137 		*/ 
       
  1138 		IMPORT_C virtual TSIRuleVariantID RuleVariantID() const;
       
  1139 		
       
  1140 		/**
       
  1141 		* Use to set the score for this result.
       
  1142 		* @since 2.8
       
  1143 		* @param aScore: score of this result.
       
  1144 		* @return None.
       
  1145 		*/ 
       
  1146 		IMPORT_C virtual void SetScore(const TInt32 aScore);
       
  1147 		
       
  1148 		/**
       
  1149 		* Use to retreive the score of this result.
       
  1150 		* @since 2.8
       
  1151 		* @param None.
       
  1152 		* @return Score of this result.
       
  1153 		*/ 
       
  1154 		IMPORT_C virtual TInt32 Score() const;
       
  1155 		
       
  1156 		/**
       
  1157 		* Sets the pronunciation information needed for speaker adaptation and playback.  
       
  1158 		* @since 2.8
       
  1159 		* @param aSIPronunciationInfo  Pronunciation information,  needed for speaker adaptation and playback  
       
  1160 		* @return  None.
       
  1161 		*/ 
       
  1162 		IMPORT_C virtual void SetPronunciation(  CSIPronunciation* aSIPronunciation);
       
  1163 
       
  1164 		/**
       
  1165 		* Gets the pronunciation information needed for speaker adaptation and playback.  
       
  1166 		* @since 2.8
       
  1167 		* @param None
       
  1168 		* @return aSIPronunciationInfo  Pronunciation information,  needed for speaker adaptation and playback  
       
  1169 		*/ 
       
  1170  		IMPORT_C virtual CSIPronunciation& Pronunciation() const ;
       
  1171 	protected:
       
  1172 		IMPORT_C virtual void ConstructL();
       
  1173 		IMPORT_C CSIResult();
       
  1174 		
       
  1175 	private:
       
  1176 		TSIGrammarID iGrammarID;
       
  1177 		TSIRuleID iRuleID;
       
  1178 		TSIRuleVariantID iRuleVariantID;
       
  1179 		TInt32 iScore;
       
  1180 		CSIPronunciation* iSIPronunciation;
       
  1181 		TAny* iReserved;
       
  1182 	};
       
  1183 
       
  1184 
       
  1185 /**
       
  1186 *  Class to encapsulate a a set of Recognition Result
       
  1187 *
       
  1188 *  @lib nsssispeechrecognitiondata.lib
       
  1189 *  @since 2.8
       
  1190 */
       
  1191 class CSIResultSet : public CBase
       
  1192 	{
       
  1193 	public:// Constructors and destructor
       
  1194 		   /**
       
  1195 		   * Destructor.
       
  1196 		*/        
       
  1197 		IMPORT_C virtual ~CSIResultSet();
       
  1198 		/**
       
  1199 		* Two-phased constructor.
       
  1200 		*/
       
  1201 		IMPORT_C static CSIResultSet* NewL();
       
  1202 		IMPORT_C static CSIResultSet* NewLC();
       
  1203 		
       
  1204 	public: // New functions		
       
  1205 			/**
       
  1206 			* Use to add a result to the rule set.
       
  1207 			* @since 2.8
       
  1208 			* @param aResult - reference to the result object to be added.
       
  1209 			* @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes.
       
  1210 		*/
       
  1211 		IMPORT_C virtual void AddL( const CSIResult* aResult); 
       
  1212 
       
  1213 		/**
       
  1214 		* Use to return a result at a given index within the result set.
       
  1215 		* @since 2.8
       
  1216 		* @param aIndex - index in the result set.
       
  1217 		* @return  A reference to CSIResult object.
       
  1218 		*/
       
  1219 		IMPORT_C virtual  CSIResult& AtL(const TInt aIndex);
       
  1220 
       
  1221         /**
       
  1222 		* Use to return a result at a given index within the result set.
       
  1223 		* @since 2.8
       
  1224 		* @param aIndex - index in the result set.
       
  1225 		* @return  A constant reference to CSIResult object.
       
  1226 		*/
       
  1227 		IMPORT_C virtual const CSIResult& AtL(const TInt aIndex) const;
       
  1228 		
       
  1229 		/**
       
  1230 		* Use to retreive the number of result in the result set.
       
  1231 		* @since 2.8
       
  1232 		* @param None.
       
  1233 		* @return Number of results in the result set.
       
  1234 		*/ 
       
  1235 		IMPORT_C virtual TInt Count() const;
       
  1236 	
       
  1237 		
       
  1238 		/**
       
  1239 		* Delete a result in the result set.
       
  1240 		* @since 2.8
       
  1241 		* @param  index of a result
       
  1242 		* @return None
       
  1243 		*/ 
       
  1244 		IMPORT_C virtual void DeleteL(TInt aIndex);
       
  1245 		
       
  1246 		/**
       
  1247 		* Sets the data needed for speaker adaptation. CSIResultSet takes ownership of the data.		
       
  1248 		* @since 2.8
       
  1249 		* @param   Adaptation data
       
  1250 		* @return None
       
  1251 		*/  
       
  1252 		IMPORT_C virtual void SetAdaptationData( HBufC8* aAdaptationData );
       
  1253 
       
  1254 
       
  1255 		/**
       
  1256 		* Gets the data needed for speaker adaptation. CSIResultSet takes ownership of the data.		
       
  1257 		* @since 2.8
       
  1258 		* @param None  		
       
  1259 		* @return   Adaptation data
       
  1260 		*/  
       
  1261 		IMPORT_C virtual TDesC8& AdaptationData();
       
  1262 
       
  1263         /**
       
  1264         * Stores the object to the stream.
       
  1265         * @since 2.8
       
  1266         * @param aWriteStream The stream to write to.
       
  1267         * @return None
       
  1268         */
       
  1269         IMPORT_C virtual void ExternalizeL( RWriteStream& aWriteStream ) const;
       
  1270 
       
  1271         /**
       
  1272         * Resurrects an object from the stream.
       
  1273         * @since 2.8
       
  1274         * @param aReadStream The stream to read from.
       
  1275         * @return None
       
  1276         */
       
  1277         IMPORT_C virtual void InternalizeL( RReadStream& aReadStream );
       
  1278 
       
  1279 	private:
       
  1280         /**
       
  1281         * By default Symbian 2nd phase constructor is private.
       
  1282         */
       
  1283 		IMPORT_C virtual void ConstructL();
       
  1284 
       
  1285         /**
       
  1286         * C++ constructor
       
  1287         */
       
  1288 		IMPORT_C CSIResultSet();
       
  1289 		
       
  1290 	private:
       
  1291         // The results
       
  1292 		RPointerArray<CSIResult> iResultArray;
       
  1293 
       
  1294         // Speaker adaptation data
       
  1295 		HBufC8* iAdaptationData;
       
  1296 
       
  1297         // Reserved for future extensions
       
  1298 		TAny* iReserved;
       
  1299 	};
       
  1300 
       
  1301 #endif
       
  1302 
       
  1303 // End of file