epoc32/include/convdata.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 /*
     2 // All rights reserved.
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // This component and the accompanying materials are made available
     3 * All rights reserved.
     4 // 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
     4 * This component and the accompanying materials are made available
     5 // which accompanies this distribution, and is available
     5 * under the terms of "Eclipse Public License v1.0"
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 * which accompanies this distribution, and is available
     7 //
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 // Initial Contributors:
     8 *
     9 // Nokia Corporation - initial contribution.
     9 * Initial Contributors:
    10 //
    10 * Nokia Corporation - initial contribution.
    11 // Contributors:
    11 *
    12 //
    12 * Contributors:
    13 // Description:
    13 *
    14 //
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
    15 
    18 
    16 #if !defined(__CONVDATA_H__)
    19 #if !defined(__CONVDATA_H__)
    17 #define __CONVDATA_H__
    20 #define __CONVDATA_H__
    18 
    21 
    19 /**
    22 /**
       
    23 This structure doesn't intend to be used by external developers.
       
    24 For plugin creators, all they need is to include this header file in order to compile. All the plugin data are generated from provided perl scripts. 
       
    25  
       
    26 Any use of this structure externally are not proved to be compatible in future. 
    20 @internalComponent
    27 @internalComponent
    21 */
    28 */
    22 struct SCnvConversionData
    29 struct SCnvConversionData
    23 	{
    30 	{
    24 /** Specifies the default endian-ness of the current character set. Used by SetDefaultEndiannessOfForeignCharacters(). */
    31 /** Specifies the default endian-ness of the current character set. Used by SetDefaultEndiannessOfForeignCharacters(). */
    49 				// each of these, with the exception of EDirect, has a corresponding member of UData
    56 				// each of these, with the exception of EDirect, has a corresponding member of UData
    50 				EDirect,
    57 				EDirect,
    51 				EOffset,
    58 				EOffset,
    52 				EIndexedTable16,
    59 				EIndexedTable16,
    53 				EKeyedTable1616,
    60 				EKeyedTable1616,
    54 				EKeyedTable16OfIndexedTables16
    61 				EKeyedTable16OfIndexedTables16,
       
    62 				EIndexedTable32,
       
    63 				EKeyedTable3232,
       
    64 				EKeyedTable32OfIndexedTables32
    55 				};
    65 				};
    56 			union UData
    66 			union UData
    57 				{
    67 				{
    58 				struct SIndexedTable16
    68 				struct SIndexedTable16
    59 					{
    69 					{
    82 						const TUint16* iIndexedEntryArray;
    92 						const TUint16* iIndexedEntryArray;
    83 						};
    93 						};
    84 					TInt iNumberOfKeyedEntries;
    94 					TInt iNumberOfKeyedEntries;
    85 					const SKeyedEntry* iKeyedEntryArray;
    95 					const SKeyedEntry* iKeyedEntryArray;
    86 					};
    96 					};
       
    97 				struct SIndexedTable32
       
    98 					{
       
    99 					struct SEntry
       
   100 						{
       
   101 						TUint32 iOutputCharacterCode;
       
   102 						};
       
   103 					const SEntry* iEntryArray;
       
   104 					};
       
   105 				struct SKeyedTable3232
       
   106 					{
       
   107 					struct SEntry
       
   108 						{
       
   109 						TUint32 iKey;
       
   110 						TUint32 iOutputCharacterCode;
       
   111 						};
       
   112 					TInt iNumberOfEntries;
       
   113 					const SEntry* iEntryArray;
       
   114 					};
       
   115 				struct SKeyedTable32OfIndexedTables32
       
   116 					{
       
   117 					struct SKeyedEntry
       
   118 						{
       
   119 						TUint32 iFirstInputCharacterCodeInIndexedTable;
       
   120 						TUint32 iLastInputCharacterCodeInIndexedTable;
       
   121 						const TUint32* iIndexedEntryArray;
       
   122 						};
       
   123 					TInt iNumberOfKeyedEntries;
       
   124 					const SKeyedEntry* iKeyedEntryArray;
       
   125 					};
    87 				TInt iOffset;
   126 				TInt iOffset;
    88 				SIndexedTable16 iIndexedTable16;
   127 				SIndexedTable16 iIndexedTable16;
    89 				SKeyedTable1616 iKeyedTable1616;
   128 				SKeyedTable1616 iKeyedTable1616;
    90 				SKeyedTable16OfIndexedTables16 iKeyedTable16OfIndexedTables16;
   129 				SKeyedTable16OfIndexedTables16 iKeyedTable16OfIndexedTables16;
       
   130 				SIndexedTable32 iIndexedTable32;
       
   131 				SKeyedTable3232 iKeyedTable3232;
       
   132 				SKeyedTable32OfIndexedTables32 iKeyedTable32OfIndexedTables32;
    91 				};
   133 				};
    92 			TUint iFirstInputCharacterCodeInRange;
   134 			TUint iFirstInputCharacterCodeInRange;
    93 			TUint iLastInputCharacterCodeInRange;
   135 			TUint iLastInputCharacterCodeInRange;
    94 			TUint8 iAlgorithm; // one of the TAlgorithm values
   136 			TUint8 iAlgorithm; // one of the TAlgorithm values
    95 			TUint8 iSizeOfOutputCharacterCodeInBytesIfForeign; // only used in SCnvConversionData::iUnicodeToForeignData
   137 			TUint8 iSizeOfOutputCharacterCodeInBytesIfForeign; // only used in SCnvConversionData::iUnicodeToForeignData
   130 @internalComponent
   172 @internalComponent
   131 */
   173 */
   132 #define UData_SKeyedTable16OfIndexedTables16(a)	\
   174 #define UData_SKeyedTable16OfIndexedTables16(a)	\
   133 	static_cast<TUint>ARRAY_LENGTH(a), \
   175 	static_cast<TUint>ARRAY_LENGTH(a), \
   134 	reinterpret_cast<TUint>(const_cast<SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable16OfIndexedTables16::SKeyedEntry *>(a)) 
   176 	reinterpret_cast<TUint>(const_cast<SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable16OfIndexedTables16::SKeyedEntry *>(a)) 
       
   177 /**
       
   178 @internalComponent
       
   179 */
       
   180 #define UData_SIndexedTable32(a) \
       
   181 	reinterpret_cast<TUint>(const_cast<SCnvConversionData::SOneDirectionData::SRange::UData::SIndexedTable32::SEntry*>(a)) 
       
   182 /**
       
   183 @internalComponent
       
   184 */
       
   185 #define UData_SKeyedTable3232(a) \
       
   186 	static_cast<TUint>ARRAY_LENGTH(a), \
       
   187 	reinterpret_cast<TUint>(const_cast<SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable3232::SEntry*>(a))
       
   188 /**
       
   189 @internalComponent
       
   190 */
       
   191 #define UData_SKeyedTable32OfIndexedTables32(a)	\
       
   192 	static_cast<TUint>ARRAY_LENGTH(a), \
       
   193 	reinterpret_cast<TUint>(const_cast<SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable32OfIndexedTables32::SKeyedEntry *>(a)) 
       
   194 #endif
   135 
   195 
   136 #endif