webengine/osswebengine/WebCore/platform/network/symbian/DataConnection.cpp
changeset 65 5bfc169077b2
parent 36 0ed94ceaa377
child 68 92a765b5b3e7
equal deleted inserted replaced
42:d39add9822e2 65:5bfc169077b2
     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() );