]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/dy_framework.h
configd-1109.60.2.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / dy_framework.h
1 /*
2 * Copyright (c) 2002-2008, 2010-2015, 2017, 2018 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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
11 * file.
12 *
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.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24
25 #ifndef _DY_FRAMEWORK_H
26 #define _DY_FRAMEWORK_H
27
28 #include <os/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>
34 #if !TARGET_OS_IPHONE
35 #include <IOKit/pwr_mgt/IOPMLibPrivate.h>
36 #endif // !TARGET_OS_IPHONE
37 #include <Security/Security.h>
38 #include <Security/SecCertificatePriv.h>
39 #include <Security/SecItem.h> // only needed for Mac OS X 10.6[.x]
40
41
42 __BEGIN_DECLS
43
44 #pragma mark -
45 #pragma mark IOKit.framework APIs
46
47 CFMutableDictionaryRef
48 _IOBSDNameMatching (
49 mach_port_t masterPort,
50 uint32_t options,
51 const char *bsdName
52 );
53 #define IOBSDNameMatching _IOBSDNameMatching
54
55 io_object_t
56 _IOIteratorNext (
57 io_iterator_t iterator
58 );
59 #define IOIteratorNext _IOIteratorNext
60
61 kern_return_t
62 _IOMasterPort (
63 mach_port_t bootstrapPort,
64 mach_port_t *masterPort
65 );
66 #define IOMasterPort _IOMasterPort
67
68 boolean_t
69 _IOObjectConformsTo (
70 io_object_t object,
71 const io_name_t className
72 );
73 #define IOObjectConformsTo _IOObjectConformsTo
74
75 boolean_t
76 _IOObjectGetClass (
77 io_object_t object,
78 io_name_t className
79 );
80 #define IOObjectGetClass _IOObjectGetClass
81
82 kern_return_t
83 _IOObjectRelease (
84 io_object_t object
85 );
86 #define IOObjectRelease _IOObjectRelease
87
88 #if !TARGET_OS_IPHONE
89
90 IOReturn
91 _IOPMConnectionAcknowledgeEvent (
92 IOPMConnection myConnection,
93 IOPMConnectionMessageToken token
94 );
95 #define IOPMConnectionAcknowledgeEvent _IOPMConnectionAcknowledgeEvent
96
97 IOReturn
98 _IOPMConnectionCreate (
99 CFStringRef myName,
100 IOPMCapabilityBits interests,
101 IOPMConnection *newConnection
102 );
103 #define IOPMConnectionCreate _IOPMConnectionCreate
104
105 IOPMCapabilityBits
106 _IOPMConnectionGetSystemCapabilities (void);
107 #define IOPMConnectionGetSystemCapabilities _IOPMConnectionGetSystemCapabilities
108
109 IOReturn
110 _IOPMConnectionRelease (
111 IOPMConnection myConnection
112 );
113 #define IOPMConnectionRelease _IOPMConnectionRelease
114
115 void
116 _IOPMConnectionSetDispatchQueue (
117 IOPMConnection myConnection,
118 dispatch_queue_t myQueue
119 );
120 #define IOPMConnectionSetDispatchQueue _IOPMConnectionSetDispatchQueue
121
122 IOReturn
123 _IOPMConnectionSetNotification (
124 IOPMConnection myConnection,
125 void *param,
126 IOPMEventHandlerType handler
127 );
128 #define IOPMConnectionSetNotification _IOPMConnectionSetNotification
129
130 #endif // !TARGET_OS_IPHONE
131
132 CFTypeRef
133 _IORegistryEntryCreateCFProperty (
134 io_registry_entry_t entry,
135 CFStringRef key,
136 CFAllocatorRef allocator,
137 IOOptionBits options
138 );
139 #define IORegistryEntryCreateCFProperty _IORegistryEntryCreateCFProperty
140
141 kern_return_t
142 _IORegistryEntryCreateCFProperties (
143 io_registry_entry_t entry,
144 CFMutableDictionaryRef *properties,
145 CFAllocatorRef allocator,
146 IOOptionBits options
147 );
148 #define IORegistryEntryCreateCFProperties _IORegistryEntryCreateCFProperties
149
150 kern_return_t
151 _IORegistryEntryCreateIterator (
152 io_registry_entry_t entry,
153 const io_name_t plane,
154 IOOptionBits options,
155 io_iterator_t *iterator
156 );
157 #define IORegistryEntryCreateIterator _IORegistryEntryCreateIterator
158
159 kern_return_t
160 _IORegistryEntryGetLocationInPlane (
161 io_registry_entry_t entry,
162 const io_name_t plane,
163 io_name_t location
164 );
165 #define IORegistryEntryGetLocationInPlane _IORegistryEntryGetLocationInPlane
166
167 kern_return_t
168 _IORegistryEntryGetName (
169 io_registry_entry_t entry,
170 io_name_t name
171 );
172 #define IORegistryEntryGetName _IORegistryEntryGetName
173
174 kern_return_t
175 _IORegistryEntryGetNameInPlane (
176 io_registry_entry_t entry,
177 const io_name_t plane,
178 io_name_t name
179 );
180 #define IORegistryEntryGetNameInPlane _IORegistryEntryGetNameInPlane
181
182 kern_return_t
183 _IORegistryEntryGetParentEntry (
184 io_registry_entry_t entry,
185 const io_name_t plane,
186 io_registry_entry_t *parent
187 );
188 #define IORegistryEntryGetParentEntry _IORegistryEntryGetParentEntry
189
190 kern_return_t
191 _IORegistryEntryGetPath (
192 io_registry_entry_t entry,
193 const io_name_t plane,
194 io_string_t path
195 );
196 #define IORegistryEntryGetPath _IORegistryEntryGetPath
197
198 kern_return_t
199 _IORegistryEntryGetRegistryEntryID (
200 io_registry_entry_t entry,
201 uint64_t *entryID
202 );
203 #define IORegistryEntryGetRegistryEntryID _IORegistryEntryGetRegistryEntryID
204
205 CFTypeRef
206 _IORegistryEntrySearchCFProperty (
207 io_registry_entry_t entry,
208 const io_name_t plane,
209 CFStringRef key,
210 CFAllocatorRef allocator,
211 IOOptionBits options
212 ) CF_RETURNS_RETAINED;
213 #define IORegistryEntrySearchCFProperty _IORegistryEntrySearchCFProperty
214
215 kern_return_t
216 _IOServiceGetMatchingServices (
217 mach_port_t masterPort,
218 CFDictionaryRef matching,
219 io_iterator_t *existing
220 );
221 #define IOServiceGetMatchingServices _IOServiceGetMatchingServices
222
223 CFMutableDictionaryRef
224 _IOServiceMatching (
225 const char *name
226 );
227 #define IOServiceMatching _IOServiceMatching
228
229 #pragma mark -
230 #pragma mark Security.framework APIs
231
232 #if !TARGET_OS_IPHONE
233
234 CFTypeRef _kSecAttrService(void);
235 #define kSecAttrService _kSecAttrService()
236
237 CFTypeRef _kSecClass(void);
238 #define kSecClass _kSecClass()
239
240 CFTypeRef _kSecClassGenericPassword(void);
241 #define kSecClassGenericPassword _kSecClassGenericPassword()
242
243 CFTypeRef _kSecMatchLimit(void);
244 #define kSecMatchLimit _kSecMatchLimit()
245
246 CFTypeRef _kSecMatchLimitAll(void);
247 #define kSecMatchLimitAll _kSecMatchLimitAll()
248
249 CFTypeRef _kSecMatchSearchList(void);
250 #define kSecMatchSearchList _kSecMatchSearchList()
251
252 CFTypeRef _kSecReturnRef(void);
253 #define kSecReturnRef _kSecReturnRef()
254
255 CFTypeRef _kSecGuestAttributePid(void);
256 #define kSecGuestAttributePid _kSecGuestAttributePid()
257
258 CFTypeRef _kSecCodeInfoIdentifier(void);
259 #define kSecCodeInfoIdentifier _kSecCodeInfoIdentifier()
260
261 CFTypeRef _kSecCodeInfoUnique(void);
262 #define kSecCodeInfoUnique _kSecCodeInfoUnique()
263
264 OSStatus
265 _AuthorizationMakeExternalForm (
266 AuthorizationRef authorization,
267 AuthorizationExternalForm *extForm
268 );
269 #define AuthorizationMakeExternalForm _AuthorizationMakeExternalForm
270
271 OSStatus
272 _SecAccessCreate (
273 CFStringRef descriptor,
274 CFArrayRef trustedlist,
275 SecAccessRef *accessRef
276 );
277 #define SecAccessCreate _SecAccessCreate
278
279 #if (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
280 OSStatus
281 _SecAccessCreateFromOwnerAndACL (
282 const CSSM_ACL_OWNER_PROTOTYPE *owner,
283 uint32 aclCount,
284 const CSSM_ACL_ENTRY_INFO *acls,
285 SecAccessRef *accessRef
286 );
287 #define SecAccessCreateFromOwnerAndACL _SecAccessCreateFromOwnerAndACL
288 #else // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
289 SecAccessRef
290 _SecAccessCreateWithOwnerAndACL (
291 uid_t userId,
292 gid_t groupId,
293 SecAccessOwnerType ownerType,
294 CFArrayRef acls,
295 CFErrorRef *error
296 );
297 #define SecAccessCreateWithOwnerAndACL _SecAccessCreateWithOwnerAndACL
298 #endif // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
299
300 OSStatus
301 _SecItemCopyMatching (
302 CFDictionaryRef query,
303 CFTypeRef *result
304 );
305 #define SecItemCopyMatching _SecItemCopyMatching
306
307 OSStatus
308 _SecKeychainCopyDomainDefault (
309 SecPreferencesDomain domain,
310 SecKeychainRef *keychain
311 );
312 #define SecKeychainCopyDomainDefault _SecKeychainCopyDomainDefault
313
314 OSStatus
315 _SecKeychainOpen (
316 const char *pathName,
317 SecKeychainRef *keychain
318 );
319 #define SecKeychainOpen _SecKeychainOpen
320
321 OSStatus
322 _SecKeychainSetDomainDefault (
323 SecPreferencesDomain domain,
324 SecKeychainRef keychain
325 );
326 #define SecKeychainSetDomainDefault _SecKeychainSetDomainDefault
327
328 OSStatus
329 _SecKeychainItemCopyContent (
330 SecKeychainItemRef itemRef,
331 SecItemClass *itemClass,
332 SecKeychainAttributeList *attrList,
333 UInt32 *length,
334 void **outData
335 );
336 #define SecKeychainItemCopyContent _SecKeychainItemCopyContent
337
338 OSStatus
339 _SecKeychainItemCreateFromContent (
340 SecItemClass itemClass,
341 SecKeychainAttributeList *attrList,
342 UInt32 length,
343 const void *data,
344 SecKeychainRef keychainRef,
345 SecAccessRef initialAccess,
346 SecKeychainItemRef *itemRef
347 );
348 #define SecKeychainItemCreateFromContent _SecKeychainItemCreateFromContent
349
350 OSStatus
351 _SecKeychainItemDelete (
352 SecKeychainItemRef itemRef
353 );
354 #define SecKeychainItemDelete _SecKeychainItemDelete
355
356 OSStatus
357 _SecKeychainItemFreeContent (
358 SecKeychainAttributeList *attrList,
359 void *data
360 );
361 #define SecKeychainItemFreeContent _SecKeychainItemFreeContent
362
363 OSStatus
364 _SecKeychainItemModifyContent (
365 SecKeychainItemRef itemRef,
366 const SecKeychainAttributeList *attrList,
367 UInt32 length,
368 const void *data
369 );
370 #define SecKeychainItemModifyContent _SecKeychainItemModifyContent
371
372
373 OSStatus
374 _SecTrustedApplicationCreateFromPath (
375 const char *path,
376 SecTrustedApplicationRef *app
377 );
378 #define SecTrustedApplicationCreateFromPath _SecTrustedApplicationCreateFromPath
379
380 #else // TARGET_OS_IPHONE
381
382 CFStringRef _kSecPropertyKeyValue(void);
383 #define kSecPropertyKeyValue _kSecPropertyKeyValue()
384
385 CFStringRef _kSecPropertyKeyLabel(void);
386 #define kSecPropertyKeyLabel _kSecPropertyKeyLabel()
387
388 CFArrayRef
389 _SecCertificateCopyProperties (
390 SecCertificateRef certRef
391 );
392 #define SecCertificateCopyProperties _SecCertificateCopyProperties
393
394 #endif // TARGET_OS_IPHONE
395
396 SecCertificateRef
397 _SecCertificateCreateWithData (
398 CFAllocatorRef allocator,
399 CFDataRef data
400 );
401 #define SecCertificateCreateWithData _SecCertificateCreateWithData
402
403
404
405
406
407 __END_DECLS
408
409 #endif // _DY_FRAMEWORK_H
410