|
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: This file contains the implementation of DevASR Utility. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #include "devasrutil.h" |
|
22 #include "rubydebug.h" |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS =============================== |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CQueItem::CQueItem |
|
28 // C++ default constructor can NOT contain any code, that |
|
29 // might leave. |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 CQueItem::CQueItem() : iDataBlock( NULL, 0 ) |
|
33 { |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CQueItem::~CQueItem |
|
38 // Destructor |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CQueItem::~CQueItem() |
|
42 { |
|
43 delete iBuf; |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CQueItem::ConstructL |
|
48 // Symbian 2nd phase constructor can leave. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 void CQueItem::ConstructL( TUint8* aBuf, TInt aLength ) |
|
52 { |
|
53 RUBY_DEBUG_BLOCK( "CQueItem::ConstructL()" ); |
|
54 |
|
55 iFinalBlock = EFalse; |
|
56 iDataBlock.Set( aBuf, aLength ); |
|
57 |
|
58 iBuf = aBuf; |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CQueItem::NewL |
|
63 // Two-phased constructor. |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 CQueItem* CQueItem::NewL( TUint8* aBuf, TInt aLength ) |
|
67 { |
|
68 CQueItem* self = new ( ELeave ) CQueItem(); |
|
69 CleanupStack::PushL( self ); |
|
70 self->ConstructL( aBuf, aLength ); |
|
71 CleanupStack::Pop(); |
|
72 return self; |
|
73 } |