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