Path: blob/master/Utilities/cmlibuv/src/unix/darwin-stub.h
3156 views
/* Copyright libuv project contributors. All rights reserved.1*2* Permission is hereby granted, free of charge, to any person obtaining a copy3* of this software and associated documentation files (the "Software"), to4* deal in the Software without restriction, including without limitation the5* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or6* sell copies of the Software, and to permit persons to whom the Software is7* furnished to do so, subject to the following conditions:8*9* The above copyright notice and this permission notice shall be included in10* all copies or substantial portions of the Software.11*12* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR13* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,14* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE15* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER16* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING17* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS18* IN THE SOFTWARE.19*/2021#ifndef UV_DARWIN_STUB_H_22#define UV_DARWIN_STUB_H_2324#include <stdint.h>2526struct CFArrayCallBacks;27struct CFRunLoopSourceContext;28struct FSEventStreamContext;29struct CFRange;3031typedef double CFAbsoluteTime;32typedef double CFTimeInterval;33typedef int FSEventStreamEventFlags;34typedef int OSStatus;35typedef long CFIndex;36typedef struct CFArrayCallBacks CFArrayCallBacks;37typedef struct CFRunLoopSourceContext CFRunLoopSourceContext;38typedef struct FSEventStreamContext FSEventStreamContext;39typedef uint32_t FSEventStreamCreateFlags;40typedef uint64_t FSEventStreamEventId;41typedef unsigned CFStringEncoding;42typedef void* CFAllocatorRef;43typedef void* CFArrayRef;44typedef void* CFBundleRef;45typedef void* CFDataRef;46typedef void* CFDictionaryRef;47typedef void* CFMutableDictionaryRef;48typedef struct CFRange CFRange;49typedef void* CFRunLoopRef;50typedef void* CFRunLoopSourceRef;51typedef void* CFStringRef;52typedef void* CFTypeRef;53typedef void* FSEventStreamRef;5455typedef uint32_t IOOptionBits;56typedef unsigned int io_iterator_t;57typedef unsigned int io_object_t;58typedef unsigned int io_service_t;59typedef unsigned int io_registry_entry_t;606162typedef void (*FSEventStreamCallback)(const FSEventStreamRef,63void*,64size_t,65void*,66const FSEventStreamEventFlags*,67const FSEventStreamEventId*);6869struct CFRunLoopSourceContext {70CFIndex version;71void* info;72void* pad[7];73void (*perform)(void*);74};7576struct FSEventStreamContext {77CFIndex version;78void* info;79void* pad[3];80};8182struct CFRange {83CFIndex location;84CFIndex length;85};8687static const CFStringEncoding kCFStringEncodingUTF8 = 0x8000100;88static const OSStatus noErr = 0;8990static const FSEventStreamEventId kFSEventStreamEventIdSinceNow = -1;9192static const int kFSEventStreamCreateFlagNoDefer = 2;93static const int kFSEventStreamCreateFlagFileEvents = 16;9495static const int kFSEventStreamEventFlagEventIdsWrapped = 8;96static const int kFSEventStreamEventFlagHistoryDone = 16;97static const int kFSEventStreamEventFlagItemChangeOwner = 0x4000;98static const int kFSEventStreamEventFlagItemCreated = 0x100;99static const int kFSEventStreamEventFlagItemFinderInfoMod = 0x2000;100static const int kFSEventStreamEventFlagItemInodeMetaMod = 0x400;101static const int kFSEventStreamEventFlagItemIsDir = 0x20000;102static const int kFSEventStreamEventFlagItemModified = 0x1000;103static const int kFSEventStreamEventFlagItemRemoved = 0x200;104static const int kFSEventStreamEventFlagItemRenamed = 0x800;105static const int kFSEventStreamEventFlagItemXattrMod = 0x8000;106static const int kFSEventStreamEventFlagKernelDropped = 4;107static const int kFSEventStreamEventFlagMount = 64;108static const int kFSEventStreamEventFlagRootChanged = 32;109static const int kFSEventStreamEventFlagUnmount = 128;110static const int kFSEventStreamEventFlagUserDropped = 2;111112#endif /* UV_DARWIN_STUB_H_ */113114115