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