srsfenginestub/ttshwdevice/src/asrsttshwdevice.cpp
changeset 0 0ce1b5ce9557
equal deleted inserted replaced
-1:000000000000 0:0ce1b5ce9557
       
     1 /*
       
     2 * Copyright (c) 2004 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:     Stub algorithms for Speech Synthesis
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include    "asrsttshwdevice.h"
       
    24 #include    <e32svr.h>
       
    25 
       
    26 // ============================ MEMBER FUNCTIONS ===============================
       
    27 
       
    28 // -----------------------------------------------------------------------------
       
    29 // CTtsHwDevice::CTtsHwDevice
       
    30 // C++ default constructor can NOT contain any code, that
       
    31 // might leave.
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 CTtsHwDevice::CTtsHwDevice(): iAlgorithm( NULL ), iReserved( NULL )
       
    35     {
       
    36     // nothing
       
    37     }
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // CTtsHwDevice::ConstructL
       
    41 // Symbian 2nd phase constructor can leave.
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 void CTtsHwDevice::ConstructL( MTtsHwDeviceObserver& /*aObserver*/,
       
    45                                TUint /*aSamplingRate*/, 
       
    46                                TUint /*aBufferSize*/ )
       
    47     {
       
    48     User::Leave( KErrNotSupported );
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // CTtsHwDevice::NewL
       
    53 // Two-phased constructor.
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 EXPORT_C CTtsHwDevice* CTtsHwDevice::NewL( MTtsHwDeviceObserver& aObserver,
       
    57                                            TUint aSamplingRate, 
       
    58                                            TUint aBufferSize )
       
    59     {
       
    60     CTtsHwDevice* self = new ( ELeave ) CTtsHwDevice;
       
    61     
       
    62     CleanupStack::PushL( self );
       
    63     self->ConstructL( aObserver, aSamplingRate, aBufferSize );
       
    64     CleanupStack::Pop();
       
    65 
       
    66     return self;
       
    67     }
       
    68 
       
    69     
       
    70 // -----------------------------------------------------------------------------
       
    71 // CTtsHwDevice::~CTtsHwDevice
       
    72 // Destructor;
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 EXPORT_C CTtsHwDevice::~CTtsHwDevice()
       
    76 	{
       
    77     }
       
    78 
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // CTtsHwDevice::AddStyleL
       
    82 // Calls responding function of TTS algorithm
       
    83 // (other items were commented in a header).
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 EXPORT_C TTtsStyleID CTtsHwDevice::AddStyleL( const TTtsStyle& /*aStyle*/ )
       
    87     {
       
    88     User::Leave( KErrNotSupported );
       
    89     return 0;
       
    90     }
       
    91 
       
    92 // -----------------------------------------------------------------------------
       
    93 // CTtsHwDevice::AnalyzeProsodyL
       
    94 // Calls responding function of TTS algorithm
       
    95 // (other items were commented in a header).
       
    96 // -----------------------------------------------------------------------------
       
    97 //
       
    98 EXPORT_C void CTtsHwDevice::AnalyzeProsodyL( CTtsParsedText& /*aText*/ )
       
    99     {
       
   100     User::Leave( KErrNotSupported );
       
   101     }
       
   102 
       
   103 // -----------------------------------------------------------------------------
       
   104 // CTtsHwDevice::AnalyzeStructureL
       
   105 // Calls responding function of TTS algorithm
       
   106 // (other items were commented in a header).
       
   107 // -----------------------------------------------------------------------------
       
   108 //
       
   109 EXPORT_C void CTtsHwDevice::AnalyzeStructureL( CTtsParsedText& /*aText*/ )
       
   110     {
       
   111     User::Leave( KErrNotSupported );
       
   112     }
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // CTtsHwDevice::BufferProcessed
       
   116 // Calls responding function of TTS algorithm
       
   117 // (other items were commented in a header).
       
   118 // -----------------------------------------------------------------------------
       
   119 //
       
   120 EXPORT_C void CTtsHwDevice::BufferProcessed( const TDesC8& /*aBuffer*/ )
       
   121     {
       
   122     }
       
   123 
       
   124 
       
   125 // -----------------------------------------------------------------------------
       
   126 // CTtsHwDevice::DeleteStyleL
       
   127 // Calls responding function of TTS algorithm
       
   128 // (other items were commented in a header).
       
   129 // -----------------------------------------------------------------------------
       
   130 //
       
   131 EXPORT_C void CTtsHwDevice::DeleteStyleL( TTtsStyleID /*aStyleID*/ )
       
   132     {
       
   133     User::Leave( KErrNotSupported );
       
   134     }
       
   135 
       
   136 // -----------------------------------------------------------------------------
       
   137 // CTtsHwDevice::GetPositionL
       
   138 // Calls responding function of TTS algorithm
       
   139 // (other items were commented in a header).
       
   140 // -----------------------------------------------------------------------------
       
   141 //
       
   142 EXPORT_C void CTtsHwDevice::GetPositionL( TTimeIntervalMicroSeconds& /*aTime*/ )
       
   143     {
       
   144     User::Leave( KErrNotSupported );
       
   145     }
       
   146 
       
   147 // -----------------------------------------------------------------------------
       
   148 // CTtsHwDevice::GetPositionL
       
   149 // Calls responding function of TTS algorithm
       
   150 // (other items were commented in a header).
       
   151 // -----------------------------------------------------------------------------
       
   152 //
       
   153 EXPORT_C void CTtsHwDevice::GetPositionL( TTtsSegment& /*aSegment*/, 
       
   154                                           TInt& /*aWordIndex*/ )
       
   155     {
       
   156     User::Leave( KErrNotSupported );
       
   157     }
       
   158 
       
   159 // -----------------------------------------------------------------------------
       
   160 // CTtsHwDevice::IsLanguageSupported
       
   161 // Calls responding function of TTS algorithm
       
   162 // (other items were commented in a header).
       
   163 // -----------------------------------------------------------------------------
       
   164 //
       
   165 EXPORT_C TBool CTtsHwDevice::IsLanguageSupported( TLanguage /*aLanguage*/ )
       
   166     {
       
   167     return EFalse;
       
   168     }
       
   169 
       
   170 // -----------------------------------------------------------------------------
       
   171 // CTtsHwDevice::NumberOfStyles
       
   172 // Calls responding function of TTS algorithm
       
   173 // (other items were commented in a header).
       
   174 // -----------------------------------------------------------------------------
       
   175 //
       
   176 EXPORT_C TUint16 CTtsHwDevice::NumberOfStyles() const
       
   177     {
       
   178     return 0;
       
   179     }
       
   180 
       
   181 // -----------------------------------------------------------------------------
       
   182 // CTtsHwDevice::Pause
       
   183 // Calls responding function of TTS algorithm
       
   184 // (other items were commented in a header).
       
   185 // -----------------------------------------------------------------------------
       
   186 //
       
   187 EXPORT_C void CTtsHwDevice::Pause()
       
   188     {
       
   189     }
       
   190 
       
   191 // -----------------------------------------------------------------------------
       
   192 // CTtsHwDevice::PrimeSynthesisL
       
   193 // Calls responding function of TTS algorithm
       
   194 // (other items were commented in a header).
       
   195 // -----------------------------------------------------------------------------
       
   196 //
       
   197 EXPORT_C void CTtsHwDevice::PrimeSynthesisL( MTtsSegmentStream& /*aStream*/ )
       
   198     {
       
   199     User::Leave( KErrNotSupported );
       
   200     }
       
   201 
       
   202 // -----------------------------------------------------------------------------
       
   203 // CTtsHwDevice::PrimeSynthesisL
       
   204 // Calls responding function of TTS algorithm
       
   205 // (other items were commented in a header).
       
   206 // -----------------------------------------------------------------------------
       
   207 //
       
   208 EXPORT_C void CTtsHwDevice::PrimeSynthesisL( CTtsParsedText& /*aText*/ )
       
   209     {
       
   210     User::Leave( KErrNotSupported );
       
   211     }
       
   212 
       
   213 // -----------------------------------------------------------------------------
       
   214 // CTtsHwDevice::SetPositionL
       
   215 // Calls responding function of TTS algorithm
       
   216 // (other items were commented in a header).
       
   217 // -----------------------------------------------------------------------------
       
   218 //
       
   219 EXPORT_C void CTtsHwDevice::SetPositionL( const TTimeIntervalMicroSeconds& /*aTime*/ )
       
   220     {
       
   221     User::Leave( KErrNotSupported );
       
   222     }
       
   223 
       
   224 // -----------------------------------------------------------------------------
       
   225 // CTtsHwDevice::SetPositionL
       
   226 // Calls responding function of TTS algorithm
       
   227 // (other items were commented in a header).
       
   228 // -----------------------------------------------------------------------------
       
   229 //
       
   230 EXPORT_C void CTtsHwDevice::SetPositionL( const TTtsSegment& /*aSegment*/,
       
   231                                           TInt /*aWordIndex*/ )
       
   232     {
       
   233     User::Leave( KErrNotSupported );
       
   234     }
       
   235 
       
   236 // -----------------------------------------------------------------------------
       
   237 // CTtsHwDevice::Stop
       
   238 // Calls responding function of TTS algorithm
       
   239 // (other items were commented in a header).
       
   240 // -----------------------------------------------------------------------------
       
   241 //
       
   242 EXPORT_C void CTtsHwDevice::Stop()
       
   243     {
       
   244     }
       
   245 
       
   246 // -----------------------------------------------------------------------------
       
   247 // CTtsHwDevice::StyleL
       
   248 // Calls responding function of TTS algorithm
       
   249 // (other items were commented in a header).
       
   250 // -----------------------------------------------------------------------------
       
   251 //
       
   252 EXPORT_C TTtsStyle& CTtsHwDevice::StyleL( TTtsStyleID /*aStyleID*/ )
       
   253     {
       
   254     User::Leave( KErrNotSupported );
       
   255     // Just for removing errors & warning, we never get here
       
   256     TInt* dummy = new ( ELeave ) TInt;
       
   257     TTtsStyle* style = (TTtsStyle*) dummy;
       
   258     return *style;    
       
   259     }
       
   260 
       
   261 // -----------------------------------------------------------------------------
       
   262 // CTtsHwDevice::StyleL
       
   263 // Calls responding function of TTS algorithm
       
   264 // (other items were commented in a header).
       
   265 // -----------------------------------------------------------------------------
       
   266 //
       
   267 EXPORT_C TTtsStyle& CTtsHwDevice::StyleL( TUint16 /*aIndex*/ )
       
   268     {
       
   269     User::Leave( KErrNotSupported );
       
   270     // Just for removing errors & warning, we never get here
       
   271     TInt* dummy = new ( ELeave ) TInt;
       
   272     TTtsStyle* style = (TTtsStyle*) dummy;
       
   273     return *style;
       
   274     }
       
   275 
       
   276 // -----------------------------------------------------------------------------
       
   277 // CTtsHwDevice::SynthesizeL
       
   278 // Calls responding function of TTS algorithm
       
   279 // (other items were commented in a header).
       
   280 // -----------------------------------------------------------------------------
       
   281 //
       
   282 EXPORT_C void CTtsHwDevice::SynthesizeL()
       
   283     {
       
   284     User::Leave( KErrNotSupported );
       
   285     }
       
   286 
       
   287 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   288 
       
   289 // -----------------------------------------------------------------------------
       
   290 // for DLL goodness
       
   291 // -----------------------------------------------------------------------------
       
   292 //
       
   293 #ifndef EKA2
       
   294 GLDEF_C TInt E32Dll( TDllReason /*aReason*/ )
       
   295     {
       
   296     return KErrNone;
       
   297     }
       
   298 #endif
       
   299 
       
   300 //  End of File