this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at fixPythonPipStalling 131 lines 4.5 kB view raw
1/* 2 This file is part of Darling. 3 4 Copyright (C) 2019 Lubos Dolezel 5 6 Darling is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 Darling is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Darling. If not, see <http://www.gnu.org/licenses/>. 18*/ 19 20#ifndef _FSEVENTS_H 21#define _FSEVENTS_H 22#include <CoreFoundation/CoreFoundation.h> 23#include <sys/types.h> 24#include <Availability.h> 25 26typedef struct __FSEventStream* FSEventStreamRef; 27typedef const struct __FSEventStream* ConstFSEventStreamRef; 28 29typedef UInt32 FSEventStreamCreateFlags; 30typedef UInt64 FSEventStreamEventId; 31typedef UInt32 FSEventStreamEventFlags; 32 33enum { 34 kFSEventStreamEventFlagNone = 0, 35 kFSEventStreamEventFlagMustScanSubDirs = 1, 36 kFSEventStreamEventFlagUserDropped = 2, 37 kFSEventStreamEventFlagKernelDropped = 4, 38 kFSEventStreamEventFlagEventIdsWrapped = 8, 39 kFSEventStreamEventFlagHistoryDone = 0x10, 40 kFSEventStreamEventFlagRootChanged = 0x20, 41 kFSEventStreamEventFlagMount = 0x40, 42 kFSEventStreamEventFlagUnmount = 0x80, 43 kFSEventStreamEventFlagItemCreated = 0x100, 44 kFSEventStreamEventFlagItemRemoved = 0x200, 45 kFSEventStreamEventFlagItemInodeMetaMod = 0x400, 46 kFSEventStreamEventFlagItemRenamed = 0x800, 47 kFSEventStreamEventFlagItemModified = 0x1000, 48 kFSEventStreamEventFlagItemFinderInfoMod = 0x2000, 49 kFSEventStreamEventFlagItemChangeOwner = 0x4000, 50 kFSEventStreamEventFlagItemXattrMod = 0x8000, 51 kFSEventStreamEventFlagItemIsFile = 0x10000, 52 kFSEventStreamEventFlagItemIsDir = 0x20000, 53 kFSEventStreamEventFlagItemIsSymlink = 0x40000, 54 kFSEventStreamEventFlagOwnEvent = 0x80000, 55 kFSEventStreamEventFlagItemIsHardlink = 0x100000, 56 kFSEventStreamEventFlagItemIsLastHardlink = 0x200000, 57 kFSEventStreamEventFlagItemCloned = 0x400000, 58}; 59 60enum { 61 kFSEventStreamCreateFlagUseCFTypes = 1, 62 kFSEventStreamCreateFlagNoDefer = 2, 63 kFSEventStreamCreateFlagWatchRoot = 4, 64 kFSEventStreamCreateFlagIgnoreSelf = 8, 65 kFSEventStreamCreateFlagFileEvents = 0x10, 66 kFSEventStreamCreateFlagMarkSelf = 0x20, 67 kFSEventStreamCreateFlagUseExtendedData = 0x40, 68}; 69 70enum { 71 kFSEventStreamEventIdSinceNow = 0xFFFFFFFFFFFFFFFFULL, 72}; 73 74#define kFSEventStreamEventExtendedDataPathKey CFSTR("path") 75#define kFSEventStreamEventExtendedFileIDKey CFSTR("fileID") 76 77typedef CALLBACK_API_C(void, FSEventStreamCallback)( 78 ConstFSEventStreamRef streamRef, 79 void *clientCallBackInfo, 80 size_t numEvents, 81 void *eventPaths, 82 const FSEventStreamEventFlags *eventFlags, 83 const FSEventStreamEventId *eventIds); 84 85struct FSEventStreamContext { 86 CFIndex version; 87 void *info; 88 CFAllocatorRetainCallBack retain; 89 CFAllocatorReleaseCallBack release; 90 CFAllocatorCopyDescriptionCallBack copyDesc; 91}; 92typedef struct FSEventStreamContext FSEventStreamContext; 93 94extern FSEventStreamRef FSEventStreamCreate( 95 CFAllocatorRef allocator, 96 FSEventStreamCallback callback, 97 FSEventStreamContext *context, 98 CFArrayRef pathsToWatch, 99 FSEventStreamEventId sinceWhen, 100 CFTimeInterval latency, 101 FSEventStreamCreateFlags flags); 102 103extern FSEventStreamRef FSEventStreamCreateRelativeToDevice( 104 CFAllocatorRef allocator, 105 FSEventStreamCallback callback, 106 FSEventStreamContext *context, 107 dev_t deviceToWatch, 108 CFArrayRef pathsToWatchRelativeToDevice, 109 FSEventStreamEventId sinceWhen, 110 CFTimeInterval latency, 111 FSEventStreamCreateFlags flags); 112 113extern CF_RETURNS_RETAINED CFArrayRef FSEventStreamCopyPathsBeingWatched(ConstFSEventStreamRef streamRef); 114 115extern FSEventStreamEventId FSEventStreamGetLatestEventId(ConstFSEventStreamRef streamRef); 116 117extern void FSEventStreamInvalidate(FSEventStreamRef streamRef); 118 119extern void FSEventStreamRelease(FSEventStreamRef streamRef); 120 121extern void FSEventStreamRetain(FSEventStreamRef streamRef); 122 123extern void FSEventStreamScheduleWithRunLoop(FSEventStreamRef streamRef, CFRunLoopRef runLoop, CFStringRef runLoopMode); 124 125extern void FSEventStreamSetDispatchQueue(FSEventStreamRef streamRef, dispatch_queue_t q); 126 127extern Boolean FSEventStreamStart(FSEventStreamRef streamRef); 128 129extern void FSEventStreamStop(FSEventStreamRef streamRef); 130 131#endif