|
1 /* |
|
2 * Copyright (c) 2002-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "mcetransactiondatacontainer.h" |
|
22 #include "mceclilogs.h" |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS =============================== |
|
25 |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // TMceTransactionDataContainer::GetStatusCode |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 EXPORT_C TMceTransactionDataContainer::TMceTransactionDataContainer() : |
|
32 iStatusCode(0), |
|
33 iReasonPhrase(0), |
|
34 iHeaders(0), |
|
35 iContentType(0), |
|
36 iContentHeaders(0), |
|
37 iContent(0), |
|
38 iReserved(0) |
|
39 { |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // TMceTransactionDataContainer::GetStatusCode |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 EXPORT_C TInt TMceTransactionDataContainer::GetStatusCode() |
|
47 { |
|
48 TInt tmpStatusCode = iStatusCode; |
|
49 iStatusCode = 0; |
|
50 return tmpStatusCode; |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // TMceTransactionDataContainer::GetReasonPhrase |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 EXPORT_C HBufC8* TMceTransactionDataContainer::GetReasonPhrase() |
|
58 { |
|
59 HBufC8* tmpReasonPhrase = iReasonPhrase; |
|
60 iReasonPhrase = 0; |
|
61 return tmpReasonPhrase; |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // TMceTransactionDataContainer::GetHeaders |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 EXPORT_C CDesC8Array* TMceTransactionDataContainer::GetHeaders() |
|
69 { |
|
70 CDesC8Array* tmpHeaders = iHeaders; |
|
71 iHeaders = 0; |
|
72 return tmpHeaders; |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // TMceTransactionDataContainer::GetContentType |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 EXPORT_C HBufC8* TMceTransactionDataContainer::GetContentType() |
|
80 { |
|
81 HBufC8* tmpContentType = iContentType; |
|
82 iContentType = 0; |
|
83 return tmpContentType; |
|
84 } |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // TMceTransactionDataContainer::GetHeaders |
|
88 // ----------------------------------------------------------------------------- |
|
89 // |
|
90 EXPORT_C CDesC8Array* TMceTransactionDataContainer::GetContentHeaders() |
|
91 { |
|
92 CDesC8Array* tmpHeaders = iContentHeaders; |
|
93 iContentHeaders = 0; |
|
94 return tmpHeaders; |
|
95 } |
|
96 |
|
97 // ----------------------------------------------------------------------------- |
|
98 // TMceTransactionDataContainer::GetContent |
|
99 // ----------------------------------------------------------------------------- |
|
100 // |
|
101 EXPORT_C HBufC8* TMceTransactionDataContainer::GetContent() |
|
102 { |
|
103 HBufC8* tmpContent = iContent; |
|
104 iContent = 0; |
|
105 return tmpContent; |
|
106 } |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // TMceTransactionDataContainer::SetStatusCode |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 void TMceTransactionDataContainer::SetStatusCode( TInt aStatusCode) |
|
113 { |
|
114 iStatusCode = aStatusCode; |
|
115 } |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // TMceTransactionDataContainer::SetReasonPhrase |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 void TMceTransactionDataContainer::SetReasonPhrase( HBufC8* aReasonPhrase ) |
|
122 { |
|
123 delete iReasonPhrase; |
|
124 iReasonPhrase = aReasonPhrase; |
|
125 } |
|
126 |
|
127 // ----------------------------------------------------------------------------- |
|
128 // TMceTransactionDataContainer::SetHeaders |
|
129 // ----------------------------------------------------------------------------- |
|
130 // |
|
131 void TMceTransactionDataContainer::SetHeaders( CDesC8Array* aHeaders ) |
|
132 { |
|
133 delete iHeaders; |
|
134 iHeaders = aHeaders; |
|
135 } |
|
136 |
|
137 // ----------------------------------------------------------------------------- |
|
138 // TMceTransactionDataContainer::SetContentType |
|
139 // ----------------------------------------------------------------------------- |
|
140 // |
|
141 void TMceTransactionDataContainer::SetContentType( HBufC8* aContentType ) |
|
142 { |
|
143 delete iContentType; |
|
144 iContentType = aContentType; |
|
145 } |
|
146 |
|
147 // ----------------------------------------------------------------------------- |
|
148 // TMceTransactionDataContainer::SetContent |
|
149 // ----------------------------------------------------------------------------- |
|
150 // |
|
151 void TMceTransactionDataContainer::SetContent( HBufC8* aContent ) |
|
152 { |
|
153 delete iContent; |
|
154 iContent = aContent; |
|
155 } |
|
156 |
|
157 // ----------------------------------------------------------------------------- |
|
158 // TMceTransactionDataContainer::SetContentHeaders |
|
159 // ----------------------------------------------------------------------------- |
|
160 // |
|
161 void TMceTransactionDataContainer::SetContentHeaders( CDesC8Array* aHeaders ) |
|
162 { |
|
163 delete iContentHeaders; |
|
164 iContentHeaders = aHeaders; |
|
165 } |
|
166 |
|
167 // ----------------------------------------------------------------------------- |
|
168 // TMceTransactionDataContainer::Clear |
|
169 // ----------------------------------------------------------------------------- |
|
170 // |
|
171 void TMceTransactionDataContainer::Clear() |
|
172 { |
|
173 MCECLI_DEBUG( "TMceTransactionDataContainer::Clear, Entry" ) |
|
174 |
|
175 iStatusCode = 0; |
|
176 delete iReasonPhrase; |
|
177 iReasonPhrase = 0; |
|
178 delete iHeaders; |
|
179 iHeaders = 0; |
|
180 delete iContentType; |
|
181 iContentType = 0; |
|
182 delete iContentHeaders; |
|
183 iContentHeaders = 0; |
|
184 delete iContent; |
|
185 iContent = 0; |
|
186 |
|
187 MCECLI_DEBUG( "TMceTransactionDataContainer::Clear, Exit" ) |
|
188 } |