1 {
2      File:       LSSharedFileList.h
3 
4      Contains:   Services to load and share file lists.
5 
6      Copyright:  Copyright 2003-2009 by 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 {	 Pascal Translation: Gorazd Krosl <gorazd_1957@yahoo.ca>, October 2009 }
14 {	 Updated Pascal Translation: Jonas Maebe <jonas@freepascal.org>, September 2012 }
15 
16 {
17     Modified for use with Free Pascal
18     Version 308
19     Please report any bugs to <gpc@microbizz.nl>
20 }
21 
22 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
23 {$mode macpas}
24 {$modeswitch cblocks}
25 {$packenum 1}
26 {$macro on}
27 {$inline on}
28 {$calling mwpascal}
29 
30 unit LSSharedFileList;
31 interface
32 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
33 {$setc GAP_INTERFACES_VERSION := $0308}
34 
35 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
36     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
37 {$endc}
38 
39 {$ifc defined CPUPOWERPC and defined CPUI386}
40 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
41 {$endc}
42 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
43 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
44 {$endc}
45 
46 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
47 	{$setc __ppc__ := 1}
48 {$elsec}
49 	{$setc __ppc__ := 0}
50 {$endc}
51 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
52 	{$setc __ppc64__ := 1}
53 {$elsec}
54 	{$setc __ppc64__ := 0}
55 {$endc}
56 {$ifc not defined __i386__ and defined CPUI386}
57 	{$setc __i386__ := 1}
58 {$elsec}
59 	{$setc __i386__ := 0}
60 {$endc}
61 {$ifc not defined __x86_64__ and defined CPUX86_64}
62 	{$setc __x86_64__ := 1}
63 {$elsec}
64 	{$setc __x86_64__ := 0}
65 {$endc}
66 {$ifc not defined __arm__ and defined CPUARM}
67 	{$setc __arm__ := 1}
68 {$elsec}
69 	{$setc __arm__ := 0}
70 {$endc}
71 {$ifc not defined __arm64__ and defined CPUAARCH64}
72   {$setc __arm64__ := 1}
73 {$elsec}
74   {$setc __arm64__ := 0}
75 {$endc}
76 
77 {$ifc defined cpu64}
78   {$setc __LP64__ := 1}
79 {$elsec}
80   {$setc __LP64__ := 0}
81 {$endc}
82 
83 
84 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
85 	{$error Conflicting definitions for __ppc__ and __i386__}
86 {$endc}
87 
88 {$ifc defined __ppc__ and __ppc__}
89 	{$setc TARGET_CPU_PPC := TRUE}
90 	{$setc TARGET_CPU_PPC64 := FALSE}
91 	{$setc TARGET_CPU_X86 := FALSE}
92 	{$setc TARGET_CPU_X86_64 := FALSE}
93 	{$setc TARGET_CPU_ARM := FALSE}
94 	{$setc TARGET_CPU_ARM64 := FALSE}
95 	{$setc TARGET_OS_MAC := TRUE}
96 	{$setc TARGET_OS_IPHONE := FALSE}
97 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
98 	{$setc TARGET_OS_EMBEDDED := FALSE}
99 {$elifc defined __ppc64__ and __ppc64__}
100 	{$setc TARGET_CPU_PPC := FALSE}
101 	{$setc TARGET_CPU_PPC64 := TRUE}
102 	{$setc TARGET_CPU_X86 := FALSE}
103 	{$setc TARGET_CPU_X86_64 := FALSE}
104 	{$setc TARGET_CPU_ARM := FALSE}
105 	{$setc TARGET_CPU_ARM64 := FALSE}
106 	{$setc TARGET_OS_MAC := TRUE}
107 	{$setc TARGET_OS_IPHONE := FALSE}
108 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
109 	{$setc TARGET_OS_EMBEDDED := FALSE}
110 {$elifc defined __i386__ and __i386__}
111 	{$setc TARGET_CPU_PPC := FALSE}
112 	{$setc TARGET_CPU_PPC64 := FALSE}
113 	{$setc TARGET_CPU_X86 := TRUE}
114 	{$setc TARGET_CPU_X86_64 := FALSE}
115 	{$setc TARGET_CPU_ARM := FALSE}
116 	{$setc TARGET_CPU_ARM64 := FALSE}
117 {$ifc defined iphonesim}
118  	{$setc TARGET_OS_MAC := FALSE}
119 	{$setc TARGET_OS_IPHONE := TRUE}
120 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
121 {$elsec}
122 	{$setc TARGET_OS_MAC := TRUE}
123 	{$setc TARGET_OS_IPHONE := FALSE}
124 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
125 {$endc}
126 	{$setc TARGET_OS_EMBEDDED := FALSE}
127 {$elifc defined __x86_64__ and __x86_64__}
128 	{$setc TARGET_CPU_PPC := FALSE}
129 	{$setc TARGET_CPU_PPC64 := FALSE}
130 	{$setc TARGET_CPU_X86 := FALSE}
131 	{$setc TARGET_CPU_X86_64 := TRUE}
132 	{$setc TARGET_CPU_ARM := FALSE}
133 	{$setc TARGET_CPU_ARM64 := FALSE}
134 {$ifc defined iphonesim}
135  	{$setc TARGET_OS_MAC := FALSE}
136 	{$setc TARGET_OS_IPHONE := TRUE}
137 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
138 {$elsec}
139 	{$setc TARGET_OS_MAC := TRUE}
140 	{$setc TARGET_OS_IPHONE := FALSE}
141 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
142 {$endc}
143 	{$setc TARGET_OS_EMBEDDED := FALSE}
144 {$elifc defined __arm__ and __arm__}
145 	{$setc TARGET_CPU_PPC := FALSE}
146 	{$setc TARGET_CPU_PPC64 := FALSE}
147 	{$setc TARGET_CPU_X86 := FALSE}
148 	{$setc TARGET_CPU_X86_64 := FALSE}
149 	{$setc TARGET_CPU_ARM := TRUE}
150 	{$setc TARGET_CPU_ARM64 := FALSE}
151 	{$setc TARGET_OS_MAC := FALSE}
152 	{$setc TARGET_OS_IPHONE := TRUE}
153 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
154 	{$setc TARGET_OS_EMBEDDED := TRUE}
155 {$elifc defined __arm64__ and __arm64__}
156 	{$setc TARGET_CPU_PPC := FALSE}
157 	{$setc TARGET_CPU_PPC64 := FALSE}
158 	{$setc TARGET_CPU_X86 := FALSE}
159 	{$setc TARGET_CPU_X86_64 := FALSE}
160 	{$setc TARGET_CPU_ARM := FALSE}
161 	{$setc TARGET_CPU_ARM64 := TRUE}
162 {$ifc defined ios}
163 	{$setc TARGET_OS_MAC := FALSE}
164 	{$setc TARGET_OS_IPHONE := TRUE}
165 	{$setc TARGET_OS_EMBEDDED := TRUE}
166 {$elsec}
167 	{$setc TARGET_OS_MAC := TRUE}
168 	{$setc TARGET_OS_IPHONE := FALSE}
169 	{$setc TARGET_OS_EMBEDDED := FALSE}
170 {$endc}
171 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
172 {$elsec}
173 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
174 {$endc}
175 
176 {$ifc defined __LP64__ and __LP64__ }
177   {$setc TARGET_CPU_64 := TRUE}
178 {$elsec}
179   {$setc TARGET_CPU_64 := FALSE}
180 {$endc}
181 
182 {$ifc defined FPC_BIG_ENDIAN}
183 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
184 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
185 {$elifc defined FPC_LITTLE_ENDIAN}
186 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
187 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
188 {$elsec}
189 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
190 {$endc}
191 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
192 {$setc CALL_NOT_IN_CARBON := FALSE}
193 {$setc OLDROUTINENAMES := FALSE}
194 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
195 {$setc OPAQUE_UPP_TYPES := TRUE}
196 {$setc OTCARBONAPPLICATION := TRUE}
197 {$setc OTKERNEL := FALSE}
198 {$setc PM_USE_SESSION_APIS := TRUE}
199 {$setc TARGET_API_MAC_CARBON := TRUE}
200 {$setc TARGET_API_MAC_OS8 := FALSE}
201 {$setc TARGET_API_MAC_OSX := TRUE}
202 {$setc TARGET_CARBON := TRUE}
203 {$setc TARGET_CPU_68K := FALSE}
204 {$setc TARGET_CPU_MIPS := FALSE}
205 {$setc TARGET_CPU_SPARC := FALSE}
206 {$setc TARGET_OS_UNIX := FALSE}
207 {$setc TARGET_OS_WIN32 := FALSE}
208 {$setc TARGET_RT_MAC_68881 := FALSE}
209 {$setc TARGET_RT_MAC_CFM := FALSE}
210 {$setc TARGET_RT_MAC_MACHO := TRUE}
211 {$setc TYPED_FUNCTION_POINTERS := TRUE}
212 {$setc TYPE_BOOL := FALSE}
213 {$setc TYPE_EXTENDED := FALSE}
214 {$setc TYPE_LONGLONG := TRUE}
215 uses MacTypes,CFBase,CFArray,CFDictionary,CFURL,CFRunLoop,Files,IconsCore,Authorization;
216 {$endc} {not MACOSALLINCLUDE}
217 
218 
219 
220 {$ifc TARGET_OS_MAC}
221 
222 {$ALIGN POWER}
223 
224 
225 { The shared file list API is for sharing and storing list of references to file system objects.
226    The shared file list is a persistent list of objects, where each item has assigned display name, icon, and url
227    as well as other optional properties.
228 
229    Each list can also have various properties attached.
230 }
231 type
232 	LSSharedFileListRef = ^OpaqueLSSharedFileListRef; { an opaque type }
233 	OpaqueLSSharedFileListRef = record end;
234 	LSSharedFileListItemRef = ^OpaqueLSSharedFileListItemRef; { an opaque type }
235 	OpaqueLSSharedFileListItemRef = record end;
236 
237 { list types }
238 
239 {
240  *  kLSSharedFileListFavoriteVolumes
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  }
247 var kLSSharedFileListFavoriteVolumes: CFStringRef; external name '_kLSSharedFileListFavoriteVolumes'; (* attribute const *)
248 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
249 
250 
251 {
252  *  kLSSharedFileListFavoriteItems
253  *
254  *  Availability:
255  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
256  *    CarbonLib:        not available
257  *    Non-Carbon CFM:   not available
258  }
259 var kLSSharedFileListFavoriteItems: CFStringRef; external name '_kLSSharedFileListFavoriteItems'; (* attribute const *)
260 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
261 
262 
263 {
264  *  kLSSharedFileListRecentApplicationItems
265  *
266  *  Availability:
267  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
268  *    CarbonLib:        not available
269  *    Non-Carbon CFM:   not available
270  }
271 var kLSSharedFileListRecentApplicationItems: CFStringRef; external name '_kLSSharedFileListRecentApplicationItems'; (* attribute const *)
272 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
273 
274 
275 {
276  *  kLSSharedFileListRecentDocumentItems
277  *
278  *  Availability:
279  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
280  *    CarbonLib:        not available
281  *    Non-Carbon CFM:   not available
282  }
283 var kLSSharedFileListRecentDocumentItems: CFStringRef; external name '_kLSSharedFileListRecentDocumentItems'; (* attribute const *)
284 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
285 
286 
287 {
288  *  kLSSharedFileListRecentServerItems
289  *
290  *  Availability:
291  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
292  *    CarbonLib:        not available
293  *    Non-Carbon CFM:   not available
294  }
295 var kLSSharedFileListRecentServerItems: CFStringRef; external name '_kLSSharedFileListRecentServerItems'; (* attribute const *)
296 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
297 
298 
299 {
300  *  kLSSharedFileListSessionLoginItems
301  *
302  *  Availability:
303  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
304  *    CarbonLib:        not available
305  *    Non-Carbon CFM:   not available
306  }
307 var kLSSharedFileListSessionLoginItems: CFStringRef; external name '_kLSSharedFileListSessionLoginItems'; (* attribute const *)
308 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
309 
310 
311 {
312  *  kLSSharedFileListGlobalLoginItems   *** DEPRECATED ***
313  *
314  *  Deprecated:
315  *    Use a LaunchAgent instead.
316  *
317  *  Availability:
318  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
319  *    CarbonLib:        not available
320  *    Non-Carbon CFM:   not available
321  }
322 var kLSSharedFileListGlobalLoginItems: CFStringRef; external name '_kLSSharedFileListGlobalLoginItems'; (* attribute const *)
323 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_9, __IPHONE_NA, __IPHONE_NA) *)
324 
325 
326 { LSSharedFileList property keys }
327 
328 
329 {
330  *  kLSSharedFileListRecentItemsMaxAmount
331  *
332  *  Discussion:
333  *    maximum amount of items in the list.  Associated property is
334  *    CFNumber
335  *
336  *  Availability:
337  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
338  *    CarbonLib:        not available
339  *    Non-Carbon CFM:   not available
340  }
341 var kLSSharedFileListRecentItemsMaxAmount: CFStringRef; external name '_kLSSharedFileListRecentItemsMaxAmount'; (* attribute const *)
342 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
343 
344 {
345  *  kLSSharedFileListVolumesComputerVisible
346  *
347  *  Discussion:
348  *    is Computer item visible in favorite volumes list. Associated
349  *    property is CFBoolean.
350  *
351  *  Availability:
352  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
353  *    CarbonLib:        not available
354  *    Non-Carbon CFM:   not available
355  }
356 var kLSSharedFileListVolumesComputerVisible: CFStringRef; external name '_kLSSharedFileListVolumesComputerVisible'; (* attribute const *)
357 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
358 
359 {
360  *  kLSSharedFileListVolumesIDiskVisible
361  *
362  *  Discussion:
363  *    is iDisk item visible in favorite volumes list. Associated
364  *    property is CFBoolean.
365  *
366  *  Availability:
367  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
368  *    CarbonLib:        not available
369  *    Non-Carbon CFM:   not available
370  }
371 var kLSSharedFileListVolumesIDiskVisible: CFStringRef; external name '_kLSSharedFileListVolumesIDiskVisible'; (* attribute const *)
372 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
373 
374 {
375  *  kLSSharedFileListVolumesNetworkVisible
376  *
377  *  Discussion:
378  *    is Network item visible in favorite volumes list. Associated
379  *    property is CFBoolean.
380  *
381  *  Availability:
382  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
383  *    CarbonLib:        not available
384  *    Non-Carbon CFM:   not available
385  }
386 var kLSSharedFileListVolumesNetworkVisible: CFStringRef; external name '_kLSSharedFileListVolumesNetworkVisible'; (* attribute const *)
387 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
388 
389 { item default positions }
390 
391 
392 {
393  *  kLSSharedFileListItemBeforeFirst
394  *
395  *  Discussion:
396  *    A virtual item reference for inserting new item at beginning of
397  *    the list.
398  *
399  *  Availability:
400  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
401  *    CarbonLib:        not available
402  *    Non-Carbon CFM:   not available
403  }
404 var kLSSharedFileListItemBeforeFirst: LSSharedFileListItemRef; external name '_kLSSharedFileListItemBeforeFirst'; (* attribute const *)
405 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
406 
407 {
408  *  kLSSharedFileListItemLast
409  *
410  *  Discussion:
411  *    A virtual item reference for inserting new item at end of the
412  *    list.
413  *
414  *  Availability:
415  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
416  *    CarbonLib:        not available
417  *    Non-Carbon CFM:   not available
418  }
419 var kLSSharedFileListItemLast: LSSharedFileListItemRef; external name '_kLSSharedFileListItemLast'; (* attribute const *)
420 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
421 
422 
423 { LSSharedFileListItem property keys }
424 
425 
426 {
427  *  kLSSharedFileListItemHidden
428  *
429  *  Discussion:
430  *    Is item hidden in UI? Associated property is CFBoolean.
431  *
432  *  Availability:
433  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
434  *    CarbonLib:        not available
435  *    Non-Carbon CFM:   not available
436  }
437 var kLSSharedFileListItemHidden: CFStringRef; external name '_kLSSharedFileListItemHidden'; (* attribute const *)
438 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
439 {
440  *  kLSSharedFileListLoginItemHidden
441  *
442  *  Discussion:
443  *    Should UI hide login item's window? Associated property is
444  *    CFBoolean.
445  *
446  *  Availability:
447  *    Mac OS X:         in version 10.6 and later in CoreServices.framework
448  *    CarbonLib:        not available
449  *    Non-Carbon CFM:   not available
450  }
451 var kLSSharedFileListLoginItemHidden: CFStringRef; external name '_kLSSharedFileListLoginItemHidden'; (* attribute const *)
452 (* __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
453 
454 { LSSharedFileListItemResolve flags }
455 const
456 	kLSSharedFileListNoUserInteraction = 1 shl 0; { no user interaction during resolution }
457 	kLSSharedFileListDoNotMountVolumes = 1 shl 1; { do not mount volumes during resolution }
458 
459 
460 {
461  *  LSSharedFileListChangedProcPtr
462  *
463  *  Discussion:
464  *    callback to use with LSSharedFileListAddObserver and
465  *    LSSharedFileListRemoveObserver.
466  }
467 type
468 	LSSharedFileListChangedProcPtr = procedure( inList: LSSharedFileListRef; context: UnivPtr );
469 
470 {
471  *  LSSharedFileListGetTypeID()
472  *
473  *  Discussion:
474  *    This routine will return the CFTypeID for the LSSharedFileListRef
475  *    type.
476  *
477  *  Mac OS X threading:
478  *    Thread safe since version 10.5
479  *
480  *  Result:
481  *    CFTypeID for the LSSharedFileListRef type.
482  *
483  *  Availability:
484  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
485  *    CarbonLib:        not available
486  *    Non-Carbon CFM:   not available
487  }
LSSharedFileListGetTypeIDnull488 function LSSharedFileListGetTypeID: CFTypeID; external name '_LSSharedFileListGetTypeID';
489 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
490 
491 
492 {
493  *  LSSharedFileListItemGetTypeID()
494  *
495  *  Discussion:
496  *    This routine will return the CFTypeID for the
497  *    LSSharedFileListItemRef type.
498  *
499  *  Mac OS X threading:
500  *    Thread safe since version 10.5
501  *
502  *  Result:
503  *    CFTypeID for the LSSharedFileListItemRef type.
504  *
505  *  Availability:
506  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
507  *    CarbonLib:        not available
508  *    Non-Carbon CFM:   not available
509  }
LSSharedFileListItemGetTypeIDnull510 function LSSharedFileListItemGetTypeID: CFTypeID; external name '_LSSharedFileListItemGetTypeID';
511 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
512 
513 
514 {
515  *  LSSharedFileListCreate()
516  *
517  *  Summary:
518  *    Create shared file list reference.
519  *
520  *  Discussion:
521  *    Creates shared file list reference to be used for changing list
522  *    and reading its various properties.
523  *
524  *  Mac OS X threading:
525  *    Thread safe since version 10.5
526  *
527  *  Parameters:
528  *
529  *    inAllocator:
530  *      CFAllocatorRef used to allocate the LSSharedFileListRef object.
531  *      As usual, NULL means default allocator.
532  *
533  *    inListType:
534  *      A constant indicating list type to create (for example
535  *      kLSSharedFileListSessionLoginItems).
536  *
537  *    listOptions:
538  *      Additional parameters for the list type (as applicable). NULL
539  *      means no options.
540  *
541  *  Result:
542  *    A reference to created shared file list object or NULL if
543  *    creation failed. Has to be released with CFRelease when list
544  *    object is not needed anymore.
545  *
546  *  Availability:
547  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
548  *    CarbonLib:        not available
549  *    Non-Carbon CFM:   not available
550  }
LSSharedFileListCreatenull551 function LSSharedFileListCreate( inAllocator: CFAllocatorRef; inListType: CFStringRef; listOptions: CFTypeRef ): LSSharedFileListRef; external name '_LSSharedFileListCreate';
552 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
553 
554 
555 {
556  *  LSSharedFileListSetAuthorization()
557  *
558  *  Summary:
559  *    Set authorization reference for the shared list.
560  *
561  *  Discussion:
562  *    Sets authorization reference for the shared list. Before
563  *    attempting to perform a privileged operation on the shared list
564  *    caller must authorize appropriate rights. For example, modifying
565  *    kLSSharedFileListGlobalLoginItems list requires
566  *    "system.global-login-items." right authorized.
567  *
568  *  Mac OS X threading:
569  *    Thread safe since version 10.5
570  *
571  *  Parameters:
572  *
573  *    inList:
574  *      Shared list reference.
575  *
576  *    inAuthorization:
577  *      Authorization reference.
578  *
579  *  Availability:
580  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
581  *    CarbonLib:        not available
582  *    Non-Carbon CFM:   not available
583  }
LSSharedFileListSetAuthorizationnull584 function LSSharedFileListSetAuthorization( inList: LSSharedFileListRef; inAuthorization: AuthorizationRef ): OSStatus; external name '_LSSharedFileListSetAuthorization';
585 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
586 
587 
588 {
589  *  LSSharedFileListAddObserver()
590  *
591  *  Summary:
592  *    Add observer of shared list changes.
593  *
594  *  Discussion:
595  *    Adds observer of shared list changes. The provided function will
596  *    be called when the list has changed (or any item property has
597  *    changed).
598  *
599  *  Mac OS X threading:
600  *    Thread safe since version 10.5
601  *
602  *  Parameters:
603  *
604  *    inList:
605  *      Shared list reference.
606  *
607  *    inRunloop:
608  *      Runloop to run on.
609  *
610  *    inRunloopMode:
611  *      Mode for runloop.
612  *
613  *    callback:
614  *      Function to call when list has changed.
615  *
616  *    context:
617  *      Context pointer defined by client.
618  *
619  *  Availability:
620  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
621  *    CarbonLib:        not available
622  *    Non-Carbon CFM:   not available
623  }
624 procedure LSSharedFileListAddObserver( inList: LSSharedFileListRef; inRunloop: CFRunLoopRef; inRunloopMode: CFStringRef; callback: LSSharedFileListChangedProcPtr; context: UnivPtr ); external name '_LSSharedFileListAddObserver';
625 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
626 
627 
628 {
629  *  LSSharedFileListRemoveObserver()
630  *
631  *  Summary:
632  *    Remove observer of shared list changes.
633  *
634  *  Discussion:
635  *    Removes observer of shared list changes.
636  *
637  *  Mac OS X threading:
638  *    Thread safe since version 10.5
639  *
640  *  Parameters:
641  *
642  *    inList:
643  *      Shared list reference.
644  *
645  *    inRunloop:
646  *      Runloop to run on.
647  *
648  *    inRunloopMode:
649  *      Mode for runloop.
650  *
651  *    callback:
652  *      Function to call when list has changed.
653  *
654  *    context:
655  *      Context pointer defined by client.
656  *
657  *  Availability:
658  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
659  *    CarbonLib:        not available
660  *    Non-Carbon CFM:   not available
661  }
662 procedure LSSharedFileListRemoveObserver( inList: LSSharedFileListRef; inRunloop: CFRunLoopRef; inRunloopMode: CFStringRef; callback: LSSharedFileListChangedProcPtr; context: UnivPtr ); external name '_LSSharedFileListRemoveObserver';
663 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
664 
665 
666 {
667  *  LSSharedFileListGetSeedValue()
668  *
669  *  Summary:
670  *    Return current seed value.
671  *
672  *  Discussion:
673  *    Returns seed value of the shared list.
674  *
675  *  Mac OS X threading:
676  *    Thread safe since version 10.5
677  *
678  *  Parameters:
679  *
680  *    inList:
681  *      Shared list reference.
682  *
683  *  Availability:
684  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
685  *    CarbonLib:        not available
686  *    Non-Carbon CFM:   not available
687  }
LSSharedFileListGetSeedValuenull688 function LSSharedFileListGetSeedValue( inList: LSSharedFileListRef ): UInt32; external name '_LSSharedFileListGetSeedValue';
689 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
690 
691 
692 {
693  *  LSSharedFileListCopyProperty()
694  *
695  *  Summary:
696  *    Return property by its name.
697  *
698  *  Discussion:
699  *    Returns lists named property as CFTypeRef object.
700  *
701  *  Mac OS X threading:
702  *    Thread safe since version 10.5
703  *
704  *  Parameters:
705  *
706  *    inList:
707  *      Shared list reference.
708  *
709  *    inPropertyName:
710  *      Name of the property to return.
711  *
712  *  Result:
713  *    CFTypeRef containing requested property. NULL means list has no
714  *    property with this name. Has to be released with CFRelease when
715  *    property object is not needed anymore.
716  *
717  *  Availability:
718  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
719  *    CarbonLib:        not available
720  *    Non-Carbon CFM:   not available
721  }
LSSharedFileListCopyPropertynull722 function LSSharedFileListCopyProperty( inList: LSSharedFileListRef; inPropertyName: CFStringRef ): CFTypeRef; external name '_LSSharedFileListCopyProperty';
723 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
724 
725 
726 {
727  *  LSSharedFileListSetProperty()
728  *
729  *  Summary:
730  *    Set property by its name.
731  *
732  *  Discussion:
733  *    Set lists named property as CFTypeRef object.
734  *
735  *  Mac OS X threading:
736  *    Thread safe since version 10.5
737  *
738  *  Parameters:
739  *
740  *    inList:
741  *      Shared list reference.
742  *
743  *    inPropertyName:
744  *      Name of the property to return.
745  *
746  *    inPropertyData:
747  *      Property data to set. Pass NULL to remove existing property.
748  *
749  *  Availability:
750  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
751  *    CarbonLib:        not available
752  *    Non-Carbon CFM:   not available
753  }
LSSharedFileListSetPropertynull754 function LSSharedFileListSetProperty( inList: LSSharedFileListRef; inPropertyName: CFStringRef; inPropertyData: CFTypeRef ): OSStatus; external name '_LSSharedFileListSetProperty';
755 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
756 
757 
758 {
759  *  LSSharedFileListCopySnapshot()
760  *
761  *  Summary:
762  *    Create snapshot array.
763  *
764  *  Discussion:
765  *    Creates snapshot array, which is list of all items at the moment
766  *    LSSharedFileListCopySnapshot was called.
767  *
768  *  Mac OS X threading:
769  *    Thread safe since version 10.5
770  *
771  *  Parameters:
772  *
773  *    inList:
774  *      Shared list reference.
775  *
776  *    outSnapshotSeed:
777  *      Returned seed value at which snapshot was taken.
778  *
779  *  Result:
780  *    Immutable CFArray of LSSharedFileListItemRef values. Has to be
781  *    released with CFRelease when snapshot array is not needed anymore.
782  *
783  *  Availability:
784  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
785  *    CarbonLib:        not available
786  *    Non-Carbon CFM:   not available
787  }
LSSharedFileListCopySnapshotnull788 function LSSharedFileListCopySnapshot( inList: LSSharedFileListRef; var outSnapshotSeed: UInt32 ): CFArrayRef; external name '_LSSharedFileListCopySnapshot';
789 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
790 
791 
792 {
793  *  LSSharedFileListInsertItemURL()
794  *
795  *  Summary:
796  *    Insert item into shared list.
797  *
798  *  Discussion:
799  *    Inserts item into shared list at specified location. If the item
800  *    already exists in the list it will be moved and its icon, display
801  *    name and properties will be updated.
802  *
803  *  Mac OS X threading:
804  *    Thread safe since version 10.5
805  *
806  *  Parameters:
807  *
808  *    inList:
809  *      Shared list reference.
810  *
811  *    insertAfterThisItem:
812  *      Item after which new item has to be inserted. To insert at the
813  *      beginning of the list use kLSSharedFileListItemBeforeFirst or
814  *      to insert at the end of the list use kLSSharedFileListItemLast.
815  *
816  *    inDisplayName:
817  *      Display name of the new item. Can be NULL.
818  *
819  *    inIconRef:
820  *      Icon of the new item. Can be NULL.
821  *
822  *    inURL:
823  *      URL of the new item.
824  *
825  *    inPropertiesToSet:
826  *      CFDictionary of properties to set. Keys are property names and
827  *      values are property values. The property values are retained
828  *      and copied by the API. Can be NULL.
829  *
830  *    inPropertiesToClear:
831  *      CFArray of property names to clear if item already exists. Can
832  *      be NULL.
833  *
834  *  Result:
835  *    Reference to new item. Has to be released with CFRelease when the
836  *    item is not needed anymore.
837  *
838  *  Availability:
839  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
840  *    CarbonLib:        not available
841  *    Non-Carbon CFM:   not available
842  }
LSSharedFileListInsertItemURLnull843 function LSSharedFileListInsertItemURL( inList: LSSharedFileListRef; insertAfterThisItem: LSSharedFileListItemRef; inDisplayName: CFStringRef; inIconRef: IconRef; inURL: CFURLRef; inPropertiesToSet: CFDictionaryRef; inPropertiesToClear: CFArrayRef ): LSSharedFileListItemRef; external name '_LSSharedFileListInsertItemURL';
844 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
845 
846 
847 {
848  *  LSSharedFileListInsertItemFSRef()
849  *
850  *  Summary:
851  *    Insert item into shared list.
852  *
853  *  Discussion:
854  *    Inserts item into shared list at specified location. If the item
855  *    already exists in the list it will be moved and its icon, display
856  *    name and properties will be updated.
857  *
858  *  Mac OS X threading:
859  *    Thread safe since version 10.5
860  *
861  *  Parameters:
862  *
863  *    inList:
864  *      Shared list reference.
865  *
866  *    insertAfterThisItem:
867  *      Item after which new item has to be inserted. To insert at the
868  *      beginning of the list use kLSSharedFileListItemBeforeFirst or
869  *      to insert at the end of the list use kLSSharedFileListItemLast.
870  *
871  *    inDisplayName:
872  *      Display name of the new item. Can be NULL.
873  *
874  *    inIconRef:
875  *      Icon of the new item. Can be NULL.
876  *
877  *    inFSRef:
878  *      FSRef of the new item.
879  *
880  *    inPropertiesToSet:
881  *      CFDictionary of properties to set. Keys are property names and
882  *      values are property values. The property values are retained
883  *      and copied by the API. Can be NULL.
884  *
885  *    inPropertiesToClear:
886  *      CFArray of property names to clear if item already exists. Can
887  *      be NULL.
888  *
889  *  Result:
890  *    Reference to new item. Has to be released with CFRelease when the
891  *    item is not needed anymore.
892  *
893  *  Availability:
894  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
895  *    CarbonLib:        not available
896  *    Non-Carbon CFM:   not available
897  }
LSSharedFileListInsertItemFSRefnull898 function LSSharedFileListInsertItemFSRef( inList: LSSharedFileListRef; insertAfterThisItem: LSSharedFileListItemRef; inDisplayName: CFStringRef; inIconRef: IconRef; const (*var*) inFSRef: FSRef; inPropertiesToSet: CFDictionaryRef; inPropertiesToClear: CFArrayRef ): LSSharedFileListItemRef; external name '_LSSharedFileListInsertItemFSRef';
899 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
900 
901 
902 {
903  *  LSSharedFileListItemMove()
904  *
905  *  Summary:
906  *    Move item.
907  *
908  *  Discussion:
909  *    Moves item at specified location.
910  *
911  *  Mac OS X threading:
912  *    Thread safe since version 10.5
913  *
914  *  Parameters:
915  *
916  *    inList:
917  *      Shared list reference.
918  *
919  *    inItem:
920  *      Item to move.
921  *
922  *    inMoveAfterItem:
923  *      New icon of the new item. Use kLSSharedFileListItemBeforeFirst
924  *      and kLSSharedFileListItemLast to move at the beginning or the
925  *      end of the shared list.
926  *
927  *  Availability:
928  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
929  *    CarbonLib:        not available
930  *    Non-Carbon CFM:   not available
931  }
LSSharedFileListItemMovenull932 function LSSharedFileListItemMove( inList: LSSharedFileListRef; inItem: LSSharedFileListItemRef; inMoveAfterItem: LSSharedFileListItemRef ): OSStatus; external name '_LSSharedFileListItemMove';
933 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
934 
935 
936 {
937  *  LSSharedFileListItemRemove()
938  *
939  *  Summary:
940  *    Remove item from shared list.
941  *
942  *  Discussion:
943  *    Removes item from shared list.
944  *
945  *  Mac OS X threading:
946  *    Thread safe since version 10.5
947  *
948  *  Parameters:
949  *
950  *    inList:
951  *      Shared list reference.
952  *
953  *    inItem:
954  *      Item to remove.
955  *
956  *  Availability:
957  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
958  *    CarbonLib:        not available
959  *    Non-Carbon CFM:   not available
960  }
LSSharedFileListItemRemovenull961 function LSSharedFileListItemRemove( inList: LSSharedFileListRef; inItem: LSSharedFileListItemRef ): OSStatus; external name '_LSSharedFileListItemRemove';
962 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
963 
964 
965 {
966  *  LSSharedFileListRemoveAllItems()
967  *
968  *  Summary:
969  *    Remove all items from shared list.
970  *
971  *  Discussion:
972  *    Removes all items from shared list.
973  *
974  *  Mac OS X threading:
975  *    Thread safe since version 10.5
976  *
977  *  Parameters:
978  *
979  *    inList:
980  *      Shared list to clear.
981  *
982  *  Availability:
983  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
984  *    CarbonLib:        not available
985  *    Non-Carbon CFM:   not available
986  }
LSSharedFileListRemoveAllItemsnull987 function LSSharedFileListRemoveAllItems( inList: LSSharedFileListRef ): OSStatus; external name '_LSSharedFileListRemoveAllItems';
988 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
989 
990 
991 {
992  *  LSSharedFileListItemGetID()
993  *
994  *  Summary:
995  *    Obtain unique item id.
996  *
997  *  Discussion:
998  *    Returns unique item id.
999  *
1000  *  Mac OS X threading:
1001  *    Thread safe since version 10.5
1002  *
1003  *  Availability:
1004  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
1005  *    CarbonLib:        not available
1006  *    Non-Carbon CFM:   not available
1007  }
LSSharedFileListItemGetIDnull1008 function LSSharedFileListItemGetID( inItem: LSSharedFileListItemRef ): UInt32; external name '_LSSharedFileListItemGetID';
1009 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
1010 
1011 
1012 {
1013  *  LSSharedFileListItemCopyIconRef()
1014  *
1015  *  Summary:
1016  *    Obtain item's icon.
1017  *
1018  *  Discussion:
1019  *    Returns icon ref for the item.
1020  *
1021  *  Mac OS X threading:
1022  *    Thread safe since version 10.5
1023  *
1024  *  Result:
1025  *    IconRef to the item. Caller is responsible to releasing it by
1026  *    calling ReleaseIconRef().
1027  *
1028  *  Availability:
1029  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
1030  *    CarbonLib:        not available
1031  *    Non-Carbon CFM:   not available
1032  }
LSSharedFileListItemCopyIconRefnull1033 function LSSharedFileListItemCopyIconRef( inItem: LSSharedFileListItemRef ): IconRef; external name '_LSSharedFileListItemCopyIconRef';
1034 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
1035 
1036 
1037 {
1038  *  LSSharedFileListItemCopyDisplayName()
1039  *
1040  *  Summary:
1041  *    Obtain item's display name.
1042  *
1043  *  Discussion:
1044  *    Returns display name of the item. Caller is responsible to
1045  *    releasing it by calling CFRelease().
1046  *
1047  *  Mac OS X threading:
1048  *    Thread safe since version 10.5
1049  *
1050  *  Availability:
1051  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
1052  *    CarbonLib:        not available
1053  *    Non-Carbon CFM:   not available
1054  }
LSSharedFileListItemCopyDisplayNamenull1055 function LSSharedFileListItemCopyDisplayName( inItem: LSSharedFileListItemRef ): CFStringRef; external name '_LSSharedFileListItemCopyDisplayName';
1056 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
1057 
1058 
1059 {
1060  *  LSSharedFileListItemResolve()
1061  *
1062  *  Summary:
1063  *    Resolve LSSharedFileListItemRef's item and return its FSRef.
1064  *
1065  *  Discussion:
1066  *    Resolves LSSharedFileListItemRef's item and returns its FSRef.
1067  *
1068  *  Mac OS X threading:
1069  *    Thread safe since version 10.5
1070  *
1071  *  Parameters:
1072  *
1073  *    inItem:
1074  *      Item to resolve.
1075  *
1076  *    inFlags:
1077  *      Resolution flags. Pass zero for default resolution flags.
1078  *
1079  *    outURL:
1080  *      CFURL of original item. Can be NULL. Returned valus has to be
1081  *      released with CFRelease().
1082  *
1083  *    outRef:
1084  *      FSRef of original item. Can be NULL.
1085  *
1086  *  Availability:
1087  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
1088  *    CarbonLib:        not available
1089  *    Non-Carbon CFM:   not available
1090  }
LSSharedFileListItemResolvenull1091 function LSSharedFileListItemResolve( inItem: LSSharedFileListItemRef; inFlags: UInt32; var outURL: CFURLRef; var outRef: FSRef ): OSStatus; external name '_LSSharedFileListItemResolve';
1092 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
1093 
1094 
1095 {
1096  *  LSSharedFileListItemCopyProperty()
1097  *
1098  *  Summary:
1099  *    Obtain item's property by its name.
1100  *
1101  *  Discussion:
1102  *    Returns persistent item's property as CF object. Caller is
1103  *    responsible to releasing it by calling CFRelease().
1104  *
1105  *  Mac OS X threading:
1106  *    Thread safe since version 10.5
1107  *
1108  *  Availability:
1109  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
1110  *    CarbonLib:        not available
1111  *    Non-Carbon CFM:   not available
1112  }
LSSharedFileListItemCopyPropertynull1113 function LSSharedFileListItemCopyProperty( inItem: LSSharedFileListItemRef; inPropertyName: CFStringRef ): CFTypeRef; external name '_LSSharedFileListItemCopyProperty';
1114 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
1115 
1116 
1117 {
1118  *  LSSharedFileListItemSetProperty()
1119  *
1120  *  Summary:
1121  *    Set item property by its name.
1122  *
1123  *  Discussion:
1124  *    Sets persistent item property by its name.
1125  *
1126  *  Mac OS X threading:
1127  *    Thread safe since version 10.5
1128  *
1129  *  Availability:
1130  *    Mac OS X:         in version 10.5 and later in CoreServices.framework
1131  *    CarbonLib:        not available
1132  *    Non-Carbon CFM:   not available
1133  }
LSSharedFileListItemSetPropertynull1134 function LSSharedFileListItemSetProperty( inItem: LSSharedFileListItemRef; inPropertyName: CFStringRef; inPropertyData: CFTypeRef ): OSStatus; external name '_LSSharedFileListItemSetProperty';
1135 (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
1136 
1137 {$endc} {TARGET_OS_MAC}
1138 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
1139 
1140 end.
1141 {$endc} {not MACOSALLINCLUDE}
1142