2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
25 /* CFStringEncodingConverterPriv.h
26 Copyright (c) 1998-2003, Apple, Inc. All rights reserved.
29 #if !defined(__COREFOUNDATION_CFSTRINGENCODINGCONVERTERPRIV__)
30 #define __COREFOUNDATION_CFSTRINGENCODINGCONVERTERPRIV__ 1
32 #include <CoreFoundation/CFBase.h>
33 #include "CFStringEncodingConverterExt.h"
35 #define MAX_IANA_ALIASES (4)
37 typedef UInt32 (*_CFToBytesProc
)(const void *converter
, UInt32 flags
, const UniChar
*characters
, UInt32 numChars
, UInt8
*bytes
, UInt32 maxByteLen
, UInt32
*usedByteLen
);
38 typedef UInt32 (*_CFToUnicodeProc
)(const void *converter
, UInt32 flags
, const UInt8
*bytes
, UInt32 numBytes
, UniChar
*characters
, UInt32 maxCharLen
, UInt32
*usedCharLen
);
41 _CFToBytesProc toBytes
;
42 _CFToUnicodeProc toUnicode
;
43 _CFToUnicodeProc toCanonicalUnicode
;
44 void *_toBytes
; // original proc
45 void *_toUnicode
; // original proc
48 CFStringEncodingToBytesLenProc toBytesLen
;
49 CFStringEncodingToUnicodeLenProc toUnicodeLen
;
50 CFStringEncodingToBytesFallbackProc toBytesFallback
;
51 CFStringEncodingToUnicodeFallbackProc toUnicodeFallback
;
52 CFStringEncodingToBytesPrecomposeProc toBytesPrecompose
;
53 CFStringEncodingIsValidCombiningCharacterProc isValidCombiningChar
;
54 } _CFEncodingConverter
;
58 _CFEncodingConverter
*converter
;
59 const char *encodingName
;
60 const char *ianaNames
[MAX_IANA_ALIASES
];
61 const char *loadablePath
;
62 CFStringEncodingBootstrapProc bootstrap
;
63 CFStringEncodingToBytesFallbackProc toBytesFallback
;
64 CFStringEncodingToUnicodeFallbackProc toUnicodeFallback
;
68 extern CFStringEncodingConverter __CFConverterASCII
;
69 extern CFStringEncodingConverter __CFConverterISOLatin1
;
70 extern CFStringEncodingConverter __CFConverterMacRoman
;
71 extern CFStringEncodingConverter __CFConverterWinLatin1
;
72 extern CFStringEncodingConverter __CFConverterNextStepLatin
;
73 extern CFStringEncodingConverter __CFConverterUTF8
;
76 #endif /* ! __COREFOUNDATION_CFSTRINGENCODINGCONVERTERPRIV__ */