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