]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/dy_framework.h
configd-453.16.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / dy_framework.h
1 /*
2 * Copyright (c) 2002-2008, 2010, 2011 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 _IORegistryEntryGetName (
113 io_registry_entry_t entry,
114 io_name_t name
115 );
116 #define IORegistryEntryGetName _IORegistryEntryGetName
117
118 kern_return_t
119 _IORegistryEntryGetParentEntry (
120 io_registry_entry_t entry,
121 const io_name_t plane,
122 io_registry_entry_t *parent
123 );
124 #define IORegistryEntryGetParentEntry _IORegistryEntryGetParentEntry
125
126 kern_return_t
127 _IORegistryEntryGetPath (
128 io_registry_entry_t entry,
129 const io_name_t plane,
130 io_string_t path
131 );
132 #define IORegistryEntryGetPath _IORegistryEntryGetPath
133
134 kern_return_t
135 _IORegistryEntryGetRegistryEntryID (
136 io_registry_entry_t entry,
137 uint64_t *entryID
138 );
139 #define IORegistryEntryGetRegistryEntryID _IORegistryEntryGetRegistryEntryID
140
141 CFTypeRef
142 _IORegistryEntrySearchCFProperty (
143 io_registry_entry_t entry,
144 const io_name_t plane,
145 CFStringRef key,
146 CFAllocatorRef allocator,
147 IOOptionBits options
148 ) CF_RETURNS_RETAINED;
149 #define IORegistryEntrySearchCFProperty _IORegistryEntrySearchCFProperty
150
151 kern_return_t
152 _IOServiceGetMatchingServices (
153 mach_port_t masterPort,
154 CFDictionaryRef matching,
155 io_iterator_t *existing
156 );
157 #define IOServiceGetMatchingServices _IOServiceGetMatchingServices
158
159 CFMutableDictionaryRef
160 _IOServiceMatching (
161 const char *name
162 );
163 #define IOServiceMatching _IOServiceMatching
164
165 #pragma mark -
166 #pragma mark Security.framework APIs
167
168 #if !TARGET_OS_IPHONE
169
170 CFTypeRef _kSecAttrService();
171 #define kSecAttrService _kSecAttrService()
172
173 CFTypeRef _kSecClass();
174 #define kSecClass _kSecClass()
175
176 CFTypeRef _kSecClassGenericPassword();
177 #define kSecClassGenericPassword _kSecClassGenericPassword()
178
179 CFTypeRef _kSecMatchLimit();
180 #define kSecMatchLimit _kSecMatchLimit()
181
182 CFTypeRef _kSecMatchLimitAll();
183 #define kSecMatchLimitAll _kSecMatchLimitAll()
184
185 CFTypeRef _kSecMatchSearchList();
186 #define kSecMatchSearchList _kSecMatchSearchList()
187
188 CFTypeRef _kSecReturnRef();
189 #define kSecReturnRef _kSecReturnRef()
190
191 OSStatus
192 _AuthorizationMakeExternalForm (
193 AuthorizationRef authorization,
194 AuthorizationExternalForm *extForm
195 );
196 #define AuthorizationMakeExternalForm _AuthorizationMakeExternalForm
197
198 OSStatus
199 _SecAccessCreate (
200 CFStringRef descriptor,
201 CFArrayRef trustedlist,
202 SecAccessRef *accessRef
203 );
204 #define SecAccessCreate _SecAccessCreate
205
206 #if (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
207 OSStatus
208 _SecAccessCreateFromOwnerAndACL (
209 const CSSM_ACL_OWNER_PROTOTYPE *owner,
210 uint32 aclCount,
211 const CSSM_ACL_ENTRY_INFO *acls,
212 SecAccessRef *accessRef
213 );
214 #define SecAccessCreateFromOwnerAndACL _SecAccessCreateFromOwnerAndACL
215 #else // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
216 SecAccessRef
217 _SecAccessCreateWithOwnerAndACL (
218 uid_t userId,
219 gid_t groupId,
220 SecAccessOwnerType ownerType,
221 CFArrayRef acls,
222 CFErrorRef *error
223 );
224 #define SecAccessCreateWithOwnerAndACL _SecAccessCreateWithOwnerAndACL
225 #endif // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
226
227 OSStatus
228 _SecItemCopyMatching (
229 CFDictionaryRef query,
230 CFTypeRef *result
231 );
232 #define SecItemCopyMatching _SecItemCopyMatching
233
234 OSStatus
235 _SecKeychainCopyDomainDefault (
236 SecPreferencesDomain domain,
237 SecKeychainRef *keychain
238 );
239 #define SecKeychainCopyDomainDefault _SecKeychainCopyDomainDefault
240
241 OSStatus
242 _SecKeychainGetPreferenceDomain (
243 SecPreferencesDomain *domain
244 );
245 #define SecKeychainGetPreferenceDomain _SecKeychainGetPreferenceDomain
246
247 OSStatus
248 _SecKeychainOpen (
249 const char *pathName,
250 SecKeychainRef *keychain
251 );
252 #define SecKeychainOpen _SecKeychainOpen
253
254 OSStatus
255 _SecKeychainSetDomainDefault (
256 SecPreferencesDomain domain,
257 SecKeychainRef keychain
258 );
259 #define SecKeychainSetDomainDefault _SecKeychainSetDomainDefault
260
261 OSStatus
262 _SecKeychainSetPreferenceDomain (
263 SecPreferencesDomain domain
264 );
265 #define SecKeychainSetPreferenceDomain _SecKeychainSetPreferenceDomain
266
267 OSStatus
268 _SecKeychainItemCopyContent (
269 SecKeychainItemRef itemRef,
270 SecItemClass *itemClass,
271 SecKeychainAttributeList *attrList,
272 UInt32 *length,
273 void **outData
274 );
275 #define SecKeychainItemCopyContent _SecKeychainItemCopyContent
276
277 OSStatus
278 _SecKeychainItemCreateFromContent (
279 SecItemClass itemClass,
280 SecKeychainAttributeList *attrList,
281 UInt32 length,
282 const void *data,
283 SecKeychainRef keychainRef,
284 SecAccessRef initialAccess,
285 SecKeychainItemRef *itemRef
286 );
287 #define SecKeychainItemCreateFromContent _SecKeychainItemCreateFromContent
288
289 OSStatus
290 _SecKeychainItemDelete (
291 SecKeychainItemRef itemRef
292 );
293 #define SecKeychainItemDelete _SecKeychainItemDelete
294
295 OSStatus
296 _SecKeychainItemFreeContent (
297 SecKeychainAttributeList *attrList,
298 void *data
299 );
300 #define SecKeychainItemFreeContent _SecKeychainItemFreeContent
301
302 OSStatus
303 _SecKeychainItemModifyContent (
304 SecKeychainItemRef itemRef,
305 const SecKeychainAttributeList *attrList,
306 UInt32 length,
307 const void *data
308 );
309 #define SecKeychainItemModifyContent _SecKeychainItemModifyContent
310
311
312 OSStatus
313 _SecTrustedApplicationCreateFromPath (
314 const char *path,
315 SecTrustedApplicationRef *app
316 );
317 #define SecTrustedApplicationCreateFromPath _SecTrustedApplicationCreateFromPath
318
319 #else // TARGET_OS_IPHONE
320
321 CFStringRef _kSecPropertyKeyValue();
322 #define kSecPropertyKeyValue _kSecPropertyKeyValue()
323
324 CFStringRef _kSecPropertyKeyLabel();
325 #define kSecPropertyKeyLabel _kSecPropertyKeyLabel()
326
327 CFArrayRef
328 _SecCertificateCopyProperties (
329 SecCertificateRef certRef
330 );
331 #define SecCertificateCopyProperties _SecCertificateCopyProperties
332
333 #endif // TARGET_OS_IPHONE
334
335 SecCertificateRef
336 _SecCertificateCreateWithData (
337 CFAllocatorRef allocator,
338 CFDataRef data
339 );
340 #define SecCertificateCreateWithData _SecCertificateCreateWithData
341
342 __END_DECLS
343
344 #endif // _DY_FRAMEWORK_H
345