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