2 * Copyright (c) 2002-2008 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
25 #ifndef _DY_FRAMEWORK_H
26 #define _DY_FRAMEWORK_H
28 #include <Availability.h>
29 #include <TargetConditionals.h>
30 #include <sys/cdefs.h>
31 #include <mach/mach.h>
32 #include <CoreFoundation/CoreFoundation.h>
33 #include <IOKit/IOKitLib.h>
36 #include <Security/Security.h>
37 #endif // !TARGET_OS_IPHONE
42 #pragma mark IOKit.framework APIs
44 CFMutableDictionaryRef
46 mach_port_t masterPort
,
50 #define IOBSDNameMatching _IOBSDNameMatching
54 io_iterator_t iterator
56 #define IOIteratorNext _IOIteratorNext
60 mach_port_t bootstrapPort
,
61 mach_port_t
*masterPort
63 #define IOMasterPort _IOMasterPort
68 const io_name_t className
70 #define IOObjectConformsTo _IOObjectConformsTo
77 #define IOObjectGetClass _IOObjectGetClass
83 #define IOObjectRelease _IOObjectRelease
86 _IORegistryEntryCreateCFProperty (
87 io_registry_entry_t entry
,
89 CFAllocatorRef allocator
,
92 #define IORegistryEntryCreateCFProperty _IORegistryEntryCreateCFProperty
95 _IORegistryEntryCreateCFProperties (
96 io_registry_entry_t entry
,
97 CFMutableDictionaryRef
*properties
,
98 CFAllocatorRef allocator
,
101 #define IORegistryEntryCreateCFProperties _IORegistryEntryCreateCFProperties
104 _IORegistryEntryCreateIterator (
105 io_registry_entry_t entry
,
106 const io_name_t plane
,
107 IOOptionBits options
,
108 io_iterator_t
*iterator
110 #define IORegistryEntryCreateIterator _IORegistryEntryCreateIterator
113 _IORegistryEntryGetName (
114 io_registry_entry_t entry
,
117 #define IORegistryEntryGetName _IORegistryEntryGetName
120 _IORegistryEntryGetParentEntry (
121 io_registry_entry_t entry
,
122 const io_name_t plane
,
123 io_registry_entry_t
*parent
125 #define IORegistryEntryGetParentEntry _IORegistryEntryGetParentEntry
128 _IORegistryEntryGetPath (
129 io_registry_entry_t entry
,
130 const io_name_t plane
,
133 #define IORegistryEntryGetPath _IORegistryEntryGetPath
136 _IORegistryEntrySearchCFProperty (
137 io_registry_entry_t entry
,
138 const io_name_t plane
,
140 CFAllocatorRef allocator
,
143 #define IORegistryEntrySearchCFProperty _IORegistryEntrySearchCFProperty
146 _IOServiceGetMatchingServices (
147 mach_port_t masterPort
,
148 CFDictionaryRef matching
,
149 io_iterator_t
*existing
151 #define IOServiceGetMatchingServices _IOServiceGetMatchingServices
153 CFMutableDictionaryRef
157 #define IOServiceMatching _IOServiceMatching
160 #pragma mark Security.framework APIs
162 #if !TARGET_OS_IPHONE
165 _AuthorizationMakeExternalForm (
166 AuthorizationRef authorization
,
167 AuthorizationExternalForm
*extForm
169 #define AuthorizationMakeExternalForm _AuthorizationMakeExternalForm
172 _SecAccessCopySelectedACLList (
173 SecAccessRef accessRef
,
174 CSSM_ACL_AUTHORIZATION_TAG action
,
177 #define SecAccessCopySelectedACLList _SecAccessCopySelectedACLList
181 CFStringRef descriptor
,
182 CFArrayRef trustedlist
,
183 SecAccessRef
*accessRef
185 #define SecAccessCreate _SecAccessCreate
188 _SecAccessCreateFromOwnerAndACL (
189 const CSSM_ACL_OWNER_PROTOTYPE
*owner
,
191 const CSSM_ACL_ENTRY_INFO
*acls
,
192 SecAccessRef
*accessRef
194 #define SecAccessCreateFromOwnerAndACL _SecAccessCreateFromOwnerAndACL
197 _SecKeychainCopyDomainDefault (
198 SecPreferencesDomain domain
,
199 SecKeychainRef
*keychain
201 #define SecKeychainCopyDomainDefault _SecKeychainCopyDomainDefault
204 _SecKeychainGetPreferenceDomain (
205 SecPreferencesDomain
*domain
207 #define SecKeychainGetPreferenceDomain _SecKeychainGetPreferenceDomain
211 const char *pathName
,
212 SecKeychainRef
*keychain
214 #define SecKeychainOpen _SecKeychainOpen
217 _SecKeychainSetDomainDefault (
218 SecPreferencesDomain domain
,
219 SecKeychainRef keychain
221 #define SecKeychainSetDomainDefault _SecKeychainSetDomainDefault
224 _SecKeychainSetPreferenceDomain (
225 SecPreferencesDomain domain
227 #define SecKeychainSetPreferenceDomain _SecKeychainSetPreferenceDomain
230 _SecKeychainItemCopyContent (
231 SecKeychainItemRef itemRef
,
232 SecItemClass
*itemClass
,
233 SecKeychainAttributeList
*attrList
,
237 #define SecKeychainItemCopyContent _SecKeychainItemCopyContent
240 _SecKeychainItemCreateFromContent (
241 SecItemClass itemClass
,
242 SecKeychainAttributeList
*attrList
,
245 SecKeychainRef keychainRef
,
246 SecAccessRef initialAccess
,
247 SecKeychainItemRef
*itemRef
249 #define SecKeychainItemCreateFromContent _SecKeychainItemCreateFromContent
252 _SecKeychainItemDelete (
253 SecKeychainItemRef itemRef
255 #define SecKeychainItemDelete _SecKeychainItemDelete
258 _SecKeychainItemFreeContent (
259 SecKeychainAttributeList
*attrList
,
262 #define SecKeychainItemFreeContent _SecKeychainItemFreeContent
265 _SecKeychainItemModifyContent (
266 SecKeychainItemRef itemRef
,
267 const SecKeychainAttributeList
*attrList
,
271 #define SecKeychainItemModifyContent _SecKeychainItemModifyContent
274 _SecKeychainSearchCopyNext (
275 SecKeychainSearchRef searchRef
,
276 SecKeychainItemRef
*itemRef
278 #define SecKeychainSearchCopyNext _SecKeychainSearchCopyNext
281 _SecKeychainSearchCreateFromAttributes (
282 CFTypeRef keychainOrArray
,
283 SecItemClass itemClass
,
284 const SecKeychainAttributeList
*attrList
,
285 SecKeychainSearchRef
*searchRef
287 #define SecKeychainSearchCreateFromAttributes _SecKeychainSearchCreateFromAttributes
290 _SecTrustedApplicationCreateFromPath (
292 SecTrustedApplicationRef
*app
294 #define SecTrustedApplicationCreateFromPath _SecTrustedApplicationCreateFromPath
296 #endif // !TARGET_OS_IPHONE
300 #endif // _DY_FRAMEWORK_H