|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <mmf/server/mmfformat.h> |
|
20 #include "AmrPayloadFormatRead.h" |
|
21 #include "AmrPayloadFormatWrite.h" |
|
22 #include "dtmfpayloadformatread.h" |
|
23 #include "dtmfpayloadformatwrite.h" |
|
24 //#include "mccredpayloadread.h" |
|
25 //#include "mccredpayloadwrite.h" |
|
26 #include "mccuids.hrh" |
|
27 |
|
28 EXPORT_C CMMFFormatDecode* CMMFFormatDecode::NewL( TUid aUid, MDataSource* aSource ) |
|
29 { |
|
30 if ( aUid.iUid == KImplUidAmrPayloadFormatDecode || |
|
31 aUid.iUid == KImplUidAnyPayloadFormatDecode || |
|
32 aUid.iUid == KImplUidRedPayloadFormatDecode || |
|
33 aUid.iUid == KImplUidiLBCPayloadFormatDecode ) |
|
34 { |
|
35 return CAmrPayloadFormatRead::NewL( aSource ); |
|
36 } |
|
37 else if ( aUid.iUid == KImplUidDTMFPayloadFormatDecode ) |
|
38 { |
|
39 return CDTMFPayloadFormatRead::NewL( aSource ); |
|
40 } |
|
41 // else if ( aUid.iUid == KImplUidRedPayloadFormatDecode ) |
|
42 // { |
|
43 // return CMccRedPayloadRead::NewL( aSource ); |
|
44 // } |
|
45 User::Leave( KErrNotSupported ); |
|
46 return NULL; |
|
47 } |
|
48 |
|
49 EXPORT_C CMMFFormatEncode* CMMFFormatEncode::NewL( TUid aUid, MDataSink* aSink ) |
|
50 { |
|
51 if ( aUid.iUid == KImplUidAmrPayloadFormatEncode ) |
|
52 { |
|
53 return CAmrPayloadFormatWrite::NewL( aSink ); |
|
54 } |
|
55 else if ( aUid.iUid == KImplUidDTMFPayloadFormatEncode ) |
|
56 { |
|
57 return CDTMFPayloadFormatWrite::NewL( aSink ); |
|
58 } |
|
59 User::Leave( KErrNotSupported ); |
|
60 return NULL; |
|
61 } |