#if !defined(__COREFOUNDATION_CFPRIV__)
#define __COREFOUNDATION_CFPRIV__ 1
#include <string.h>
#include <CoreFoundation/CFBase.h>
#include <CoreFoundation/CFArray.h>
#include <CoreFoundation/CFString.h>
#include <CoreFoundation/CFURL.h>
#include <CoreFoundation/CFLocale.h>
#include <CoreFoundation/CFDate.h>
#include <CoreFoundation/CFSet.h>
#include <math.h>
#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE || TARGET_OS_LINUX)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)
#include <CoreFoundation/CFMachPort.h>
#include <CoreFoundation/CFMessagePort.h>
#endif
#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE) || TARGET_OS_WIN32
#include <CoreFoundation/CFRunLoop.h>
#include <CoreFoundation/CFSocket.h>
#include <CoreFoundation/CFBundlePriv.h>
#endif
CF_EXTERN_C_BEGIN
CF_EXPORT intptr_t _CFDoOperation(intptr_t code, intptr_t subcode1, intptr_t subcode2);
CF_EXPORT void _CFRuntimeSetCFMPresent(void *a);
CF_EXPORT const char *_CFProcessPath(void);
CF_EXPORT const char **_CFGetProcessPath(void);
CF_EXPORT const char **_CFGetProgname(void);
#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE || TARGET_OS_LINUX))
CF_EXPORT void _CFRunLoopSetCurrent(CFRunLoopRef rl);
#endif
#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE || TARGET_OS_LINUX)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)
CF_EXPORT CFRunLoopRef CFRunLoopGetMain(void);
CF_EXPORT SInt32 CFRunLoopRunSpecific(CFRunLoopRef rl, CFStringRef modeName, CFTimeInterval seconds, Boolean returnAfterSourceHandled);
CF_EXPORT void _CFRunLoopStopMode(CFRunLoopRef rl, CFStringRef modeName);
CF_EXPORT CFIndex CFMachPortGetQueuedMessageCount(CFMachPortRef mp);
CF_EXPORT CFPropertyListRef _CFURLCopyPropertyListRepresentation(CFURLRef url);
#endif
CF_EXPORT CFPropertyListRef _CFURLCopyPropertyListRepresentation(CFURLRef url);
CF_EXPORT CFURLRef _CFURLCreateFromPropertyListRepresentation(CFAllocatorRef alloc, CFPropertyListRef pListRepresentation);
CF_EXPORT void CFPreferencesFlushCaches(void);
#if TARGET_OS_WIN32
CF_EXPORT Boolean _CFURLGetWideFileSystemRepresentation(CFURLRef url, Boolean resolveAgainstBase, wchar_t *buffer, CFIndex bufferLength);
#endif
#if !__LP64__
#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)
struct FSSpec;
CF_EXPORT
Boolean _CFGetFSSpecFromURL(CFAllocatorRef alloc, CFURLRef url, struct FSSpec *spec);
CF_EXPORT
CFURLRef _CFCreateURLFromFSSpec(CFAllocatorRef alloc, const struct FSSpec *voidspec, Boolean isDirectory);
#endif
#endif
typedef CF_ENUM(CFIndex, CFURLComponentDecomposition) {
kCFURLComponentDecompositionNonHierarchical,
kCFURLComponentDecompositionRFC1808,
kCFURLComponentDecompositionRFC2396
};
typedef struct {
CFStringRef scheme;
CFStringRef schemeSpecific;
} CFURLComponentsNonHierarchical;
typedef struct {
CFStringRef scheme;
CFStringRef user;
CFStringRef password;
CFStringRef host;
CFIndex port;
CFArrayRef pathComponents;
CFStringRef parameterString;
CFStringRef query;
CFStringRef fragment;
CFURLRef baseURL;
} CFURLComponentsRFC1808;
typedef struct {
CFStringRef scheme;
CFStringRef userinfo;
CFStringRef host;
CFIndex port;
CFArrayRef pathComponents;
CFStringRef query;
CFStringRef fragment;
CFURLRef baseURL;
} CFURLComponentsRFC2396;
CF_EXPORT
Boolean _CFURLCopyComponents(CFURLRef url, CFURLComponentDecomposition decompositionType, void *components);
CF_EXPORT
CFURLRef _CFURLCreateFromComponents(CFAllocatorRef alloc, CFURLComponentDecomposition decompositionType, const void *components);
#define CFURLCopyComponents _CFURLCopyComponents
#define CFURLCreateFromComponents _CFURLCreateFromComponents
CF_EXPORT Boolean _CFStringGetFileSystemRepresentation(CFStringRef string, UInt8 *buffer, CFIndex maxBufLen);
CF_EXPORT CFStringRef _CFStringCreateWithBytesNoCopy(CFAllocatorRef alloc, const UInt8 *bytes, CFIndex numBytes, CFStringEncoding encoding, Boolean externalFormat, CFAllocatorRef contentsDeallocator);
CF_EXPORT
CFStringRef CFGetUserName(void);
CF_EXPORT
CFStringRef CFCopyUserName(void);
CF_EXPORT
CFURLRef CFCopyHomeDirectoryURLForUser(CFStringRef uName);
typedef CF_ENUM(CFIndex, CFSearchPathDirectory) {
kCFApplicationDirectory = 1,
kCFDemoApplicationDirectory,
kCFDeveloperApplicationDirectory,
kCFAdminApplicationDirectory,
kCFLibraryDirectory,
kCFDeveloperDirectory,
kCFUserDirectory,
kCFDocumentationDirectory,
kCFDocumentDirectory,
kCFCoreServiceDirectory = 10, kCFAutosavedInformationDirectory = 11, kCFDesktopDirectory = 12, kCFCachesDirectory = 13, kCFApplicationSupportDirectory = 14, kCFDownloadsDirectory = 15, kCFInputMethodsDirectory = 16, kCFMoviesDirectory = 17, kCFMusicDirectory = 18, kCFPicturesDirectory = 19, kCFPrinterDescriptionDirectory = 20, kCFSharedPublicDirectory = 21, kCFPreferencePanesDirectory = 22,
kCFAllApplicationsDirectory = 100,
kCFAllLibrariesDirectory = 101
};
typedef CF_OPTIONS(CFOptionFlags, CFSearchPathDomainMask) {
kCFUserDomainMask = 1,
kCFLocalDomainMask = 2,
kCFNetworkDomainMask = 4,
kCFSystemDomainMask = 8,
kCFAllDomainsMask = 0x0ffff
};
CF_EXPORT
CFArrayRef CFCopySearchPathForDirectoriesInDomains(CFSearchPathDirectory directory, CFSearchPathDomainMask domainMask, Boolean expandTilde);
CF_EXPORT const CFStringRef kCFFileURLExists;
CF_EXPORT const CFStringRef kCFFileURLPOSIXMode;
CF_EXPORT const CFStringRef kCFFileURLSize;
CF_EXPORT const CFStringRef kCFFileURLDirectoryContents;
CF_EXPORT const CFStringRef kCFFileURLLastModificationTime;
CF_EXPORT const CFStringRef kCFHTTPURLStatusCode;
CF_EXPORT const CFStringRef kCFHTTPURLStatusLine;
CF_EXPORT CFStringRef CFCopySystemVersionString(void); CF_EXPORT CFDictionaryRef _CFCopySystemVersionDictionary(void);
CF_EXPORT CFDictionaryRef _CFCopyServerVersionDictionary(void);
CF_EXPORT const CFStringRef _kCFSystemVersionProductNameKey;
CF_EXPORT const CFStringRef _kCFSystemVersionProductCopyrightKey;
CF_EXPORT const CFStringRef _kCFSystemVersionProductVersionKey;
CF_EXPORT const CFStringRef _kCFSystemVersionProductVersionExtraKey;
CF_EXPORT const CFStringRef _kCFSystemVersionProductUserVisibleVersionKey; CF_EXPORT const CFStringRef _kCFSystemVersionBuildVersionKey;
CF_EXPORT const CFStringRef _kCFSystemVersionProductVersionStringKey; CF_EXPORT const CFStringRef _kCFSystemVersionBuildStringKey;
CF_EXPORT void CFMergeSortArray(void *list, CFIndex count, CFIndex elementSize, CFComparatorFunction comparator, void *context);
CF_EXPORT void CFQSortArray(void *list, CFIndex count, CFIndex elementSize, CFComparatorFunction comparator, void *context);
typedef CF_ENUM(CFIndex, CFSystemVersion) {
CFSystemVersionCheetah = 0,
CFSystemVersionPuma = 1,
CFSystemVersionJaguar = 2,
CFSystemVersionPanther = 3,
CFSystemVersionTiger = 4,
CFSystemVersionLeopard = 5,
CFSystemVersionSnowLeopard = 6,
CFSystemVersionLion = 7,
CFSystemVersionMountainLion = 8,
CFSystemVersionMax,
};
CF_EXPORT Boolean _CFExecutableLinkedOnOrAfter(CFSystemVersion version);
typedef CF_ENUM(CFIndex, CFStringCharacterClusterType) {
kCFStringGraphemeCluster = 1,
kCFStringComposedCharacterCluster = 2,
kCFStringCursorMovementCluster = 3,
kCFStringBackwardDeletionCluster = 4
};
CF_EXPORT CFRange CFStringGetRangeOfCharacterClusterAtIndex(CFStringRef string, CFIndex charIndex, CFStringCharacterClusterType type);
enum {
kCFCompareDiacriticsInsensitive = 128
};
enum {
kCFCompareIgnoreNonAlphanumeric = (1UL << 16), };
CF_EXPORT void _CFStringEncodingSetForceASCIICompatibility(Boolean flag);
extern void __CFSetCharToUniCharFunc(Boolean (*func)(UInt32 flags, UInt8 ch, UniChar *unicodeChar));
extern UniChar __CFCharToUniCharTable[256];
#if defined(CF_INLINE)
CF_INLINE const UniChar *CFStringGetCharactersPtrFromInlineBuffer(CFStringInlineBuffer *buf, CFRange desiredRange) {
if ((desiredRange.location < 0) || ((desiredRange.location + desiredRange.length) > buf->rangeToBuffer.length)) return NULL;
if (buf->directUniCharBuffer) {
return buf->directUniCharBuffer + buf->rangeToBuffer.location + desiredRange.location;
} else {
if (desiredRange.length > __kCFStringInlineBufferLength) return NULL;
if (((desiredRange.location + desiredRange.length) > buf->bufferedRangeEnd) || (desiredRange.location < buf->bufferedRangeStart)) {
buf->bufferedRangeStart = desiredRange.location;
buf->bufferedRangeEnd = buf->bufferedRangeStart + __kCFStringInlineBufferLength;
if (buf->bufferedRangeEnd > buf->rangeToBuffer.length) buf->bufferedRangeEnd = buf->rangeToBuffer.length;
CFIndex location = buf->rangeToBuffer.location + buf->bufferedRangeStart;
CFIndex length = buf->bufferedRangeEnd - buf->bufferedRangeStart;
if (buf->directCStringBuffer) {
UniChar *bufPtr = buf->buffer;
while (length--) *bufPtr++ = (UniChar)buf->directCStringBuffer[location++];
} else {
CFStringGetCharacters(buf->theString, CFRangeMake(location, length), buf->buffer);
}
}
return buf->buffer + (desiredRange.location - buf->bufferedRangeStart);
}
}
CF_INLINE void CFStringGetCharactersFromInlineBuffer(CFStringInlineBuffer *buf, CFRange desiredRange, UniChar *outBuf) {
if (buf->directUniCharBuffer) {
memmove(outBuf, buf->directUniCharBuffer + buf->rangeToBuffer.location + desiredRange.location, desiredRange.length * sizeof(UniChar));
} else {
if ((desiredRange.location >= buf->bufferedRangeStart) && (desiredRange.location < buf->bufferedRangeEnd)) {
CFIndex bufLen = desiredRange.length;
if (bufLen > (buf->bufferedRangeEnd - desiredRange.location)) bufLen = (buf->bufferedRangeEnd - desiredRange.location);
memmove(outBuf, buf->buffer + (desiredRange.location - buf->bufferedRangeStart), bufLen * sizeof(UniChar));
outBuf += bufLen; desiredRange.location += bufLen; desiredRange.length -= bufLen;
} else {
CFIndex desiredRangeMax = (desiredRange.location + desiredRange.length);
if ((desiredRangeMax > buf->bufferedRangeStart) && (desiredRangeMax < buf->bufferedRangeEnd)) {
desiredRange.length = (buf->bufferedRangeStart - desiredRange.location);
memmove(outBuf + desiredRange.length, buf->buffer, (desiredRangeMax - buf->bufferedRangeStart) * sizeof(UniChar));
}
}
if (desiredRange.length > 0) {
CFIndex location = buf->rangeToBuffer.location + desiredRange.location;
CFIndex length = desiredRange.length;
if (buf->directCStringBuffer) {
UniChar *bufPtr = outBuf;
while (length--) *bufPtr++ = (UniChar)buf->directCStringBuffer[location++];
} else {
CFStringGetCharacters(buf->theString, CFRangeMake(location, length), outBuf);
}
}
}
}
#else
#define CFStringGetCharactersPtrFromInlineBuffer(buf, desiredRange) ((buf)->directUniCharBuffer ? (buf)->directUniCharBuffer + (buf)->rangeToBuffer.location + desiredRange.location : NULL)
#define CFStringGetCharactersFromInlineBuffer(buf, desiredRange, outBuf) \
if (buf->directUniCharBuffer) memmove(outBuf, (buf)->directUniCharBuffer + (buf)->rangeToBuffer.location + desiredRange.location, desiredRange.length * sizeof(UniChar)); \
else CFStringGetCharacters((buf)->theString, CFRangeMake((buf)->rangeToBuffer.location + desiredRange.location, desiredRange.length), outBuf);
#endif
#if defined(CF_INLINE)
#ifndef __kCFStringAppendBufferLength
#define __kCFStringAppendBufferLength 1024
#endif
typedef struct {
UniChar buffer[__kCFStringAppendBufferLength];
CFIndex bufferIndex;
CFMutableStringRef theString;
} CFStringAppendBuffer;
CF_INLINE void CFStringInitAppendBuffer(CFAllocatorRef alloc, CFStringAppendBuffer *buf)
{
buf->bufferIndex = 0;
buf->theString = CFStringCreateMutable(alloc, 0);
}
CF_INLINE void CFStringAppendStringToAppendBuffer(CFStringAppendBuffer *buf, CFStringRef appendedString)
{
CFIndex numChars = CFStringGetLength(appendedString);
if ( numChars > __kCFStringAppendBufferLength ) {
if ( buf->bufferIndex ) {
CFStringAppendCharacters(buf->theString, buf->buffer, buf->bufferIndex);
buf->bufferIndex = 0;
}
CFStringAppend(buf->theString, appendedString);
}
else {
if ( (buf->bufferIndex + numChars) > __kCFStringAppendBufferLength ) {
CFStringAppendCharacters(buf->theString, buf->buffer, buf->bufferIndex);
buf->bufferIndex = 0;
}
CFStringGetCharacters(appendedString, CFRangeMake(0, numChars), &buf->buffer[buf->bufferIndex]);
buf->bufferIndex += numChars;
}
}
CF_INLINE void CFStringAppendCharactersToAppendBuffer(CFStringAppendBuffer *buf, const UniChar *chars, CFIndex numChars)
{
if ( numChars > __kCFStringAppendBufferLength ) {
if ( buf->bufferIndex ) {
CFStringAppendCharacters(buf->theString, buf->buffer, buf->bufferIndex);
buf->bufferIndex = 0;
}
CFStringAppendCharacters(buf->theString, chars, numChars);
}
else {
if ( (buf->bufferIndex + numChars) > __kCFStringAppendBufferLength ) {
CFStringAppendCharacters(buf->theString, buf->buffer, buf->bufferIndex);
buf->bufferIndex = 0;
}
memcpy(&buf->buffer[buf->bufferIndex], chars, numChars * sizeof(UniChar));
buf->bufferIndex += numChars;
}
}
CF_INLINE CFMutableStringRef CFStringCreateMutableWithAppendBuffer(CFStringAppendBuffer *buf)
{
if ( buf->bufferIndex ) {
CFStringAppendCharacters(buf->theString, buf->buffer, buf->bufferIndex);
buf->bufferIndex = 0;
}
CFMutableStringRef result = buf->theString;
buf->theString = NULL;
return ( result );
}
#endif
typedef struct {
CFCharacterSetRef cset;
uint32_t flags;
uint32_t rangeStart;
uint32_t rangeLimit;
const uint8_t *bitmap;
} CFCharacterSetInlineBuffer;
enum {
kCFCharacterSetIsCompactBitmap = (1UL << 0),
kCFCharacterSetNoBitmapAvailable = (1UL << 1),
kCFCharacterSetIsInverted = (1UL << 2)
};
CF_EXPORT
void CFCharacterSetInitInlineBuffer(CFCharacterSetRef cset, CFCharacterSetInlineBuffer *buffer);
#if defined(CF_INLINE)
CF_INLINE bool CFCharacterSetInlineBufferIsLongCharacterMember(CFCharacterSetInlineBuffer *buffer, UTF32Char character) {
bool isInverted = ((0 == (buffer->flags & kCFCharacterSetIsInverted)) ? false : true);
if ((character >= buffer->rangeStart) && (character < buffer->rangeLimit)) {
if ((character > 0xFFFF) || (0 != (buffer->flags & kCFCharacterSetNoBitmapAvailable))) return (CFCharacterSetIsLongCharacterMember(buffer->cset, character) != 0);
if (NULL == buffer->bitmap) {
if (0 == (buffer->flags & kCFCharacterSetIsCompactBitmap)) isInverted = !isInverted;
} else if (0 == (buffer->flags & kCFCharacterSetIsCompactBitmap)) {
if (buffer->bitmap[character >> 3] & (1UL << (character & 7))) isInverted = !isInverted;
} else {
uint8_t value = buffer->bitmap[character >> 8];
if (value == 0xFF) {
isInverted = !isInverted;
} else if (value > 0) {
const uint8_t *segment = buffer->bitmap + (256 + (32 * (value - 1)));
character &= 0xFF;
if (segment[character >> 3] & (1UL << (character % 8))) isInverted = !isInverted;
}
}
}
return isInverted;
}
#else
#define CFCharacterSetInlineBufferIsLongCharacterMember(buffer, character) (CFCharacterSetIsLongCharacterMember(buffer->cset, character))
#endif
#if TARGET_OS_WIN32
CF_EXPORT CFMutableStringRef _CFCreateApplicationRepositoryPath(CFAllocatorRef alloc, int nFolder);
#endif
CF_EXPORT CFTypeRef _CFTryRetain(CFTypeRef cf);
CF_EXPORT Boolean _CFIsDeallocating(CFTypeRef cf);
CF_EXPORT
Boolean CFLocaleGetLanguageRegionEncodingForLocaleIdentifier(CFStringRef localeIdentifier, LangCode *langCode, RegionCode *regCode, ScriptCode *scriptCode, CFStringEncoding *stringEncoding);
#if TARGET_OS_WIN32
CF_EXPORT CFMutableStringRef _CFCreateApplicationRepositoryPath(CFAllocatorRef alloc, int nFolder);
#endif
#if TARGET_OS_WIN32
#include <CoreFoundation/CFMessagePort.h>
#define CF_MESSAGE_PORT_CLONE_MESSAGE_ID -1209
CF_EXPORT CFMessagePortRef CFMessagePortCreateUber(CFAllocatorRef allocator, CFStringRef name, CFMessagePortCallBack callout, CFMessagePortContext *context, Boolean *shouldFreeInfo, Boolean isRemote);
CF_EXPORT void CFMessagePortSetCloneCallout(CFMessagePortRef ms, CFMessagePortCallBack cloneCallout);
#endif
#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE || TARGET_OS_LINUX)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)
#include <CoreFoundation/CFMessagePort.h>
CF_EXPORT CFMessagePortRef CFMessagePortCreatePerProcessLocal(CFAllocatorRef allocator, CFStringRef name, CFMessagePortCallBack callout, CFMessagePortContext *context, Boolean *shouldFreeInfo);
CF_EXPORT CFMessagePortRef CFMessagePortCreatePerProcessRemote(CFAllocatorRef allocator, CFStringRef name, CFIndex pid);
typedef CFDataRef (*CFMessagePortCallBackEx)(CFMessagePortRef local, SInt32 msgid, CFDataRef data, void *info, void *trailer, uintptr_t);
CF_EXPORT CFMessagePortRef _CFMessagePortCreateLocalEx(CFAllocatorRef allocator, CFStringRef name, Boolean perPID, uintptr_t unused, CFMessagePortCallBackEx callout2, CFMessagePortContext *context, Boolean *shouldFreeInfo);
#endif
#if TARGET_OS_MAC || TARGET_OS_EMBEDDED || TARGET_OS_IPHONE || TARGET_OS_LINUX
#include <pthread.h>
#else
#ifndef HAVE_STRUCT_TIMESPEC
#define HAVE_STRUCT_TIMESPEC 1
struct timespec { long tv_sec; long tv_nsec; };
#endif
#endif
CF_INLINE CFAbsoluteTime _CFAbsoluteTimeFromFileTimeSpec(struct timespec ts) {
return (CFAbsoluteTime)((CFTimeInterval)ts.tv_sec - kCFAbsoluteTimeIntervalSince1970) + (1.0e-9 * (CFTimeInterval)ts.tv_nsec);
}
CF_INLINE struct timespec _CFFileTimeSpecFromAbsoluteTime(CFAbsoluteTime at) {
struct timespec ts;
double sec = 0.0;
double frac = modf(at, &sec);
if (frac < 0.0) {
frac += 1.0;
sec -= 1.0;
}
#if TARGET_OS_WIN32
ts.tv_sec = (long)(sec + kCFAbsoluteTimeIntervalSince1970);
#else
ts.tv_sec = (time_t)(sec + kCFAbsoluteTimeIntervalSince1970);
#endif
ts.tv_nsec = (long)(1000000000UL * frac + 0.5);
return ts;
}
CF_EXPORT bool _CFPropertyListCreateSingleValue(CFAllocatorRef allocator, CFDataRef data, CFOptionFlags option, CFStringRef keyPath, CFPropertyListRef *value, CFErrorRef *error);
CF_EXPORT bool _CFPropertyListCreateFiltered(CFAllocatorRef allocator, CFDataRef data, CFOptionFlags option, CFSetRef keyPaths, CFPropertyListRef *value, CFErrorRef *error) CF_AVAILABLE(10_8, 6_0);
#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) || (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE) || TARGET_OS_WIN32
typedef CF_OPTIONS(CFOptionFlags, _CFBundleFilteredPlistOptions) {
_CFBundleFilteredPlistMemoryMapped = 1
} CF_ENUM_AVAILABLE(10_8, 6_0);
CF_EXPORT CFPropertyListRef _CFBundleCreateFilteredInfoPlist(CFBundleRef bundle, CFSetRef keyPaths, _CFBundleFilteredPlistOptions options) CF_AVAILABLE(10_8, 6_0);
CF_EXPORT CFPropertyListRef _CFBundleCreateFilteredLocalizedInfoPlist(CFBundleRef bundle, CFSetRef keyPaths, CFStringRef localizationName, _CFBundleFilteredPlistOptions options) CF_AVAILABLE(10_8, 6_0);
#endif
#if TARGET_OS_WIN32
#include <CoreFoundation/CFNotificationCenter.h>
CF_EXPORT CFStringRef _CFGetWindowsAppleAppDataDirectory(void);
CF_EXPORT CFArrayRef _CFGetWindowsBinaryDirectories(void);
CF_EXPORT CFStringRef _CFGetWindowsAppleSystemLibraryDirectory(void);
CF_EXPORT void _CFNotificationCenterSetRunLoop(CFNotificationCenterRef nc, CFRunLoopRef rl);
CF_EXPORT uint32_t _CFRunLoopGetWindowsMessageQueueMask(CFRunLoopRef rl, CFStringRef modeName);
CF_EXPORT void _CFRunLoopSetWindowsMessageQueueMask(CFRunLoopRef rl, uint32_t mask, CFStringRef modeName);
CF_EXPORT uint32_t _CFRunLoopGetWindowsThreadID(CFRunLoopRef rl);
typedef void (*CFWindowsMessageQueueHandler)(void);
CF_EXPORT CFWindowsMessageQueueHandler _CFRunLoopGetWindowsMessageQueueHandler(CFRunLoopRef rl, CFStringRef modeName);
CF_EXPORT void _CFRunLoopSetWindowsMessageQueueHandler(CFRunLoopRef rl, CFStringRef modeName, CFWindowsMessageQueueHandler func);
#endif
CF_EXPORT CFArrayRef CFDateFormatterCreateDateFormatsFromTemplates(CFAllocatorRef allocator, CFArrayRef tmplates, CFOptionFlags options, CFLocaleRef locale);
#if (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)
CF_EXPORT CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void);
#endif
CF_EXPORT const CFStringRef kCFNumberFormatterUsesCharacterDirection CF_AVAILABLE(10_9, 6_0); CF_EXPORT const CFStringRef kCFDateFormatterUsesCharacterDirection CF_AVAILABLE(10_9, 6_0);
CF_EXTERN_C_END
#endif