]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/dy_framework.h
configd-453.18.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / dy_framework.h
1 /*
2 * Copyright (c) 2002-2008, 2010-2012 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 OSStatus
208 _AuthorizationMakeExternalForm (
209 AuthorizationRef authorization,
210 AuthorizationExternalForm *extForm
211 );
212 #define AuthorizationMakeExternalForm _AuthorizationMakeExternalForm
213
214 OSStatus
215 _SecAccessCreate (
216 CFStringRef descriptor,
217 CFArrayRef trustedlist,
218 SecAccessRef *accessRef
219 );
220 #define SecAccessCreate _SecAccessCreate
221
222 #if (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
223 OSStatus
224 _SecAccessCreateFromOwnerAndACL (
225 const CSSM_ACL_OWNER_PROTOTYPE *owner,
226 uint32 aclCount,
227 const CSSM_ACL_ENTRY_INFO *acls,
228 SecAccessRef *accessRef
229 );
230 #define SecAccessCreateFromOwnerAndACL _SecAccessCreateFromOwnerAndACL
231 #else // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
232 SecAccessRef
233 _SecAccessCreateWithOwnerAndACL (
234 uid_t userId,
235 gid_t groupId,
236 SecAccessOwnerType ownerType,
237 CFArrayRef acls,
238 CFErrorRef *error
239 );
240 #define SecAccessCreateWithOwnerAndACL _SecAccessCreateWithOwnerAndACL
241 #endif // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
242
243 OSStatus
244 _SecItemCopyMatching (
245 CFDictionaryRef query,
246 CFTypeRef *result
247 );
248 #define SecItemCopyMatching _SecItemCopyMatching
249
250 OSStatus
251 _SecKeychainCopyDomainDefault (
252 SecPreferencesDomain domain,
253 SecKeychainRef *keychain
254 );
255 #define SecKeychainCopyDomainDefault _SecKeychainCopyDomainDefault
256
257 OSStatus
258 _SecKeychainGetPreferenceDomain (
259 SecPreferencesDomain *domain
260 );
261 #define SecKeychainGetPreferenceDomain _SecKeychainGetPreferenceDomain
262
263 OSStatus
264 _SecKeychainOpen (
265 const char *pathName,
266 SecKeychainRef *keychain
267 );
268 #define SecKeychainOpen _SecKeychainOpen
269
270 OSStatus
271 _SecKeychainSetDomainDefault (
272 SecPreferencesDomain domain,
273 SecKeychainRef keychain
274 );
275 #define SecKeychainSetDomainDefault _SecKeychainSetDomainDefault
276
277 OSStatus
278 _SecKeychainSetPreferenceDomain (
279 SecPreferencesDomain domain
280 );
281 #define SecKeychainSetPreferenceDomain _SecKeychainSetPreferenceDomain
282
283 OSStatus
284 _SecKeychainItemCopyContent (
285 SecKeychainItemRef itemRef,
286 SecItemClass *itemClass,
287 SecKeychainAttributeList *attrList,
288 UInt32 *length,
289 void **outData
290 );
291 #define SecKeychainItemCopyContent _SecKeychainItemCopyContent
292
293 OSStatus
294 _SecKeychainItemCreateFromContent (
295 SecItemClass itemClass,
296 SecKeychainAttributeList *attrList,
297 UInt32 length,
298 const void *data,
299 SecKeychainRef keychainRef,
300 SecAccessRef initialAccess,
301 SecKeychainItemRef *itemRef
302 );
303 #define SecKeychainItemCreateFromContent _SecKeychainItemCreateFromContent
304
305 OSStatus
306 _SecKeychainItemDelete (
307 SecKeychainItemRef itemRef
308 );
309 #define SecKeychainItemDelete _SecKeychainItemDelete
310
311 OSStatus
312 _SecKeychainItemFreeContent (
313 SecKeychainAttributeList *attrList,
314 void *data
315 );
316 #define SecKeychainItemFreeContent _SecKeychainItemFreeContent
317
318 OSStatus
319 _SecKeychainItemModifyContent (
320 SecKeychainItemRef itemRef,
321 const SecKeychainAttributeList *attrList,
322 UInt32 length,
323 const void *data
324 );
325 #define SecKeychainItemModifyContent _SecKeychainItemModifyContent
326
327
328 OSStatus
329 _SecTrustedApplicationCreateFromPath (
330 const char *path,
331 SecTrustedApplicationRef *app
332 );
333 #define SecTrustedApplicationCreateFromPath _SecTrustedApplicationCreateFromPath
334
335 #else // TARGET_OS_IPHONE
336
337 CFStringRef _kSecPropertyKeyValue();
338 #define kSecPropertyKeyValue _kSecPropertyKeyValue()
339
340 CFStringRef _kSecPropertyKeyLabel();
341 #define kSecPropertyKeyLabel _kSecPropertyKeyLabel()
342
343 CFArrayRef
344 _SecCertificateCopyProperties (
345 SecCertificateRef certRef
346 );
347 #define SecCertificateCopyProperties _SecCertificateCopyProperties
348
349 #endif // TARGET_OS_IPHONE
350
351 SecCertificateRef
352 _SecCertificateCreateWithData (
353 CFAllocatorRef allocator,
354 CFDataRef data
355 );
356 #define SecCertificateCreateWithData _SecCertificateCreateWithData
357
358 __END_DECLS
359
360 #endif // _DY_FRAMEWORK_H
361