filehandling/fileconverterfw/SRC/BASE64.H
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 // Copyright (c) 1997-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 //
       
    15 
       
    16 #if !defined(__e32base_h__)
       
    17 #include <e32base.h>
       
    18 #endif
       
    19 
       
    20 const TInt KErrInvalidSource=(-1);
       
    21 const TUint8 KErrInvalidCharacter=65;
       
    22 
       
    23 enum TBase64Panic
       
    24 	{
       
    25 	EBase64Overflow
       
    26 	};
       
    27 
       
    28 class CBase64CodecBase : public CBase
       
    29 	{
       
    30 public:
       
    31 	void Reset();
       
    32 	TInt Encode(const TDesC8& aSource, TDes8& aResult) const;
       
    33 	TInt Decode(const TDesC8& aSource, TDes8& aResult);
       
    34 	TUint8 Base64Char(TText8 aChar) const;
       
    35 private:
       
    36 	TUint8 iQuart[4];
       
    37 	TInt iQuartCount;
       
    38 	};
       
    39