11cb0ef41Sopenharmony_ci/* Copyright libuv project contributors. All rights reserved.
21cb0ef41Sopenharmony_ci *
31cb0ef41Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a copy
41cb0ef41Sopenharmony_ci * of this software and associated documentation files (the "Software"), to
51cb0ef41Sopenharmony_ci * deal in the Software without restriction, including without limitation the
61cb0ef41Sopenharmony_ci * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
71cb0ef41Sopenharmony_ci * sell copies of the Software, and to permit persons to whom the Software is
81cb0ef41Sopenharmony_ci * furnished to do so, subject to the following conditions:
91cb0ef41Sopenharmony_ci *
101cb0ef41Sopenharmony_ci * The above copyright notice and this permission notice shall be included in
111cb0ef41Sopenharmony_ci * all copies or substantial portions of the Software.
121cb0ef41Sopenharmony_ci *
131cb0ef41Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
141cb0ef41Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
151cb0ef41Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
161cb0ef41Sopenharmony_ci * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
171cb0ef41Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
181cb0ef41Sopenharmony_ci * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
191cb0ef41Sopenharmony_ci * IN THE SOFTWARE.
201cb0ef41Sopenharmony_ci */
211cb0ef41Sopenharmony_ci
221cb0ef41Sopenharmony_ci#ifndef UV_DARWIN_STUB_H_
231cb0ef41Sopenharmony_ci#define UV_DARWIN_STUB_H_
241cb0ef41Sopenharmony_ci
251cb0ef41Sopenharmony_ci#include <stdint.h>
261cb0ef41Sopenharmony_ci
271cb0ef41Sopenharmony_cistruct CFArrayCallBacks;
281cb0ef41Sopenharmony_cistruct CFRunLoopSourceContext;
291cb0ef41Sopenharmony_cistruct FSEventStreamContext;
301cb0ef41Sopenharmony_cistruct CFRange;
311cb0ef41Sopenharmony_ci
321cb0ef41Sopenharmony_citypedef double CFAbsoluteTime;
331cb0ef41Sopenharmony_citypedef double CFTimeInterval;
341cb0ef41Sopenharmony_citypedef int FSEventStreamEventFlags;
351cb0ef41Sopenharmony_citypedef int OSStatus;
361cb0ef41Sopenharmony_citypedef long CFIndex;
371cb0ef41Sopenharmony_citypedef struct CFArrayCallBacks CFArrayCallBacks;
381cb0ef41Sopenharmony_citypedef struct CFRunLoopSourceContext CFRunLoopSourceContext;
391cb0ef41Sopenharmony_citypedef struct FSEventStreamContext FSEventStreamContext;
401cb0ef41Sopenharmony_citypedef uint32_t FSEventStreamCreateFlags;
411cb0ef41Sopenharmony_citypedef uint64_t FSEventStreamEventId;
421cb0ef41Sopenharmony_citypedef unsigned CFStringEncoding;
431cb0ef41Sopenharmony_citypedef void* CFAllocatorRef;
441cb0ef41Sopenharmony_citypedef void* CFArrayRef;
451cb0ef41Sopenharmony_citypedef void* CFBundleRef;
461cb0ef41Sopenharmony_citypedef void* CFDataRef;
471cb0ef41Sopenharmony_citypedef void* CFDictionaryRef;
481cb0ef41Sopenharmony_citypedef void* CFMutableDictionaryRef;
491cb0ef41Sopenharmony_citypedef struct CFRange CFRange;
501cb0ef41Sopenharmony_citypedef void* CFRunLoopRef;
511cb0ef41Sopenharmony_citypedef void* CFRunLoopSourceRef;
521cb0ef41Sopenharmony_citypedef void* CFStringRef;
531cb0ef41Sopenharmony_citypedef void* CFTypeRef;
541cb0ef41Sopenharmony_citypedef void* FSEventStreamRef;
551cb0ef41Sopenharmony_ci
561cb0ef41Sopenharmony_citypedef uint32_t IOOptionBits;
571cb0ef41Sopenharmony_citypedef unsigned int io_iterator_t;
581cb0ef41Sopenharmony_citypedef unsigned int io_object_t;
591cb0ef41Sopenharmony_citypedef unsigned int io_service_t;
601cb0ef41Sopenharmony_citypedef unsigned int io_registry_entry_t;
611cb0ef41Sopenharmony_ci
621cb0ef41Sopenharmony_ci
631cb0ef41Sopenharmony_citypedef void (*FSEventStreamCallback)(const FSEventStreamRef,
641cb0ef41Sopenharmony_ci                                      void*,
651cb0ef41Sopenharmony_ci                                      size_t,
661cb0ef41Sopenharmony_ci                                      void*,
671cb0ef41Sopenharmony_ci                                      const FSEventStreamEventFlags*,
681cb0ef41Sopenharmony_ci                                      const FSEventStreamEventId*);
691cb0ef41Sopenharmony_ci
701cb0ef41Sopenharmony_cistruct CFRunLoopSourceContext {
711cb0ef41Sopenharmony_ci  CFIndex version;
721cb0ef41Sopenharmony_ci  void* info;
731cb0ef41Sopenharmony_ci  void* pad[7];
741cb0ef41Sopenharmony_ci  void (*perform)(void*);
751cb0ef41Sopenharmony_ci};
761cb0ef41Sopenharmony_ci
771cb0ef41Sopenharmony_cistruct FSEventStreamContext {
781cb0ef41Sopenharmony_ci  CFIndex version;
791cb0ef41Sopenharmony_ci  void* info;
801cb0ef41Sopenharmony_ci  void* pad[3];
811cb0ef41Sopenharmony_ci};
821cb0ef41Sopenharmony_ci
831cb0ef41Sopenharmony_cistruct CFRange {
841cb0ef41Sopenharmony_ci  CFIndex location;
851cb0ef41Sopenharmony_ci  CFIndex length;
861cb0ef41Sopenharmony_ci};
871cb0ef41Sopenharmony_ci
881cb0ef41Sopenharmony_cistatic const CFStringEncoding kCFStringEncodingUTF8 = 0x8000100;
891cb0ef41Sopenharmony_cistatic const OSStatus noErr = 0;
901cb0ef41Sopenharmony_ci
911cb0ef41Sopenharmony_cistatic const FSEventStreamEventId kFSEventStreamEventIdSinceNow = -1;
921cb0ef41Sopenharmony_ci
931cb0ef41Sopenharmony_cistatic const int kFSEventStreamCreateFlagNoDefer = 2;
941cb0ef41Sopenharmony_cistatic const int kFSEventStreamCreateFlagFileEvents = 16;
951cb0ef41Sopenharmony_ci
961cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagEventIdsWrapped = 8;
971cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagHistoryDone = 16;
981cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagItemChangeOwner = 0x4000;
991cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagItemCreated = 0x100;
1001cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagItemFinderInfoMod = 0x2000;
1011cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagItemInodeMetaMod = 0x400;
1021cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagItemIsDir = 0x20000;
1031cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagItemModified = 0x1000;
1041cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagItemRemoved = 0x200;
1051cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagItemRenamed = 0x800;
1061cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagItemXattrMod = 0x8000;
1071cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagKernelDropped = 4;
1081cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagMount = 64;
1091cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagRootChanged = 32;
1101cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagUnmount = 128;
1111cb0ef41Sopenharmony_cistatic const int kFSEventStreamEventFlagUserDropped = 2;
1121cb0ef41Sopenharmony_ci
1131cb0ef41Sopenharmony_ci#endif  /* UV_DARWIN_STUB_H_ */
114