equal
deleted
inserted
replaced
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include <f32file.h> |
18 #include <f32file.h> |
19 #include <uri8.h> |
19 #include <uri8.h> |
20 #include <EscapeUtils.h> |
20 #include <EscapeUtils.h> |
21 #include <apmrec.h> |
21 #include <apmrec.h> |
22 #include <apgcli.h> |
22 #include <apgcli.h> |
|
23 //#include <imcvcodc.h> |
23 #include <tconvbase64.h> |
24 #include <tconvbase64.h> |
24 #include "ResourceHandle.h" |
25 #include "ResourceHandle.h" |
25 #include "ResourceRequest.h" |
26 #include "ResourceRequest.h" |
26 #include "DataConnection.h" |
27 #include "DataConnection.h" |
27 #include "FileReader.h" |
28 #include "FileReader.h" |
146 if( base64 ) { |
147 if( base64 ) { |
147 // allocate twice as big buffer for decoded string |
148 // allocate twice as big buffer for decoded string |
148 body = HBufC8::NewLC( 2 * data.Length() ); |
149 body = HBufC8::NewLC( 2 * data.Length() ); |
149 TPtr8 decodedBody( body->Des() ); |
150 TPtr8 decodedBody( body->Des() ); |
150 // urlPtr8 |
151 // urlPtr8 |
151 TBase64 codec; |
152 //TImCodecB64 codec; |
|
153 //codec.Initialise(); |
|
154 TBase64 codec; |
152 ok = codec.Decode( data, decodedBody ); |
155 ok = codec.Decode( data, decodedBody ); |
153 } |
156 } |
154 if( !ok ) { // if not base64, simple copy |
157 if( !ok ) { // if not base64, simple copy |
155 if( !body ) { |
158 if( !body ) { |
156 body = HBufC8::NewLC( data.Length() ); |
159 body = HBufC8::NewLC( data.Length() ); |