|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Name : SdpAttributeFieldPtrs.h |
|
15 // Part of : SDP Codec |
|
16 // Version : 1.0 |
|
17 // |
|
18 |
|
19 |
|
20 |
|
21 #include "SdpAttributeFieldPtrs.h" |
|
22 #include "SdpFmtAttributeField.h" |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // CSdpAttributeFieldPtrs::NewL |
|
26 // ----------------------------------------------------------------------------- |
|
27 // |
|
28 CSdpAttributeFieldPtrs* CSdpAttributeFieldPtrs::NewL() |
|
29 { |
|
30 CSdpAttributeFieldPtrs* self = new ( ELeave ) CSdpAttributeFieldPtrs; |
|
31 CleanupStack::PushL( self ); |
|
32 self->ConstructL(); |
|
33 CleanupStack::Pop( self ); |
|
34 return self; |
|
35 } |
|
36 |
|
37 // ---------------------------------------------------------------------------- |
|
38 // CSdpAttributeFieldPtrs::CSdpAttributeFieldPtrs |
|
39 // ---------------------------------------------------------------------------- |
|
40 // |
|
41 CSdpAttributeFieldPtrs::CSdpAttributeFieldPtrs() |
|
42 { |
|
43 } |
|
44 |
|
45 // ---------------------------------------------------------------------------- |
|
46 // CSdpAttributeFieldPtrs::ConstructL |
|
47 // ---------------------------------------------------------------------------- |
|
48 // |
|
49 void CSdpAttributeFieldPtrs::ConstructL() |
|
50 { |
|
51 iValue = KNullDesC8().AllocL(); |
|
52 } |
|
53 |
|
54 // ---------------------------------------------------------------------------- |
|
55 // CSdpAttributeFieldPtrs::~CSdpAttributeFieldPtrs |
|
56 // ---------------------------------------------------------------------------- |
|
57 // |
|
58 CSdpAttributeFieldPtrs::~CSdpAttributeFieldPtrs() |
|
59 { |
|
60 delete iValue; |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CSdpAttributeFieldPtrs::SetValueL |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 void CSdpAttributeFieldPtrs::SetValueL( const TDesC8& aValue ) |
|
68 { |
|
69 HBufC8* tmp = aValue.AllocL(); |
|
70 delete iValue; |
|
71 iValue = tmp; |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CSdpAttributeFieldPtrs::Value |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 const TDesC8& CSdpAttributeFieldPtrs::Value() const |
|
79 { |
|
80 return *iValue; |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CSdpAttributeFieldPtrs::SetFmtAttribute |
|
85 // ----------------------------------------------------------------------------- |
|
86 // |
|
87 void CSdpAttributeFieldPtrs::SetFmtAttribute( |
|
88 const CSdpFmtAttributeField* aFmtAttribute ) |
|
89 { |
|
90 iFmtAttributeField = aFmtAttribute; |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CSdpAttributeFieldPtrs::FmtAttribute |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 const CSdpFmtAttributeField* CSdpAttributeFieldPtrs::FmtAttribute() const |
|
98 { |
|
99 return iFmtAttributeField; |
|
100 } |