1 {
2 File: OSServices/CSIdentityAuthority.h
3
4 Contains: CSIdentityAuthority APIs
5
6 Copyright: (c) 2006-2011 Apple Inc. All rights reserved.
7
8 Bugs?: For bug reports, consult the following page on
9 the World Wide Web:
10
11 http://bugs.freepascal.org
12
13 }
14 {
15 Modified for use with Free Pascal
16 Version 308
17 Please report any bugs to <gpc@microbizz.nl>
18 }
19
20 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
21 {$mode macpas}
22 {$modeswitch cblocks}
23 {$packenum 1}
24 {$macro on}
25 {$inline on}
26 {$calling mwpascal}
27
28 unit CSIdentityAuthority;
29 interface
30 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
31 {$setc GAP_INTERFACES_VERSION := $0308}
32
33 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
34 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
35 {$endc}
36
37 {$ifc defined CPUPOWERPC and defined CPUI386}
38 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
39 {$endc}
40 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
41 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
42 {$endc}
43
44 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
45 {$setc __ppc__ := 1}
46 {$elsec}
47 {$setc __ppc__ := 0}
48 {$endc}
49 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
50 {$setc __ppc64__ := 1}
51 {$elsec}
52 {$setc __ppc64__ := 0}
53 {$endc}
54 {$ifc not defined __i386__ and defined CPUI386}
55 {$setc __i386__ := 1}
56 {$elsec}
57 {$setc __i386__ := 0}
58 {$endc}
59 {$ifc not defined __x86_64__ and defined CPUX86_64}
60 {$setc __x86_64__ := 1}
61 {$elsec}
62 {$setc __x86_64__ := 0}
63 {$endc}
64 {$ifc not defined __arm__ and defined CPUARM}
65 {$setc __arm__ := 1}
66 {$elsec}
67 {$setc __arm__ := 0}
68 {$endc}
69 {$ifc not defined __arm64__ and defined CPUAARCH64}
70 {$setc __arm64__ := 1}
71 {$elsec}
72 {$setc __arm64__ := 0}
73 {$endc}
74
75 {$ifc defined cpu64}
76 {$setc __LP64__ := 1}
77 {$elsec}
78 {$setc __LP64__ := 0}
79 {$endc}
80
81
82 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
83 {$error Conflicting definitions for __ppc__ and __i386__}
84 {$endc}
85
86 {$ifc defined __ppc__ and __ppc__}
87 {$setc TARGET_CPU_PPC := TRUE}
88 {$setc TARGET_CPU_PPC64 := FALSE}
89 {$setc TARGET_CPU_X86 := FALSE}
90 {$setc TARGET_CPU_X86_64 := FALSE}
91 {$setc TARGET_CPU_ARM := FALSE}
92 {$setc TARGET_CPU_ARM64 := FALSE}
93 {$setc TARGET_OS_MAC := TRUE}
94 {$setc TARGET_OS_IPHONE := FALSE}
95 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
96 {$setc TARGET_OS_EMBEDDED := FALSE}
97 {$elifc defined __ppc64__ and __ppc64__}
98 {$setc TARGET_CPU_PPC := FALSE}
99 {$setc TARGET_CPU_PPC64 := TRUE}
100 {$setc TARGET_CPU_X86 := FALSE}
101 {$setc TARGET_CPU_X86_64 := FALSE}
102 {$setc TARGET_CPU_ARM := FALSE}
103 {$setc TARGET_CPU_ARM64 := FALSE}
104 {$setc TARGET_OS_MAC := TRUE}
105 {$setc TARGET_OS_IPHONE := FALSE}
106 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
107 {$setc TARGET_OS_EMBEDDED := FALSE}
108 {$elifc defined __i386__ and __i386__}
109 {$setc TARGET_CPU_PPC := FALSE}
110 {$setc TARGET_CPU_PPC64 := FALSE}
111 {$setc TARGET_CPU_X86 := TRUE}
112 {$setc TARGET_CPU_X86_64 := FALSE}
113 {$setc TARGET_CPU_ARM := FALSE}
114 {$setc TARGET_CPU_ARM64 := FALSE}
115 {$ifc defined iphonesim}
116 {$setc TARGET_OS_MAC := FALSE}
117 {$setc TARGET_OS_IPHONE := TRUE}
118 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
119 {$elsec}
120 {$setc TARGET_OS_MAC := TRUE}
121 {$setc TARGET_OS_IPHONE := FALSE}
122 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
123 {$endc}
124 {$setc TARGET_OS_EMBEDDED := FALSE}
125 {$elifc defined __x86_64__ and __x86_64__}
126 {$setc TARGET_CPU_PPC := FALSE}
127 {$setc TARGET_CPU_PPC64 := FALSE}
128 {$setc TARGET_CPU_X86 := FALSE}
129 {$setc TARGET_CPU_X86_64 := TRUE}
130 {$setc TARGET_CPU_ARM := FALSE}
131 {$setc TARGET_CPU_ARM64 := FALSE}
132 {$ifc defined iphonesim}
133 {$setc TARGET_OS_MAC := FALSE}
134 {$setc TARGET_OS_IPHONE := TRUE}
135 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
136 {$elsec}
137 {$setc TARGET_OS_MAC := TRUE}
138 {$setc TARGET_OS_IPHONE := FALSE}
139 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
140 {$endc}
141 {$setc TARGET_OS_EMBEDDED := FALSE}
142 {$elifc defined __arm__ and __arm__}
143 {$setc TARGET_CPU_PPC := FALSE}
144 {$setc TARGET_CPU_PPC64 := FALSE}
145 {$setc TARGET_CPU_X86 := FALSE}
146 {$setc TARGET_CPU_X86_64 := FALSE}
147 {$setc TARGET_CPU_ARM := TRUE}
148 {$setc TARGET_CPU_ARM64 := FALSE}
149 {$setc TARGET_OS_MAC := FALSE}
150 {$setc TARGET_OS_IPHONE := TRUE}
151 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
152 {$setc TARGET_OS_EMBEDDED := TRUE}
153 {$elifc defined __arm64__ and __arm64__}
154 {$setc TARGET_CPU_PPC := FALSE}
155 {$setc TARGET_CPU_PPC64 := FALSE}
156 {$setc TARGET_CPU_X86 := FALSE}
157 {$setc TARGET_CPU_X86_64 := FALSE}
158 {$setc TARGET_CPU_ARM := FALSE}
159 {$setc TARGET_CPU_ARM64 := TRUE}
160 {$ifc defined ios}
161 {$setc TARGET_OS_MAC := FALSE}
162 {$setc TARGET_OS_IPHONE := TRUE}
163 {$setc TARGET_OS_EMBEDDED := TRUE}
164 {$elsec}
165 {$setc TARGET_OS_MAC := TRUE}
166 {$setc TARGET_OS_IPHONE := FALSE}
167 {$setc TARGET_OS_EMBEDDED := FALSE}
168 {$endc}
169 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
170 {$elsec}
171 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
172 {$endc}
173
174 {$ifc defined __LP64__ and __LP64__ }
175 {$setc TARGET_CPU_64 := TRUE}
176 {$elsec}
177 {$setc TARGET_CPU_64 := FALSE}
178 {$endc}
179
180 {$ifc defined FPC_BIG_ENDIAN}
181 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
182 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
183 {$elifc defined FPC_LITTLE_ENDIAN}
184 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
185 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
186 {$elsec}
187 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
188 {$endc}
189 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
190 {$setc CALL_NOT_IN_CARBON := FALSE}
191 {$setc OLDROUTINENAMES := FALSE}
192 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
193 {$setc OPAQUE_UPP_TYPES := TRUE}
194 {$setc OTCARBONAPPLICATION := TRUE}
195 {$setc OTKERNEL := FALSE}
196 {$setc PM_USE_SESSION_APIS := TRUE}
197 {$setc TARGET_API_MAC_CARBON := TRUE}
198 {$setc TARGET_API_MAC_OS8 := FALSE}
199 {$setc TARGET_API_MAC_OSX := TRUE}
200 {$setc TARGET_CARBON := TRUE}
201 {$setc TARGET_CPU_68K := FALSE}
202 {$setc TARGET_CPU_MIPS := FALSE}
203 {$setc TARGET_CPU_SPARC := FALSE}
204 {$setc TARGET_OS_UNIX := FALSE}
205 {$setc TARGET_OS_WIN32 := FALSE}
206 {$setc TARGET_RT_MAC_68881 := FALSE}
207 {$setc TARGET_RT_MAC_CFM := FALSE}
208 {$setc TARGET_RT_MAC_MACHO := TRUE}
209 {$setc TYPED_FUNCTION_POINTERS := TRUE}
210 {$setc TYPE_BOOL := FALSE}
211 {$setc TYPE_EXTENDED := FALSE}
212 {$setc TYPE_LONGLONG := TRUE}
213 uses MacTypes,CFBase;
214 {$endc} {not MACOSALLINCLUDE}
215
216
217 {$ALIGN POWER}
218
219
220 {
221 * CSIdentityAuthorityRef
222 *
223 * Discussion:
224 * A reference to an identity authority object. An identity
225 * authority is a logical repository for identities.
226 }
227 type
228 CSIdentityAuthorityRef = ^__CSIdentityAuthority; { an opaque type }
229 __CSIdentityAuthority = record end;
230 {
231 * CSIdentityAuthorityGetTypeID()
232 *
233 * Summary:
234 * Returns the CSIdentityAuthority type identifier
235 *
236 * Mac OS X threading:
237 * Thread safe since version 10.5
238 *
239 * Result:
240 * The CFTypeID of the CSIdentityAuthority Core Foundation type
241 *
242 * Availability:
243 * Mac OS X: in version 10.5 and later in CoreServices.framework
244 * CarbonLib: not available
245 * Non-Carbon CFM: not available
246 }
CSIdentityAuthorityGetTypeIDnull247 function CSIdentityAuthorityGetTypeID: CFTypeID; external name '_CSIdentityAuthorityGetTypeID';
248 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_5_0) *)
249
250
251 {$ifc not TARGET_OS_IPHONE and not TARGET_IPHONE_SIMULATOR}
252 {
253 * CSGetDefaultIdentityAuthority()
254 *
255 * Summary:
256 * Returns the system's default identity authority
257 *
258 * Discussion:
259 * The default identity authority is a pseudo-authority representing
260 * the union of the local identity authority and the managed
261 * identity authority. The function CSIdentityGetAuthority will
262 * never return the default authority instance.
263 *
264 * Mac OS X threading:
265 * Thread safe since version 10.5
266 *
267 * Result:
268 * The CSIdentityAuthorityRef of the default authority
269 *
270 * Availability:
271 * Mac OS X: in version 10.5 and later in CoreServices.framework
272 * CarbonLib: not available
273 * Non-Carbon CFM: not available
274 }
CSGetDefaultIdentityAuthoritynull275 function CSGetDefaultIdentityAuthority: CSIdentityAuthorityRef; external name '_CSGetDefaultIdentityAuthority';
276 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_NA) *)
277
278
279 {
280 * CSGetLocalIdentityAuthority()
281 *
282 * Summary:
283 * Returns the identity authority for identities defined on the
284 * local host
285 *
286 * Mac OS X threading:
287 * Thread safe since version 10.5
288 *
289 * Result:
290 * The CSIdentityAuthorityRef of the local authority
291 *
292 * Availability:
293 * Mac OS X: in version 10.5 and later in CoreServices.framework
294 * CarbonLib: not available
295 * Non-Carbon CFM: not available
296 }
CSGetLocalIdentityAuthoritynull297 function CSGetLocalIdentityAuthority: CSIdentityAuthorityRef; external name '_CSGetLocalIdentityAuthority';
298 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_NA) *)
299
300
301 {
302 * CSGetManagedIdentityAuthority()
303 *
304 * Summary:
305 * Returns the identity authority for identities defined in the
306 * system's managed directory server(s)
307 *
308 * Discussion:
309 * There is always a valid managed identity authority instance, but
310 * if the system is not bound to any managed directory servers, the
311 * managed identity authority will contain no identities.
312 *
313 * Mac OS X threading:
314 * Thread safe since version 10.5
315 *
316 * Result:
317 * The CSIdentityAuthorityRef of the managed authority
318 *
319 * Availability:
320 * Mac OS X: in version 10.5 and later in CoreServices.framework
321 * CarbonLib: not available
322 * Non-Carbon CFM: not available
323 }
CSGetManagedIdentityAuthoritynull324 function CSGetManagedIdentityAuthority: CSIdentityAuthorityRef; external name '_CSGetManagedIdentityAuthority';
325 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_NA) *)
326 {$endc} {!TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR}
327
328 {
329 * CSIdentityAuthorityCopyLocalizedName()
330 *
331 * Summary:
332 * Returns the localized name of an identity authority
333 *
334 * Mac OS X threading:
335 * Thread safe since version 10.5
336 *
337 * Parameters:
338 *
339 * authority:
340 * The identity authority to access
341 *
342 * Result:
343 * A CFStringRef containing the localized authority name
344 *
345 * Availability:
346 * Mac OS X: in version 10.5 and later in CoreServices.framework
347 * CarbonLib: not available
348 * Non-Carbon CFM: not available
349 }
CSIdentityAuthorityCopyLocalizedNamenull350 function CSIdentityAuthorityCopyLocalizedName( authority: CSIdentityAuthorityRef ): CFStringRef; external name '_CSIdentityAuthorityCopyLocalizedName';
351 (* __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_5_0) *)
352
353 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
354
355 end.
356 {$endc} {not MACOSALLINCLUDE}
357