this repo has no description
1
fork

Configure Feed

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

Add dummy DiskArbitration.framework

+609 -1
+3
etc/dylib.conf
··· 63 63 [VideoDecodeAcceleration.framework] 64 64 A=libVideoDecodeAcceleration.so 65 65 66 + [DiskArbitration.framework] 67 + A=libDiskArbitration.so 68 +
+1
src/CMakeLists.txt
··· 94 94 add_subdirectory(CoreServices) 95 95 add_subdirectory(ApplicationServices) 96 96 add_subdirectory(VideoDecodeAcceleration) 97 + add_subdirectory(DiskArbitration) 97 98 add_subdirectory(xar) 98 99 99 100 ######################
+40
src/DiskArbitration/CMakeLists.txt
··· 1 + project(DiskArbitration) 2 + 3 + cmake_minimum_required(VERSION 2.4.0) 4 + 5 + enable_language(C ASM) 6 + 7 + if(COMMAND cmake_policy) 8 + cmake_policy(SET CMP0003 NEW) 9 + endif(COMMAND cmake_policy) 10 + 11 + add_definitions(-D__APPLE__ -D__MACH__) 12 + add_definitions(-DTARGET_OS_MAC=1) 13 + add_definitions(-D__APPLE__ -D__DYNAMIC__) 14 + add_definitions(-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1080) 15 + 16 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -D__DARWIN_UNIX03 -fPIC -w") 17 + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map") 18 + 19 + SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${SUFFIX}/darling") 20 + SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 21 + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 22 + 23 + include_directories(${DARLING_TOP_DIRECTORY}/src/external/corefoundation/Headers) 24 + include_directories(${CMAKE_BINARY_DIR}/src/external/corefoundation/Headers) 25 + include_directories(${DARLING_TOP_DIRECTORY}/src/external/foundation/Headers) 26 + include_directories(${DARLING_TOP_DIRECTORY}/src/external/libobjc2) 27 + include_directories(${DARLING_TOP_DIRECTORY}/src/libc/include/FreeBSD) 28 + 29 + add_definitions(-DOBJC2RUNTIME=1) 30 + 31 + set(da_SRCS 32 + DADisk.c 33 + DADissenter.c 34 + DASession.c 35 + ) 36 + 37 + add_library(DiskArbitration SHARED ${da_SRCS}) 38 + target_link_libraries(DiskArbitration PRIVATE system CFF) 39 + 40 + install(TARGETS DiskArbitration DESTINATION lib${SUFFIX}/darling)
+178
src/DiskArbitration/DADisk.c
··· 1 + #include "DADisk.h" 2 + #include <stddef.h> 3 + #include <string.h> 4 + #include <CoreFoundation/CFRuntime.h> 5 + #include <CoreFoundation/CFBase.h> 6 + #include <CoreFoundation/CFURL.h> 7 + #include <CoreFoundation/CFDictionary.h> 8 + #include "../CFF/CFStringConst.h" 9 + 10 + CONST_STRING_DECL(kDADiskDescriptionVolumeKindKey, "kDADiskDescriptionVolumeKindKey"); 11 + CONST_STRING_DECL(kDADiskDescriptionVolumeMountableKey, "kDADiskDescriptionVolumeMountableKey"); 12 + CONST_STRING_DECL(kDADiskDescriptionVolumeNameKey, "kDADiskDescriptionVolumeNameKey"); 13 + CONST_STRING_DECL(kDADiskDescriptionVolumeNetworkKey, "kDADiskDescriptionVolumeNetworkKey"); 14 + CONST_STRING_DECL(kDADiskDescriptionVolumePathKey, "kDADiskDescriptionVolumePathKey"); 15 + CONST_STRING_DECL(kDADiskDescriptionVolumeUUIDKey, "kDADiskDescriptionVolumeUUIDKey"); 16 + 17 + CONST_STRING_DECL(kDADiskDescriptionMediaBlockSizeKey, "kDADiskDescriptionMediaBlockSizeKey"); 18 + CONST_STRING_DECL(kDADiskDescriptionMediaBSDMajorKey, "kDADiskDescriptionMediaBSDMajorKey"); 19 + CONST_STRING_DECL(kDADiskDescriptionMediaBSDMinorKey, "kDADiskDescriptionMediaBSDMinorKey"); 20 + CONST_STRING_DECL(kDADiskDescriptionMediaBSDNameKey, "kDADiskDescriptionMediaBSDNameKey"); 21 + CONST_STRING_DECL(kDADiskDescriptionMediaBSDUnitKey, "kDADiskDescriptionMediaBSDUnitKey"); 22 + CONST_STRING_DECL(kDADiskDescriptionMediaContentKey, "kDADiskDescriptionMediaContentKey"); 23 + CONST_STRING_DECL(kDADiskDescriptionMediaEjectableKey, "kDADiskDescriptionMediaEjectableKey"); 24 + CONST_STRING_DECL(kDADiskDescriptionMediaIconKey, "kDADiskDescriptionMediaIconKey"); 25 + CONST_STRING_DECL(kDADiskDescriptionMediaKindKey, "kDADiskDescriptionMediaKindKey"); 26 + CONST_STRING_DECL(kDADiskDescriptionMediaLeafKey, "kDADiskDescriptionMediaLeafKey"); 27 + CONST_STRING_DECL(kDADiskDescriptionMediaNameKey, "kDADiskDescriptionMediaNameKey"); 28 + CONST_STRING_DECL(kDADiskDescriptionMediaPathKey, "kDADiskDescriptionMediaPathKey"); 29 + CONST_STRING_DECL(kDADiskDescriptionMediaRemovableKey, "kDADiskDescriptionMediaRemovableKey"); 30 + CONST_STRING_DECL(kDADiskDescriptionMediaSizeKey, "kDADiskDescriptionMediaSizeKey"); 31 + CONST_STRING_DECL(kDADiskDescriptionMediaTypeKey, "kDADiskDescriptionMediaTypeKey"); 32 + CONST_STRING_DECL(kDADiskDescriptionMediaUUIDKey, "kDADiskDescriptionMediaUUIDKey"); 33 + CONST_STRING_DECL(kDADiskDescriptionMediaWholeKey, "kDADiskDescriptionMediaWholeKey"); 34 + CONST_STRING_DECL(kDADiskDescriptionMediaWritableKey, "kDADiskDescriptionMediaWritableKey"); 35 + 36 + CONST_STRING_DECL(kDADiskDescriptionDeviceGUIDKey, "kDADiskDescriptionDeviceGUIDKey"); 37 + CONST_STRING_DECL(kDADiskDescriptionDeviceInternalKey, "kDADiskDescriptionDeviceInternalKey"); 38 + CONST_STRING_DECL(kDADiskDescriptionDeviceModelKey, "kDADiskDescriptionDeviceModelKey"); 39 + CONST_STRING_DECL(kDADiskDescriptionDevicePathKey, "kDADiskDescriptionDevicePathKey"); 40 + CONST_STRING_DECL(kDADiskDescriptionDeviceProtocolKey, "kDADiskDescriptionDeviceProtocolKey"); 41 + CONST_STRING_DECL(kDADiskDescriptionDeviceRevisionKey, "kDADiskDescriptionDeviceRevisionKey"); 42 + CONST_STRING_DECL(kDADiskDescriptionDeviceUnitKey, "kDADiskDescriptionDeviceUnitKey"); 43 + CONST_STRING_DECL(kDADiskDescriptionDeviceVendorKey, "kDADiskDescriptionDeviceVendorKey"); 44 + 45 + CONST_STRING_DECL(kDADiskDescriptionBusNameKey, "kDADiskDescriptionBusNameKey"); 46 + CONST_STRING_DECL(kDADiskDescriptionBusPathKey, "kDADiskDescriptionBusPathKey"); 47 + 48 + struct _DADisk 49 + { 50 + CFRuntimeBase _parent; 51 + DASessionRef session; 52 + CFStringRef path; 53 + }; 54 + 55 + static CFTypeID _kDADiskTypeID = 0; 56 + static void DADiskFinalize(CFTypeRef cf); 57 + static Boolean DADiskEqual(CFTypeRef cf1, CFTypeRef cf2); 58 + static CFHashCode DADiskHash(CFTypeRef cf); 59 + static DADiskRef DADiskCreateCopy (CFAllocatorRef allocator, DADiskRef disk); 60 + 61 + static CFRuntimeClass DADiskClass = { 62 + 0, 63 + "DADisk", 64 + NULL, 65 + (CFTypeRef (*)(CFAllocatorRef, CFTypeRef)) DADiskCreateCopy, 66 + DADiskFinalize, 67 + DADiskEqual, 68 + DADiskHash, 69 + NULL, 70 + NULL 71 + }; 72 + 73 + __attribute__((constructor)) 74 + void 75 + DADiskInitialize (void) 76 + { 77 + _kDADiskTypeID = _CFRuntimeRegisterClass (&DADiskClass); 78 + } 79 + 80 + #define DADISK_SIZE sizeof(struct _DADisk) - sizeof(CFRuntimeBase) 81 + 82 + static void 83 + DADiskFinalize (CFTypeRef cf) 84 + { 85 + DADiskRef disk = (DADiskRef) cf; 86 + CFRelease(disk->session); 87 + CFRelease(disk->path); 88 + } 89 + 90 + static Boolean 91 + DADiskEqual (CFTypeRef cf1, CFTypeRef cf2) 92 + { 93 + DADiskRef d1 = (DADiskRef) cf1; 94 + DADiskRef d2 = (DADiskRef) cf2; 95 + return CFStringCompare(d1->path, d2->path, 0) == kCFCompareEqualTo; 96 + } 97 + 98 + static CFHashCode 99 + DADiskHash (CFTypeRef cf) 100 + { 101 + return CFHash(((DADiskRef) cf)->path); 102 + } 103 + 104 + static DADiskRef 105 + DADiskCreateCopy (CFAllocatorRef allocator, DADiskRef disk) 106 + { 107 + CFStringRef path; 108 + DADiskRef new; 109 + 110 + new = (DADiskRef) _CFRuntimeCreateInstance (allocator, _kDADiskTypeID, 111 + DADISK_SIZE, 0); 112 + new->path = (CFStringRef) CFRetain(disk->path); 113 + new->session = (DASessionRef) CFRetain(disk->session); 114 + 115 + return new; 116 + } 117 + 118 + CFTypeID DADiskGetTypeID(void) 119 + { 120 + return _kDADiskTypeID; 121 + } 122 + 123 + DADiskRef DADiskCreateFromBSDName(CFAllocatorRef allocator, 124 + DASessionRef session, const char* name) 125 + { 126 + CFStringRef path; 127 + DADiskRef new; 128 + 129 + path = CFStringCreateWithCString(allocator, name, kCFStringEncodingUTF8); 130 + 131 + new = (DADiskRef) _CFRuntimeCreateInstance (allocator, _kDADiskTypeID, 132 + DADISK_SIZE, 0); 133 + new->path = path; 134 + new->session = (DASessionRef) CFRetain(session); 135 + 136 + return new; 137 + } 138 + 139 + DADiskRef DADiskCreateFromIOMedia(CFAllocatorRef allocator, 140 + DASessionRef session, io_service_t media) 141 + { 142 + return DADiskCreateFromBSDName(allocator, session, "/dummy"); 143 + } 144 + 145 + DADiskRef DADiskCreateFromVolumePath(CFAllocatorRef allocator, 146 + DASessionRef session, CFURLRef url) 147 + { 148 + CFStringRef path; 149 + DADiskRef new; 150 + 151 + new = (DADiskRef) _CFRuntimeCreateInstance (allocator, _kDADiskTypeID, 152 + DADISK_SIZE, 0); 153 + new->path = (CFStringRef) CFRetain(CFURLGetString(url)); 154 + new->session = (DASessionRef) CFRetain(session); 155 + 156 + return new; 157 + } 158 + 159 + const char* DADiskGetBSDName(DADiskRef disk) 160 + { 161 + return disk->path; 162 + } 163 + 164 + io_service_t DADiskCopyIOMedia(DADiskRef disk) 165 + { 166 + return 0; 167 + } 168 + 169 + CFDictionaryRef DADiskCopyDescription(DADiskRef disk) 170 + { 171 + return CFDictionaryCreate(NULL, NULL, NULL, 0, 172 + &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); 173 + } 174 + 175 + DADiskRef DADiskCopyWholeDisk(DADiskRef disk) 176 + { 177 + return (DADiskRef) CFRetain(disk); 178 + }
+68
src/DiskArbitration/DADisk.h
··· 1 + #ifndef _DADISK_H_ 2 + #define _DADISK_H_ 3 + 4 + #include <CoreFoundation/CoreFoundation.h> 5 + #include "DASession.h" 6 + 7 + #ifdef __cplusplus 8 + extern "C" { 9 + #endif /* __cplusplus */ 10 + 11 + extern const CFStringRef kDADiskDescriptionVolumeKindKey; 12 + extern const CFStringRef kDADiskDescriptionVolumeMountableKey; 13 + extern const CFStringRef kDADiskDescriptionVolumeNameKey; 14 + extern const CFStringRef kDADiskDescriptionVolumeNetworkKey; 15 + extern const CFStringRef kDADiskDescriptionVolumePathKey; 16 + extern const CFStringRef kDADiskDescriptionVolumeUUIDKey; 17 + 18 + extern const CFStringRef kDADiskDescriptionMediaBlockSizeKey; 19 + extern const CFStringRef kDADiskDescriptionMediaBSDMajorKey; 20 + extern const CFStringRef kDADiskDescriptionMediaBSDMinorKey; 21 + extern const CFStringRef kDADiskDescriptionMediaBSDNameKey; 22 + extern const CFStringRef kDADiskDescriptionMediaBSDUnitKey; 23 + extern const CFStringRef kDADiskDescriptionMediaContentKey; 24 + extern const CFStringRef kDADiskDescriptionMediaEjectableKey; 25 + extern const CFStringRef kDADiskDescriptionMediaIconKey; 26 + extern const CFStringRef kDADiskDescriptionMediaKindKey; 27 + extern const CFStringRef kDADiskDescriptionMediaLeafKey; 28 + extern const CFStringRef kDADiskDescriptionMediaNameKey; 29 + extern const CFStringRef kDADiskDescriptionMediaPathKey; 30 + extern const CFStringRef kDADiskDescriptionMediaRemovableKey; 31 + extern const CFStringRef kDADiskDescriptionMediaSizeKey; 32 + extern const CFStringRef kDADiskDescriptionMediaTypeKey; 33 + extern const CFStringRef kDADiskDescriptionMediaUUIDKey; 34 + extern const CFStringRef kDADiskDescriptionMediaWholeKey; 35 + extern const CFStringRef kDADiskDescriptionMediaWritableKey; 36 + 37 + extern const CFStringRef kDADiskDescriptionDeviceGUIDKey; 38 + extern const CFStringRef kDADiskDescriptionDeviceInternalKey; 39 + extern const CFStringRef kDADiskDescriptionDeviceModelKey; 40 + extern const CFStringRef kDADiskDescriptionDevicePathKey; 41 + extern const CFStringRef kDADiskDescriptionDeviceProtocolKey; 42 + extern const CFStringRef kDADiskDescriptionDeviceRevisionKey; 43 + extern const CFStringRef kDADiskDescriptionDeviceUnitKey; 44 + extern const CFStringRef kDADiskDescriptionDeviceVendorKey; 45 + 46 + extern const CFStringRef kDADiskDescriptionBusNameKey; 47 + extern const CFStringRef kDADiskDescriptionBusPathKey; 48 + 49 + struct _DADisk; 50 + typedef struct _DADisk* DADiskRef; 51 + 52 + typedef int io_service_t; // hack 53 + 54 + CFTypeID DADiskGetTypeID(void); 55 + 56 + DADiskRef DADiskCreateFromBSDName(CFAllocatorRef allocator, DASessionRef session, const char* name); 57 + DADiskRef DADiskCreateFromIOMedia(CFAllocatorRef allocator, DASessionRef session, io_service_t media); 58 + DADiskRef DADiskCreateFromVolumePath(CFAllocatorRef allocator, DASessionRef session, CFURLRef path); 59 + const char* DADiskGetBSDName(DADiskRef disk); 60 + io_service_t DADiskCopyIOMedia(DADiskRef disk); 61 + CFDictionaryRef DADiskCopyDescription(DADiskRef disk); 62 + DADiskRef DADiskCopyWholeDisk(DADiskRef disk); 63 + 64 + #ifdef __cplusplus 65 + } 66 + #endif /* __cplusplus */ 67 + 68 + #endif
+84
src/DiskArbitration/DADissenter.c
··· 1 + #include "DADissenter.h" 2 + #include <CoreFoundation/CFRuntime.h> 3 + 4 + struct _DADissenter 5 + { 6 + CFRuntimeBase _parent; 7 + const CFArrayCallBacks *_callBacks; 8 + }; 9 + 10 + static CFTypeID _kDADissenterTypeID = 0; 11 + static void DADissenterFinalize(CFTypeRef cf); 12 + static Boolean DADissenterEqual(CFTypeRef cf1, CFTypeRef cf2); 13 + static CFHashCode DADissenterHash(CFTypeRef cf); 14 + static DADissenterRef DADissenterCreateCopy (CFAllocatorRef allocator, DADissenterRef disk); 15 + 16 + static CFRuntimeClass DADissenterClass = { 17 + 0, 18 + "DADissenter", 19 + NULL, 20 + (CFTypeRef (*)(CFAllocatorRef, CFTypeRef)) DADissenterCreateCopy, 21 + DADissenterFinalize, 22 + DADissenterEqual, 23 + DADissenterHash, 24 + NULL, 25 + NULL 26 + }; 27 + 28 + __attribute__((constructor)) 29 + void 30 + DADissenterInitialize (void) 31 + { 32 + _kDADissenterTypeID = _CFRuntimeRegisterClass (&DADissenterClass); 33 + } 34 + 35 + #define DADISSENTER_SIZE sizeof(struct _DADissenter) - sizeof(CFRuntimeBase) 36 + 37 + static void 38 + DADissenterFinalize (CFTypeRef cf) 39 + { 40 + } 41 + 42 + static Boolean 43 + DADissenterEqual (CFTypeRef cf1, CFTypeRef cf2) 44 + { 45 + return 0; 46 + } 47 + 48 + static CFHashCode 49 + DADissenterHash (CFTypeRef cf) 50 + { 51 + return 0; 52 + } 53 + 54 + static DADissenterRef 55 + DADissenterCreateCopy (CFAllocatorRef allocator, DADissenterRef disk) 56 + { 57 + return (DADissenterRef) CFRetain(disk); 58 + } 59 + 60 + CFTypeID DADissenterGetTypeID(void) 61 + { 62 + return _kDADissenterTypeID; 63 + } 64 + 65 + DADissenterRef DADissenterCreate(CFAllocatorRef allocator, DAReturn status, CFStringRef string) 66 + { 67 + DADissenterRef new; 68 + 69 + new = (DADissenterRef) _CFRuntimeCreateInstance (allocator, 70 + _kDADissenterTypeID, 71 + DADISSENTER_SIZE, 0); 72 + 73 + return new; 74 + } 75 + 76 + DAReturn DADissenterGetStatus(DADissenterRef dissenter) 77 + { 78 + return 0; 79 + } 80 + 81 + CFStringRef DADissenterGetStatusString(DADissenterRef dissenter) 82 + { 83 + return CFSTR("dummy"); 84 + }
+22
src/DiskArbitration/DADissenter.h
··· 1 + #ifndef DADISSENTER_H 2 + #define DADISSENTER_H 3 + #include <CoreFoundation/CoreFoundation.h> 4 + 5 + #ifdef __cplusplus 6 + extern "C" { 7 + #endif 8 + 9 + typedef int DAReturn; 10 + 11 + typedef struct _DADissenter* DADissenterRef; 12 + 13 + DADissenterRef DADissenterCreate(CFAllocatorRef allocator, DAReturn status, CFStringRef string); 14 + DAReturn DADissenterGetStatus(DADissenterRef dissenter); 15 + CFStringRef DADissenterGetStatusString(DADissenterRef dissenter); 16 + 17 + #ifdef __cplusplus 18 + } 19 + #endif 20 + 21 + #endif /* DADISSENTER_H */ 22 +
+177
src/DiskArbitration/DASession.c
··· 1 + #include "DASession.h" 2 + #include <stddef.h> 3 + #include <string.h> 4 + #include <CoreFoundation/CFRuntime.h> 5 + #include <CoreFoundation/CFBase.h> 6 + 7 + struct _DASession 8 + { 9 + CFRuntimeBase _parent; 10 + const CFArrayCallBacks *_callBacks; 11 + }; 12 + 13 + static CFTypeID _kDASessionTypeID = 0; 14 + static void DASessionFinalize(CFTypeRef cf); 15 + static Boolean DASessionEqual(CFTypeRef cf1, CFTypeRef cf2); 16 + static CFHashCode DASessionHash(CFTypeRef cf); 17 + static DASessionRef DASessionCreateCopy (CFAllocatorRef allocator, DASessionRef disk); 18 + 19 + static CFRuntimeClass DASessionClass = { 20 + 0, 21 + "DASession", 22 + NULL, 23 + (CFTypeRef (*)(CFAllocatorRef, CFTypeRef)) DASessionCreateCopy, 24 + DASessionFinalize, 25 + DASessionEqual, 26 + DASessionHash, 27 + NULL, 28 + NULL 29 + }; 30 + 31 + __attribute__((constructor)) 32 + void 33 + DASessionInitialize (void) 34 + { 35 + _kDASessionTypeID = _CFRuntimeRegisterClass (&DASessionClass); 36 + } 37 + 38 + #define DASESSION_SIZE sizeof(struct _DASession) - sizeof(CFRuntimeBase) 39 + 40 + static void 41 + DASessionFinalize (CFTypeRef cf) 42 + { 43 + } 44 + 45 + static Boolean 46 + DASessionEqual (CFTypeRef cf1, CFTypeRef cf2) 47 + { 48 + return 0; 49 + } 50 + 51 + static CFHashCode 52 + DASessionHash (CFTypeRef cf) 53 + { 54 + return 0; 55 + } 56 + 57 + static DASessionRef 58 + DASessionCreateCopy (CFAllocatorRef allocator, DASessionRef disk) 59 + { 60 + return (DASessionRef) CFRetain(disk); 61 + } 62 + 63 + CFTypeID DASessionGetTypeID(void) 64 + { 65 + return _kDASessionTypeID; 66 + } 67 + 68 + DASessionRef DASessionCreate(CFAllocatorRef allocator) 69 + { 70 + DASessionRef new; 71 + 72 + new = (DASessionRef) _CFRuntimeCreateInstance (allocator, _kDASessionTypeID, 73 + DASESSION_SIZE, 0); 74 + 75 + return new; 76 + } 77 + 78 + void DASessionScheduleWithRunLoop(DASessionRef session, 79 + CFRunLoopRef runLoop, CFStringRef runLoopMode) 80 + { 81 + 82 + } 83 + 84 + void DASessionUnscheduleFromRunLoop(DASessionRef session, 85 + CFRunLoopRef runLoop, CFStringRef runLoopMode) 86 + { 87 + 88 + } 89 + 90 + void DASessionSetDispatchQueue(DASessionRef session, dispatch_queue_t queue) 91 + { 92 + 93 + } 94 + 95 + struct _DAApprovalSession 96 + { 97 + CFRuntimeBase _parent; 98 + const CFArrayCallBacks *_callBacks; 99 + }; 100 + 101 + static CFTypeID _kDAApprovalSessionTypeID = 0; 102 + static void DAApprovalSessionFinalize(CFTypeRef cf); 103 + static Boolean DAApprovalSessionEqual(CFTypeRef cf1, CFTypeRef cf2); 104 + static CFHashCode DAApprovalSessionHash(CFTypeRef cf); 105 + static DAApprovalSessionRef DAApprovalSessionCreateCopy (CFAllocatorRef allocator, DAApprovalSessionRef disk); 106 + 107 + static CFRuntimeClass DAApprovalSessionClass = { 108 + 0, 109 + "DAApprovalSession", 110 + NULL, 111 + (CFTypeRef (*)(CFAllocatorRef, CFTypeRef)) DAApprovalSessionCreateCopy, 112 + DAApprovalSessionFinalize, 113 + DAApprovalSessionEqual, 114 + DAApprovalSessionHash, 115 + NULL, 116 + NULL 117 + }; 118 + 119 + __attribute__((constructor)) 120 + void 121 + DAApprovalSessionInitialize (void) 122 + { 123 + _kDAApprovalSessionTypeID = _CFRuntimeRegisterClass (&DAApprovalSessionClass); 124 + } 125 + 126 + #define DAAPPROVALSESSION_SIZE sizeof(struct _DAApprovalSession) - sizeof(CFRuntimeBase) 127 + 128 + static void 129 + DAApprovalSessionFinalize (CFTypeRef cf) 130 + { 131 + } 132 + 133 + static Boolean 134 + DAApprovalSessionEqual (CFTypeRef cf1, CFTypeRef cf2) 135 + { 136 + return 0; 137 + } 138 + 139 + static CFHashCode 140 + DAApprovalSessionHash (CFTypeRef cf) 141 + { 142 + return 0; 143 + } 144 + 145 + static DAApprovalSessionRef 146 + DAApprovalSessionCreateCopy (CFAllocatorRef allocator, DAApprovalSessionRef disk) 147 + { 148 + return (DAApprovalSessionRef) CFRetain(disk); 149 + } 150 + 151 + CFTypeID DAApprovalSessionGetTypeID(void) 152 + { 153 + return _kDAApprovalSessionTypeID; 154 + } 155 + 156 + DAApprovalSessionRef DAApprovalSessionCreate(CFAllocatorRef allocator) 157 + { 158 + DAApprovalSessionRef new; 159 + 160 + new = (DAApprovalSessionRef) _CFRuntimeCreateInstance (allocator, 161 + _kDAApprovalSessionTypeID, 162 + DAAPPROVALSESSION_SIZE, 0); 163 + 164 + return new; 165 + } 166 + 167 + void DAApprovalSessionScheduleWithRunLoop(DAApprovalSessionRef session, 168 + CFRunLoopRef runLoop, CFStringRef runLoopMode) 169 + { 170 + 171 + } 172 + 173 + void DAApprovalSessionUnscheduleFromRunLoop(DAApprovalSessionRef session, 174 + CFRunLoopRef runLoop, CFStringRef runLoopMode) 175 + { 176 + 177 + }
+31
src/DiskArbitration/DASession.h
··· 1 + #ifndef DASESSION_H 2 + #define DASESSION_H 3 + #include <CoreFoundation/CoreFoundation.h> 4 + 5 + #ifdef __cplusplus 6 + extern "C" { 7 + #endif 8 + 9 + typedef struct _DASession * DASessionRef; 10 + 11 + typedef void* dispatch_queue_t; // hack 12 + 13 + CFTypeID DASessionGetTypeID(void); 14 + DASessionRef DASessionCreate(CFAllocatorRef allocator); 15 + void DASessionScheduleWithRunLoop(DASessionRef session, CFRunLoopRef runLoop, CFStringRef runLoopMode); 16 + void DASessionUnscheduleFromRunLoop(DASessionRef session, CFRunLoopRef runLoop, CFStringRef runLoopMode); 17 + void DASessionSetDispatchQueue(DASessionRef session, dispatch_queue_t queue); 18 + 19 + typedef struct _DAApprovalSession * DAApprovalSessionRef; 20 + 21 + CFTypeID DAApprovalSessionGetTypeID(void); 22 + DAApprovalSessionRef DAApprovalSessionCreate(CFAllocatorRef allocator); 23 + void DAApprovalSessionScheduleWithRunLoop(DAApprovalSessionRef session, CFRunLoopRef runLoop, CFStringRef runLoopMode); 24 + void DAApprovalSessionUnscheduleFromRunLoop(DAApprovalSessionRef session, CFRunLoopRef runLoop, CFStringRef runLoopMode); 25 + 26 + #ifdef __cplusplus 27 + } 28 + #endif 29 + 30 + #endif /* DASESSION_H */ 31 +
+4
src/DiskArbitration/README
··· 1 + This is a completely dummy implementation. 2 + 3 + One could implement some of this functionality by wrapping polkit, udisks, etc. 4 +
+1 -1
src/VideoDecodeAcceleration/CMakeLists.txt
··· 33 33 ) 34 34 35 35 add_library(VideoDecodeAcceleration SHARED ${vda_SRCS}) 36 - target_link_libraries(VideoDecodeAcceleration PRIVATE system) 36 + target_link_libraries(VideoDecodeAcceleration PRIVATE system CFF) 37 37 38 38 install(TARGETS VideoDecodeAcceleration DESTINATION lib${SUFFIX}/darling)