|
1 /* |
|
2 * Copyright (c) 2002-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: Handles and stores the VoIP codec settings. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <crcseaudiocodecentry.h> |
|
21 #include "CWPVoIPCodec.h" |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS ============================= |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // CWPVoIPCodec::CWPVoIPCodec |
|
27 // C++ default constructor can NOT contain any code, that |
|
28 // might leave. |
|
29 // --------------------------------------------------------------------------- |
|
30 CWPVoIPCodec::CWPVoIPCodec() |
|
31 { |
|
32 } |
|
33 |
|
34 // --------------------------------------------------------------------------- |
|
35 // CWPVoIPCodec::ConstructL |
|
36 // Symbian 2nd phase constructor can leave. |
|
37 // --------------------------------------------------------------------------- |
|
38 void CWPVoIPCodec::ConstructL() |
|
39 { |
|
40 iMediaTypeName = HBufC::NewL( 0 ); |
|
41 iMediaSubtypeName = HBufC::NewL( 0 ); |
|
42 iJitterBufferSize = KNotSet; |
|
43 iOctetAlign = KNotSet; |
|
44 iModeChangePeriod = KNotSet; |
|
45 iModeChangeNeighbor = KNotSet; |
|
46 iPTime = KNotSet; |
|
47 iMaxPTime = KNotSet; |
|
48 iCrc = KNotSet; |
|
49 iRobustSorting = KNotSet; |
|
50 iInterLeaving = KNotSet; |
|
51 iVAD = KNotSet; |
|
52 iDTX = KNotSet; |
|
53 iSamplingRate = KNotSet; |
|
54 iAnnexB = KNotSet; |
|
55 iMaxRed = KNotSet; |
|
56 } |
|
57 |
|
58 // --------------------------------------------------------------------------- |
|
59 // CWPVoIPCodec::NewL |
|
60 // Two-phased constructor. |
|
61 // --------------------------------------------------------------------------- |
|
62 CWPVoIPCodec* CWPVoIPCodec::NewL() |
|
63 { |
|
64 CWPVoIPCodec* self = new( ELeave ) CWPVoIPCodec; |
|
65 CleanupStack::PushL( self ); |
|
66 self->ConstructL(); |
|
67 CleanupStack::Pop( self ); |
|
68 return self; |
|
69 } |
|
70 |
|
71 // Destructor |
|
72 CWPVoIPCodec::~CWPVoIPCodec() |
|
73 { |
|
74 delete iMediaTypeName; |
|
75 delete iMediaSubtypeName; |
|
76 if ( iModeSet.Count() ) |
|
77 { |
|
78 iModeSet.Reset(); |
|
79 iModeSet.Close(); |
|
80 } |
|
81 if ( iChannels.Count() ) |
|
82 { |
|
83 iChannels.Reset(); |
|
84 iChannels.Close(); |
|
85 } |
|
86 } |
|
87 |
|
88 // --------------------------------------------------------------------------- |
|
89 // CWPVoIPCodec::SetMediaSubtypeNameL |
|
90 // |
|
91 // --------------------------------------------------------------------------- |
|
92 void CWPVoIPCodec::SetMediaSubtypeNameL( const TDesC& aMediaSubtypeName ) |
|
93 { |
|
94 delete iMediaSubtypeName; |
|
95 iMediaSubtypeName = NULL; |
|
96 iMediaSubtypeName = aMediaSubtypeName.AllocL(); |
|
97 } |
|
98 |
|
99 // End of File |