Something went wrong. Try again.
Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
11 kB · 410 lines
C
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411/* * Copyright (c) 2002-2008, 2010-2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */
#ifndef _DY_FRAMEWORK_H#define _DY_FRAMEWORK_H
#include <os/availability.h>#include <TargetConditionals.h>#include <sys/cdefs.h>#include <mach/mach.h>#include <CoreFoundation/CoreFoundation.h>#include <IOKit/IOKitLib.h>#if !TARGET_OS_IPHONE#include <IOKit/pwr_mgt/IOPMLibPrivate.h>#endif // !TARGET_OS_IPHONE#include <Security/Security.h>#include <Security/SecCertificatePriv.h>#include <Security/SecItem.h> // only needed for Mac OS X 10.6[.x]
__BEGIN_DECLS
#pragma mark -#pragma mark IOKit.framework APIs
CFMutableDictionaryRef_IOBSDNameMatching ( mach_port_t masterPort, uint32_t options, const char *bsdName );#define IOBSDNameMatching _IOBSDNameMatching
io_object_t_IOIteratorNext ( io_iterator_t iterator );#define IOIteratorNext _IOIteratorNext
kern_return_t_IOMasterPort ( mach_port_t bootstrapPort, mach_port_t *masterPort );#define IOMasterPort _IOMasterPort
boolean_t_IOObjectConformsTo ( io_object_t object, const io_name_t className );#define IOObjectConformsTo _IOObjectConformsTo
boolean_t_IOObjectGetClass ( io_object_t object, io_name_t className );#define IOObjectGetClass _IOObjectGetClass
kern_return_t_IOObjectRelease ( io_object_t object );#define IOObjectRelease _IOObjectRelease
#if !TARGET_OS_IPHONE
IOReturn_IOPMConnectionAcknowledgeEvent ( IOPMConnection myConnection, IOPMConnectionMessageToken token );#define IOPMConnectionAcknowledgeEvent _IOPMConnectionAcknowledgeEvent
IOReturn_IOPMConnectionCreate ( CFStringRef myName, IOPMCapabilityBits interests, IOPMConnection *newConnection );#define IOPMConnectionCreate _IOPMConnectionCreate
IOPMCapabilityBits_IOPMConnectionGetSystemCapabilities (void);#define IOPMConnectionGetSystemCapabilities _IOPMConnectionGetSystemCapabilities
IOReturn_IOPMConnectionRelease ( IOPMConnection myConnection );#define IOPMConnectionRelease _IOPMConnectionRelease
void_IOPMConnectionSetDispatchQueue ( IOPMConnection myConnection, dispatch_queue_t myQueue );#define IOPMConnectionSetDispatchQueue _IOPMConnectionSetDispatchQueue
IOReturn_IOPMConnectionSetNotification ( IOPMConnection myConnection, void *param, IOPMEventHandlerType handler );#define IOPMConnectionSetNotification _IOPMConnectionSetNotification
#endif // !TARGET_OS_IPHONE
CFTypeRef_IORegistryEntryCreateCFProperty ( io_registry_entry_t entry, CFStringRef key, CFAllocatorRef allocator, IOOptionBits options );#define IORegistryEntryCreateCFProperty _IORegistryEntryCreateCFProperty
kern_return_t_IORegistryEntryCreateCFProperties ( io_registry_entry_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, IOOptionBits options );#define IORegistryEntryCreateCFProperties _IORegistryEntryCreateCFProperties
kern_return_t_IORegistryEntryCreateIterator ( io_registry_entry_t entry, const io_name_t plane, IOOptionBits options, io_iterator_t *iterator );#define IORegistryEntryCreateIterator _IORegistryEntryCreateIterator
kern_return_t_IORegistryEntryGetLocationInPlane ( io_registry_entry_t entry, const io_name_t plane, io_name_t location );#define IORegistryEntryGetLocationInPlane _IORegistryEntryGetLocationInPlane
kern_return_t_IORegistryEntryGetName ( io_registry_entry_t entry, io_name_t name );#define IORegistryEntryGetName _IORegistryEntryGetName
kern_return_t_IORegistryEntryGetNameInPlane ( io_registry_entry_t entry, const io_name_t plane, io_name_t name );#define IORegistryEntryGetNameInPlane _IORegistryEntryGetNameInPlane
kern_return_t_IORegistryEntryGetParentEntry ( io_registry_entry_t entry, const io_name_t plane, io_registry_entry_t *parent );#define IORegistryEntryGetParentEntry _IORegistryEntryGetParentEntry
kern_return_t_IORegistryEntryGetPath ( io_registry_entry_t entry, const io_name_t plane, io_string_t path );#define IORegistryEntryGetPath _IORegistryEntryGetPath
kern_return_t_IORegistryEntryGetRegistryEntryID ( io_registry_entry_t entry, uint64_t *entryID );#define IORegistryEntryGetRegistryEntryID _IORegistryEntryGetRegistryEntryID
CFTypeRef_IORegistryEntrySearchCFProperty ( io_registry_entry_t entry, const io_name_t plane, CFStringRef key, CFAllocatorRef allocator, IOOptionBits options ) CF_RETURNS_RETAINED;#define IORegistryEntrySearchCFProperty _IORegistryEntrySearchCFProperty
kern_return_t_IOServiceGetMatchingServices ( mach_port_t masterPort, CFDictionaryRef matching, io_iterator_t *existing );#define IOServiceGetMatchingServices _IOServiceGetMatchingServices
CFMutableDictionaryRef_IOServiceMatching ( const char *name );#define IOServiceMatching _IOServiceMatching
#pragma mark -#pragma mark Security.framework APIs
#if !TARGET_OS_IPHONE
CFTypeRef _kSecAttrService(void);#define kSecAttrService _kSecAttrService()
CFTypeRef _kSecClass(void);#define kSecClass _kSecClass()
CFTypeRef _kSecClassGenericPassword(void);#define kSecClassGenericPassword _kSecClassGenericPassword()
CFTypeRef _kSecMatchLimit(void);#define kSecMatchLimit _kSecMatchLimit()
CFTypeRef _kSecMatchLimitAll(void);#define kSecMatchLimitAll _kSecMatchLimitAll()
CFTypeRef _kSecMatchSearchList(void);#define kSecMatchSearchList _kSecMatchSearchList()
CFTypeRef _kSecReturnRef(void);#define kSecReturnRef _kSecReturnRef()
CFTypeRef _kSecGuestAttributePid(void);#define kSecGuestAttributePid _kSecGuestAttributePid()
CFTypeRef _kSecCodeInfoIdentifier(void);#define kSecCodeInfoIdentifier _kSecCodeInfoIdentifier()
CFTypeRef _kSecCodeInfoUnique(void);#define kSecCodeInfoUnique _kSecCodeInfoUnique()
OSStatus_AuthorizationMakeExternalForm ( AuthorizationRef authorization, AuthorizationExternalForm *extForm );#define AuthorizationMakeExternalForm _AuthorizationMakeExternalForm
OSStatus_SecAccessCreate ( CFStringRef descriptor, CFArrayRef trustedlist, SecAccessRef *accessRef );#define SecAccessCreate _SecAccessCreate
#if (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)OSStatus_SecAccessCreateFromOwnerAndACL ( const CSSM_ACL_OWNER_PROTOTYPE *owner, uint32 aclCount, const CSSM_ACL_ENTRY_INFO *acls, SecAccessRef *accessRef );#define SecAccessCreateFromOwnerAndACL _SecAccessCreateFromOwnerAndACL#else // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)SecAccessRef_SecAccessCreateWithOwnerAndACL ( uid_t userId, gid_t groupId, SecAccessOwnerType ownerType, CFArrayRef acls, CFErrorRef *error );#define SecAccessCreateWithOwnerAndACL _SecAccessCreateWithOwnerAndACL#endif // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
OSStatus_SecItemCopyMatching ( CFDictionaryRef query, CFTypeRef *result );#define SecItemCopyMatching _SecItemCopyMatching
OSStatus_SecKeychainCopyDomainDefault ( SecPreferencesDomain domain, SecKeychainRef *keychain );#define SecKeychainCopyDomainDefault _SecKeychainCopyDomainDefault
OSStatus_SecKeychainOpen ( const char *pathName, SecKeychainRef *keychain );#define SecKeychainOpen _SecKeychainOpen
OSStatus_SecKeychainSetDomainDefault ( SecPreferencesDomain domain, SecKeychainRef keychain );#define SecKeychainSetDomainDefault _SecKeychainSetDomainDefault
OSStatus_SecKeychainItemCopyContent ( SecKeychainItemRef itemRef, SecItemClass *itemClass, SecKeychainAttributeList *attrList, UInt32 *length, void **outData );#define SecKeychainItemCopyContent _SecKeychainItemCopyContent
OSStatus_SecKeychainItemCreateFromContent ( SecItemClass itemClass, SecKeychainAttributeList *attrList, UInt32 length, const void *data, SecKeychainRef keychainRef, SecAccessRef initialAccess, SecKeychainItemRef *itemRef );#define SecKeychainItemCreateFromContent _SecKeychainItemCreateFromContent
OSStatus_SecKeychainItemDelete ( SecKeychainItemRef itemRef );#define SecKeychainItemDelete _SecKeychainItemDelete
OSStatus_SecKeychainItemFreeContent ( SecKeychainAttributeList *attrList, void *data );#define SecKeychainItemFreeContent _SecKeychainItemFreeContent
OSStatus_SecKeychainItemModifyContent ( SecKeychainItemRef itemRef, const SecKeychainAttributeList *attrList, UInt32 length, const void *data );#define SecKeychainItemModifyContent _SecKeychainItemModifyContent
OSStatus_SecTrustedApplicationCreateFromPath ( const char *path, SecTrustedApplicationRef *app );#define SecTrustedApplicationCreateFromPath _SecTrustedApplicationCreateFromPath
#else // TARGET_OS_IPHONE
CFStringRef _kSecPropertyKeyValue(void);#define kSecPropertyKeyValue _kSecPropertyKeyValue()
CFStringRef _kSecPropertyKeyLabel(void);#define kSecPropertyKeyLabel _kSecPropertyKeyLabel()
CFArrayRef_SecCertificateCopyProperties ( SecCertificateRef certRef );#define SecCertificateCopyProperties _SecCertificateCopyProperties
#endif // TARGET_OS_IPHONE
SecCertificateRef_SecCertificateCreateWithData ( CFAllocatorRef allocator, CFDataRef data );#define SecCertificateCreateWithData _SecCertificateCreateWithData
__END_DECLS
#endif // _DY_FRAMEWORK_H