telephonyprotocols/csdagt/script/SCHCONV.H
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /**
       
     2 * Copyright (c) 2003-2009 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 * Character conversion class header.
       
    16 * 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file Schconv.h
       
    24  @internalComponent
       
    25 */
       
    26 
       
    27 #ifndef __SCHCONV_H__
       
    28 #define __SCHCONV_H__
       
    29 
       
    30 #include <f32file.h>		// need this because bug in charconv
       
    31 #include <charconv.h>
       
    32 
       
    33 const TInt KMaxCharacterTypeLength=60;
       
    34 
       
    35 class CScriptCharacterConverter : public CBase
       
    36 /**
       
    37 @internalComponent
       
    38 */
       
    39 	{
       
    40 public:
       
    41 	static CScriptCharacterConverter* NewL();
       
    42 	CScriptCharacterConverter();
       
    43 	~CScriptCharacterConverter();
       
    44 //	
       
    45 	HBufC8* ConvertLC(const TDesC8& aString, const TDesC& aCharSet);
       
    46 	HBufC8* ConvertLC(const TDesC16& aString, const TDesC& aCharSet);
       
    47 	HBufC8* ConvertL(const TDesC8& aString, const TDesC& aCharSet);
       
    48 	HBufC8* ConvertL(const TDesC16& aString, const TDesC& aCharSet);
       
    49 	void ConvertFromDefaultL(const TDesC8& aSrc,TDes& aTrg);
       
    50 	void SetDefaultCharSet(const TDesC& aCharSet);
       
    51 private:	
       
    52 	void ConstructL();
       
    53 	void PrepareToConvertL(const TDesC& aNameToMatch);
       
    54 	void CopyToEightBitDataL(TDes8& aTrg, const TDesC16& aSrc);
       
    55 	void CopyFromEightBitDataL(TDes16& aTrg, const TDesC8& aSrc);
       
    56 	void DoConvertFromDefaultToUnicodeL(const TDesC8& aSrc,TDes16& aTrg);
       
    57 	TBool IsUnicode(const TDesC& aType) const;
       
    58 private:
       
    59 	CCnvCharacterSetConverter* iConverter;
       
    60 	TBuf<KMaxCharacterTypeLength> iDefaultCharSet;
       
    61 	RFs iFs;
       
    62 	};
       
    63 
       
    64 #endif