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