srsfenginestub/adaptationhwdevice/src/asrsadaptationhwdevice.cpp
changeset 45 55e13740998c
parent 41 46385f45ba4e
child 47 fb031b08c285
equal deleted inserted replaced
41:46385f45ba4e 45:55e13740998c
     1 /*
       
     2 * Copyright (c) 2002 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:     SIND hardware device for model adaptation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 // INCLUDE FILES
       
    24 #include "asrsadaptationhwdevice.h"
       
    25 
       
    26 
       
    27 // ============================ MEMBER FUNCTIONS ===============================
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // CASRSAdaptHwDevice::CASRSAdaptHwDevice
       
    31 // C++ default constructor can NOT contain any code, that
       
    32 // might leave.
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 
       
    36 CASRSAdaptHwDevice::CASRSAdaptHwDevice(
       
    37     MASRAdaptationHwDeviceObserver& anObserver
       
    38     )
       
    39 : iObserver( anObserver ),
       
    40   iAlgorithm( NULL ),
       
    41   iIsInitialised( EFalse ),
       
    42   iReserved( 0 )
       
    43     {
       
    44     // Nothing
       
    45     }
       
    46 
       
    47 // -----------------------------------------------------------------------------
       
    48 // CASRSAdaptHwDevice::ConstructL
       
    49 // Symbian 2nd phase constructor can leave.
       
    50 // -----------------------------------------------------------------------------
       
    51 //
       
    52 void CASRSAdaptHwDevice::ConstructL(void)
       
    53     {
       
    54     User::Leave( KErrNotSupported );
       
    55     }
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // CASRSAdaptHwDevice::NewL
       
    59 // Two-phased constructor.
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 EXPORT_C CASRSAdaptHwDevice* CASRSAdaptHwDevice::NewL(
       
    63      MASRAdaptationHwDeviceObserver& anObserver ) // The observer
       
    64     {
       
    65     CASRSAdaptHwDevice* self = new( ELeave ) CASRSAdaptHwDevice( anObserver );
       
    66     
       
    67     CleanupStack::PushL( self );
       
    68     self->ConstructL();
       
    69     CleanupStack::Pop();
       
    70 
       
    71     return self;
       
    72     }
       
    73 
       
    74     
       
    75 // -----------------------------------------------------------------------------
       
    76 // CASRSAdaptHwDevice::~CASRSAdaptHwDevice
       
    77 // Destructor.
       
    78 // -----------------------------------------------------------------------------
       
    79 //
       
    80 EXPORT_C CASRSAdaptHwDevice::~CASRSAdaptHwDevice()
       
    81     {
       
    82     }
       
    83 
       
    84 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // CustomInterface
       
    88 // Provides clients with an interface, given an UID.
       
    89 // Returns: NULL - No custom interface with that UID
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 EXPORT_C TAny* CASRSAdaptHwDevice::CustomInterface(
       
    93     TUid /*aInterfaceId*/ ) // UID of the interface
       
    94     {
       
    95     return NULL;
       
    96     }
       
    97 
       
    98 // -----------------------------------------------------------------------------
       
    99 // InitializeL
       
   100 // Initializes the device. Subsequent calls reset the device.
       
   101 // Returns: none
       
   102 // -----------------------------------------------------------------------------
       
   103 //
       
   104 EXPORT_C void CASRSAdaptHwDevice::InitializeL(void)
       
   105     {
       
   106     User::Leave( KErrNotSupported );
       
   107     }
       
   108 
       
   109 // -----------------------------------------------------------------------------
       
   110 // Clear
       
   111 // Clears the device
       
   112 // Returns: None
       
   113 // -----------------------------------------------------------------------------
       
   114 //
       
   115 EXPORT_C void CASRSAdaptHwDevice::Clear(void)
       
   116     {
       
   117     }
       
   118 
       
   119 // -----------------------------------------------------------------------------
       
   120 // Start the adaptation.  It will adapt the acoustic models given the feature vector set and phoneme sequences 
       
   121 // of a correctly recognized utterance
       
   122 //  
       
   123 // Returns: None
       
   124 // -----------------------------------------------------------------------------
       
   125 //
       
   126 EXPORT_C void CASRSAdaptHwDevice::StartAdaptationL ( const TDesC8& /*aAdaptationData*/,
       
   127                                                      CSIModelBank& /*aModelBank*/, 
       
   128                                                      CSIPronunciation& /*aPronunciation*/,
       
   129                                                      TLanguage /*aLanguage*/ )
       
   130     {
       
   131     User::Leave( KErrNotSupported );
       
   132     }
       
   133 
       
   134 // -----------------------------------------------------------------------------
       
   135 // CancelAdaptation
       
   136 // Cancels Adaptation  . No callback is sent to the client.
       
   137 // Returns: None
       
   138 // -----------------------------------------------------------------------------
       
   139 //
       
   140 EXPORT_C void CASRSAdaptHwDevice::CancelAdaptation()
       
   141     {
       
   142     }
       
   143 
       
   144  
       
   145   
       
   146 // ================================ OTHER EXPORTED FUNCTIONS ===============================
       
   147 
       
   148 // for DLL goodness
       
   149 #ifndef EKA2
       
   150 GLDEF_C TInt E32Dll( TDllReason /*aReason*/ )
       
   151     {
       
   152     return KErrNone;
       
   153     }
       
   154 #endif
       
   155 
       
   156 
       
   157 //  End of File