williamr@2: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #if !defined(__CONVDATA_H__) williamr@2: #define __CONVDATA_H__ williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: struct SCnvConversionData williamr@2: { williamr@2: /** Specifies the default endian-ness of the current character set. Used by SetDefaultEndiannessOfForeignCharacters(). */ williamr@2: enum TEndianness // the values of these *must not* change they are used hard-coded in CNVTOOL.PL williamr@2: { williamr@2: EUnspecified =0, williamr@2: EFixedLittleEndian =1, williamr@2: EFixedBigEndian =2 williamr@2: }; williamr@2: struct SVariableByteData williamr@2: { williamr@2: struct SRange williamr@2: { williamr@2: TUint8 iFirstInitialByteValueInRange; williamr@2: TUint8 iLastInitialByteValueInRange; williamr@2: TUint8 iNumberOfSubsequentBytes; williamr@2: TUint8 iSpare; williamr@2: }; williamr@2: TInt iNumberOfRanges; williamr@2: const SRange* iRangeArray; williamr@2: }; williamr@2: struct SOneDirectionData williamr@2: { williamr@2: struct SRange williamr@2: { williamr@2: enum TAlgorithm williamr@2: { williamr@2: // each of these, with the exception of EDirect, has a corresponding member of UData williamr@2: EDirect, williamr@2: EOffset, williamr@2: EIndexedTable16, williamr@2: EKeyedTable1616, williamr@2: EKeyedTable16OfIndexedTables16 williamr@2: }; williamr@2: union UData williamr@2: { williamr@2: struct SIndexedTable16 williamr@2: { williamr@2: struct SEntry williamr@2: { williamr@2: TUint16 iOutputCharacterCode; williamr@2: }; williamr@2: const SEntry* iEntryArray; williamr@2: }; williamr@2: struct SKeyedTable1616 williamr@2: { williamr@2: struct SEntry williamr@2: { williamr@2: TUint16 iKey; williamr@2: TUint16 iOutputCharacterCode; williamr@2: }; williamr@2: TInt iNumberOfEntries; williamr@2: const SEntry* iEntryArray; williamr@2: }; williamr@2: struct SKeyedTable16OfIndexedTables16 williamr@2: { williamr@2: struct SKeyedEntry williamr@2: { williamr@2: TUint16 iFirstInputCharacterCodeInIndexedTable; williamr@2: TUint16 iLastInputCharacterCodeInIndexedTable; williamr@2: const TUint16* iIndexedEntryArray; williamr@2: }; williamr@2: TInt iNumberOfKeyedEntries; williamr@2: const SKeyedEntry* iKeyedEntryArray; williamr@2: }; williamr@2: TInt iOffset; williamr@2: SIndexedTable16 iIndexedTable16; williamr@2: SKeyedTable1616 iKeyedTable1616; williamr@2: SKeyedTable16OfIndexedTables16 iKeyedTable16OfIndexedTables16; williamr@2: }; williamr@2: TUint iFirstInputCharacterCodeInRange; williamr@2: TUint iLastInputCharacterCodeInRange; williamr@2: TUint8 iAlgorithm; // one of the TAlgorithm values williamr@2: TUint8 iSizeOfOutputCharacterCodeInBytesIfForeign; // only used in SCnvConversionData::iUnicodeToForeignData williamr@2: TUint16 iSpare; williamr@2: #if defined(CONST_STATIC_UNIONS_ARE_POSSIBLE) williamr@2: UData iData; williamr@2: #else williamr@2: struct williamr@2: { williamr@2: TUint iWord1; williamr@2: TUint iWord2; williamr@2: } iData; williamr@2: #endif williamr@2: }; williamr@2: TInt iNumberOfRanges; williamr@2: const SRange* iRangeArray; williamr@2: }; williamr@2: TEndianness iEndiannessOfForeignCharacters; williamr@2: SVariableByteData iForeignVariableByteData; williamr@2: SOneDirectionData iForeignToUnicodeData; williamr@2: SOneDirectionData iUnicodeToForeignData; williamr@2: TAny* iSpareForFutureUse_1; williamr@2: TAny* iSpareForFutureUse_2; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: #define UData_SIndexedTable16(a) \ williamr@2: reinterpret_cast(const_cast(a)) williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: #define UData_SKeyedTable1616(a) \ williamr@2: static_castARRAY_LENGTH(a), \ williamr@2: reinterpret_cast(const_cast(a)) williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: #define UData_SKeyedTable16OfIndexedTables16(a) \ williamr@2: static_castARRAY_LENGTH(a), \ williamr@2: reinterpret_cast(const_cast(a)) williamr@2: williamr@2: #endif