srsf/nssvasapi/nssvascore/inc/nssvascspeechitembuilder.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     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:  The CNssSpeechItemBuilder provides methods to create SpeechItem object.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NSSVASCSPEECHITEMBUILDER_H
       
    20 #define NSSVASCSPEECHITEMBUILDER_H
       
    21 
       
    22 #include "nssvasccontext.h"
       
    23 #include "nssvascspeechitem.h"
       
    24 #include "nssvascspeechitemtrainer.h"
       
    25 #include "nssvasmcoresyncrecoveryhandler.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CNssVASDatabase;
       
    29 
       
    30 /**
       
    31 * The CNssSpeechItemBuilder class builds SpeechItem instances when requested.
       
    32 *
       
    33 *  @lib NssVASApi.lib
       
    34 *  @since 2.8
       
    35 */
       
    36 class CNssSpeechItemBuilder : public CBase
       
    37 {
       
    38   public:
       
    39 
       
    40     /**
       
    41     * Destructor.
       
    42     * The CNssSpeechItemBuilder destructor
       
    43     * Destroys the speech item builder. In addition, this must set the
       
    44     * state of the speech item portal termination state to termination pending.
       
    45     */   
       
    46     ~CNssSpeechItemBuilder();
       
    47 
       
    48     /**
       
    49     * Creates SpeechItemBuilder.  In addition, this must also create the
       
    50     * Speech Item Portal and Speech Item Trainer.
       
    51     * @since 2.0
       
    52     * @param aDatabase - interface to database
       
    53     * @return 
       
    54     */       
       
    55     static CNssSpeechItemBuilder* NewL( CNssVASDatabase* aDatabase );
       
    56 
       
    57     /**
       
    58     * 2 phase construction
       
    59     * @since 2.0
       
    60     * @param aDatabase - interface to database
       
    61     * @return 
       
    62     */      
       
    63     static CNssSpeechItemBuilder* NewLC( CNssVASDatabase* aDatabase );
       
    64     
       
    65     /**
       
    66     * Create SpeechItem object given a Context
       
    67     * @since 2.0
       
    68     * @param aContext - reference of Contaxt object  
       
    69     * @return *CNssSpeechItem - a pointer to a SpeechItem object
       
    70     */      
       
    71     CNssSpeechItem* CreateEmptySpeechItemL(CNssContext& aContext);
       
    72 
       
    73     /**
       
    74     * Create SpeechItem object given most of its data members.
       
    75     * @since 2.0
       
    76     * @param aContext - reference of Contaxt object  
       
    77     * @param aText - a text description
       
    78     * @param aTagID - a TagID 
       
    79     * @return *CNssSpeechItem - a pointer to a SpeechItem object
       
    80     */   
       
    81     CNssSpeechItem* CreateSpeechItemL(CNssContext& aContext,
       
    82         TUint32 aRuleID,const TDesC& aText, TInt aTagID,
       
    83         TNssVasCoreConstant::TNssTrainedType aTrainedType );
       
    84 
       
    85 
       
    86   private: //function
       
    87 
       
    88 
       
    89    /**
       
    90     * C++ constructor
       
    91     */ 
       
    92     CNssSpeechItemBuilder();
       
    93 
       
    94 
       
    95     /**
       
    96     * Symbian 2nd phase constructor 
       
    97     */      
       
    98     void ConstructL( CNssVASDatabase* aDatabase );
       
    99 
       
   100 
       
   101   private: //data
       
   102 
       
   103     // Pointer to SRS Portal object.
       
   104     // The SpeechItemBuilder own the SpeechItemPortal
       
   105     CNssSpeechItemSrsPortal* iPortal; 
       
   106     CNssSpeechItemTrainer*  iTrainer;
       
   107 };
       
   108 
       
   109 
       
   110 
       
   111 #endif // NSSVASCSPEECHITEMBUILDER_H
       
   112 
       
   113 // End of file