srsfenginestub/ttphwdevice/src/asrsttphwdevice.cpp
changeset 43 e71858845f73
parent 40 b7e5ed8c1342
child 46 e1758cbb96ac
equal deleted inserted replaced
40:b7e5ed8c1342 43:e71858845f73
     1 /*
       
     2 * Copyright (c) 2004-2005 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:     TTP hardware device stub.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include "srsfenginestubbldvariant.hrh"
       
    24 #include "asrsttphwdevice.h"
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CASRSTtpHwDevice::CASRSTtpHwDevice
       
    30 // C++ default constructor can NOT contain any code, that
       
    31 // might leave.
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 CASRSTtpHwDevice::CASRSTtpHwDevice( MASRSTtpHwDeviceObserver& aObserver ) : 
       
    35 	iObserver( aObserver ),
       
    36 	iTTPAlgorithm( NULL ), 
       
    37 	iTTPAlgObserver( NULL )
       
    38     {
       
    39     }
       
    40 
       
    41 // -----------------------------------------------------------------------------
       
    42 // CASRSTtpHwDevice::ConstructL
       
    43 // Symbian 2nd phase constructor can leave.
       
    44 // -----------------------------------------------------------------------------
       
    45 //
       
    46 void CASRSTtpHwDevice::ConstructL()
       
    47     {
       
    48     User::Leave( KErrNotSupported );
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CASRSTtpHwDevice::NewL
       
    53 // Two-phased constructor.
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 EXPORT_C CASRSTtpHwDevice* CASRSTtpHwDevice::NewL( MASRSTtpHwDeviceObserver& aObserver )
       
    57     {
       
    58     CASRSTtpHwDevice* self = new( ELeave ) CASRSTtpHwDevice( aObserver );
       
    59     
       
    60     CleanupStack::PushL( self );
       
    61     self->ConstructL();
       
    62     CleanupStack::Pop();
       
    63 
       
    64     return self;
       
    65     }
       
    66 
       
    67 // -----------------------------------------------------------------------------
       
    68 // CASRSTtpHwDevice::~CASRSTtpHwDevice
       
    69 // Destructor.
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 EXPORT_C CASRSTtpHwDevice::~CASRSTtpHwDevice()
       
    73     {
       
    74     }
       
    75 
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // CASRSTtpHwDevice::InitializeL
       
    79 // Initialize TTP module
       
    80 // (other items were commented in a header).
       
    81 // -----------------------------------------------------------------------------
       
    82 //
       
    83 EXPORT_C void CASRSTtpHwDevice::InitializeL()
       
    84 	{
       
    85     User::Leave( KErrNotSupported );
       
    86 	}
       
    87 
       
    88 // -----------------------------------------------------------------------------
       
    89 // CASRSTtpHwDevice::ConvertTextL
       
    90 // Perform TTP for text.
       
    91 // (other items were commented in a header).
       
    92 // -----------------------------------------------------------------------------
       
    93 //
       
    94 EXPORT_C HBufC8* CASRSTtpHwDevice::ConvertTextL( const TDesC& /*aText*/, 
       
    95                                                  TLanguage& /*aLanguage*/ )
       
    96 	{
       
    97     User::Leave( KErrNotSupported );
       
    98     return NULL;
       
    99 	}
       
   100 
       
   101 // -----------------------------------------------------------------------------
       
   102 // CASRSTtpHwDevice::ConvertWordListL
       
   103 // Perform TTP for word list. Asynchronous.
       
   104 // (other items were commented in a header).
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 EXPORT_C void CASRSTtpHwDevice::ConvertWordListL( CSITtpWordList& /*aWordList*/,
       
   108 								                 const RArray<TLanguage> /*aDefaultLanguage*/,
       
   109 								                 const RArray<TUint32> /*aMaxNPronunsForWord*/ )
       
   110 	{
       
   111     User::Leave( KErrNotSupported );
       
   112 	}
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // CASRSTtpHwDevice::CancelWordListConversion
       
   116 // Cancel TTP for word list.
       
   117 // (other items were commented in a header).
       
   118 // -----------------------------------------------------------------------------
       
   119 //
       
   120 EXPORT_C void CASRSTtpHwDevice::CancelWordListConversion()
       
   121     {
       
   122     }
       
   123 
       
   124 
       
   125 // -----------------------------------------------------------------------------
       
   126 // CASRSTtpHwDevice::SetPhonemeNotationL
       
   127 // Sets the output phoneme notation.
       
   128 // (other items were commented in a header).
       
   129 // -----------------------------------------------------------------------------
       
   130 //
       
   131 EXPORT_C void CASRSTtpHwDevice::SetPhonemeNotationL( const TDesC& /*aNotation*/ )
       
   132     {
       
   133     User::Leave( KErrNotSupported );
       
   134     }
       
   135 
       
   136 // -----------------------------------------------------------------------------
       
   137 // CASRSTtpHwDevice::PhonemeNotation
       
   138 // Returns the phoneme notation in use.
       
   139 // (other items were commented in a header).
       
   140 // -----------------------------------------------------------------------------
       
   141 //
       
   142 EXPORT_C const TDesC& CASRSTtpHwDevice::PhonemeNotation()
       
   143     {
       
   144     _LIT( KError, "Error" );
       
   145     return KError;
       
   146     }
       
   147 
       
   148 // -----------------------------------------------------------------------------
       
   149 // CASRSTtpHwDevice::Clear
       
   150 // Clears HW Device.
       
   151 // (other items were commented in a header).
       
   152 // -----------------------------------------------------------------------------
       
   153 //
       
   154 EXPORT_C void CASRSTtpHwDevice::Clear()
       
   155     {
       
   156     }
       
   157 
       
   158 // -----------------------------------------------------------------------------
       
   159 // CASRSTtpHwDevice::CustomInterface
       
   160 // Returns pointer to wanted custom interface. Returns NULL pointer if not found.
       
   161 // (other items were commented in a header).
       
   162 // -----------------------------------------------------------------------------
       
   163 //
       
   164 EXPORT_C TAny* CASRSTtpHwDevice::CustomInterface( TUid /*aInterfaceId*/ )
       
   165     {
       
   166     return NULL;
       
   167     }
       
   168 
       
   169 // -----------------------------------------------------------------------------
       
   170 // CASRSTtpHwDevice::WordListReady
       
   171 // Notify that word list is ready
       
   172 // (other items were commented in a header).
       
   173 // -----------------------------------------------------------------------------
       
   174 //	
       
   175 void CASRSTtpHwDevice::WordListReady( const TInt /*aError*/ )
       
   176 	{
       
   177 	}
       
   178 
       
   179 // -----------------------------------------------------------------------------
       
   180 // CASRSTtpHwDevice::ConfigurationData
       
   181 // Notify that configuration data is needed.
       
   182 // (other items were commented in a header).
       
   183 // -----------------------------------------------------------------------------
       
   184 //
       
   185 HBufC8* CASRSTtpHwDevice::ConfigurationData( TUint32 /*aPackageType*/, 
       
   186                                              TUint32 /*aPackageID*/,
       
   187                                              TUint32 /*aStartPosition*/,
       
   188                                              TUint32 /*aEndPosition*/ )
       
   189     {
       
   190     return NULL;
       
   191     }
       
   192 
       
   193 // -----------------------------------------------------------------------------
       
   194 // CASRSTtpHwDevice::LanguageIdentificationL
       
   195 // Tries to guess the language of given text.
       
   196 // (other items were commented in a header).
       
   197 // -----------------------------------------------------------------------------
       
   198 //
       
   199 EXPORT_C void CASRSTtpHwDevice::LanguageIdentificationL( const TDesC& /*aText*/,
       
   200                                                          TInt /*aNumberOfGuesses*/,
       
   201                                                          RArray<TLanguage>& /*aLanguages*/,
       
   202                                                          RArray<TInt>& /*aScores*/ )
       
   203     {
       
   204     User::Leave( KErrNotSupported );
       
   205     }
       
   206 
       
   207 
       
   208 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   209 
       
   210 // For DLL goodness
       
   211 #ifndef EKA2
       
   212 GLDEF_C TInt E32Dll( TDllReason /*aReason*/ )
       
   213     {
       
   214     return KErrNone;
       
   215     }
       
   216 #endif
       
   217 
       
   218 
       
   219 //  End of File