1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147 |
- {
- File: LSSharedFileList.h
-
- Contains: Services to load and share file lists.
-
- Copyright: Copyright 2003-2009 by Apple Inc., all rights reserved.
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://bugs.freepascal.org
- }
- { Pascal Translation: Gorazd Krosl <[email protected]>, October 2009 }
- { Updated Pascal Translation: Jonas Maebe <[email protected]>, September 2012 }
- {
- Modified for use with Free Pascal
- Version 308
- Please report any bugs to <[email protected]>
- }
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- {$mode macpas}
- {$modeswitch cblocks}
- {$packenum 1}
- {$macro on}
- {$inline on}
- {$calling mwpascal}
- {$IFNDEF FPC_DOTTEDUNITS}
- unit LSSharedFileList;
- {$ENDIF FPC_DOTTEDUNITS}
- interface
- {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
- {$setc GAP_INTERFACES_VERSION := $0308}
- {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
- {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
- {$endc}
- {$ifc defined CPUPOWERPC and defined CPUI386}
- {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
- {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
- {$endc}
- {$ifc not defined __ppc__ and defined CPUPOWERPC32}
- {$setc __ppc__ := 1}
- {$elsec}
- {$setc __ppc__ := 0}
- {$endc}
- {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
- {$setc __ppc64__ := 1}
- {$elsec}
- {$setc __ppc64__ := 0}
- {$endc}
- {$ifc not defined __i386__ and defined CPUI386}
- {$setc __i386__ := 1}
- {$elsec}
- {$setc __i386__ := 0}
- {$endc}
- {$ifc not defined __x86_64__ and defined CPUX86_64}
- {$setc __x86_64__ := 1}
- {$elsec}
- {$setc __x86_64__ := 0}
- {$endc}
- {$ifc not defined __arm__ and defined CPUARM}
- {$setc __arm__ := 1}
- {$elsec}
- {$setc __arm__ := 0}
- {$endc}
- {$ifc not defined __arm64__ and defined CPUAARCH64}
- {$setc __arm64__ := 1}
- {$elsec}
- {$setc __arm64__ := 0}
- {$endc}
- {$ifc defined cpu64}
- {$setc __LP64__ := 1}
- {$elsec}
- {$setc __LP64__ := 0}
- {$endc}
- {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
- {$error Conflicting definitions for __ppc__ and __i386__}
- {$endc}
- {$ifc defined __ppc__ and __ppc__}
- {$setc TARGET_CPU_PPC := TRUE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __ppc64__ and __ppc64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := TRUE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __i386__ and __i386__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := TRUE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined iphonesim}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __x86_64__ and __x86_64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := TRUE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$ifc defined iphonesim}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$endc}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$elifc defined __arm__ and __arm__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := TRUE}
- {$setc TARGET_CPU_ARM64 := FALSE}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elifc defined __arm64__ and __arm64__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_PPC64 := FALSE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$setc TARGET_CPU_X86_64 := FALSE}
- {$setc TARGET_CPU_ARM := FALSE}
- {$setc TARGET_CPU_ARM64 := TRUE}
- {$ifc defined ios}
- {$setc TARGET_OS_MAC := FALSE}
- {$setc TARGET_OS_IPHONE := TRUE}
- {$setc TARGET_OS_EMBEDDED := TRUE}
- {$elsec}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_IPHONE := FALSE}
- {$setc TARGET_OS_EMBEDDED := FALSE}
- {$endc}
- {$setc TARGET_IPHONE_SIMULATOR := FALSE}
- {$elsec}
- {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
- {$endc}
- {$ifc defined __LP64__ and __LP64__ }
- {$setc TARGET_CPU_64 := TRUE}
- {$elsec}
- {$setc TARGET_CPU_64 := FALSE}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := TRUE}
- {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
- {$elifc defined FPC_LITTLE_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := FALSE}
- {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
- {$elsec}
- {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
- {$endc}
- {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
- {$setc CALL_NOT_IN_CARBON := FALSE}
- {$setc OLDROUTINENAMES := FALSE}
- {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
- {$setc OPAQUE_UPP_TYPES := TRUE}
- {$setc OTCARBONAPPLICATION := TRUE}
- {$setc OTKERNEL := FALSE}
- {$setc PM_USE_SESSION_APIS := TRUE}
- {$setc TARGET_API_MAC_CARBON := TRUE}
- {$setc TARGET_API_MAC_OS8 := FALSE}
- {$setc TARGET_API_MAC_OSX := TRUE}
- {$setc TARGET_CARBON := TRUE}
- {$setc TARGET_CPU_68K := FALSE}
- {$setc TARGET_CPU_MIPS := FALSE}
- {$setc TARGET_CPU_SPARC := FALSE}
- {$setc TARGET_OS_UNIX := FALSE}
- {$setc TARGET_OS_WIN32 := FALSE}
- {$setc TARGET_RT_MAC_68881 := FALSE}
- {$setc TARGET_RT_MAC_CFM := FALSE}
- {$setc TARGET_RT_MAC_MACHO := TRUE}
- {$setc TYPED_FUNCTION_POINTERS := TRUE}
- {$setc TYPE_BOOL := FALSE}
- {$setc TYPE_EXTENDED := FALSE}
- {$setc TYPE_LONGLONG := TRUE}
- {$IFDEF FPC_DOTTEDUNITS}
- uses MacOsApi.MacTypes,MacOsApi.CFBase,MacOsApi.CFArray,MacOsApi.CFDictionary,MacOsApi.CFURL,MacOsApi.CFRunLoop,MacOsApi.Files,MacOsApi.IconsCore,MacOsApi.Authorization;
- {$ELSE FPC_DOTTEDUNITS}
- uses MacTypes,CFBase,CFArray,CFDictionary,CFURL,CFRunLoop,Files,IconsCore,Authorization;
- {$ENDIF FPC_DOTTEDUNITS}
- {$endc} {not MACOSALLINCLUDE}
- {$ifc TARGET_OS_MAC}
- {$ALIGN POWER}
- { The shared file list API is for sharing and storing list of references to file system objects.
- The shared file list is a persistent list of objects, where each item has assigned display name, icon, and url
- as well as other optional properties.
- Each list can also have various properties attached.
- }
- type
- LSSharedFileListRef = ^OpaqueLSSharedFileListRef; { an opaque type }
- OpaqueLSSharedFileListRef = record end;
- LSSharedFileListItemRef = ^OpaqueLSSharedFileListItemRef; { an opaque type }
- OpaqueLSSharedFileListItemRef = record end;
- { list types }
- {
- * kLSSharedFileListFavoriteVolumes
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListFavoriteVolumes: CFStringRef; external name '_kLSSharedFileListFavoriteVolumes'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListFavoriteItems
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListFavoriteItems: CFStringRef; external name '_kLSSharedFileListFavoriteItems'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListRecentApplicationItems
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListRecentApplicationItems: CFStringRef; external name '_kLSSharedFileListRecentApplicationItems'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListRecentDocumentItems
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListRecentDocumentItems: CFStringRef; external name '_kLSSharedFileListRecentDocumentItems'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListRecentServerItems
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListRecentServerItems: CFStringRef; external name '_kLSSharedFileListRecentServerItems'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListSessionLoginItems
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListSessionLoginItems: CFStringRef; external name '_kLSSharedFileListSessionLoginItems'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListGlobalLoginItems *** DEPRECATED ***
- *
- * Deprecated:
- * Use a LaunchAgent instead.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListGlobalLoginItems: CFStringRef; external name '_kLSSharedFileListGlobalLoginItems'; (* attribute const *)
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_9, __IPHONE_NA, __IPHONE_NA) *)
- { LSSharedFileList property keys }
- {
- * kLSSharedFileListRecentItemsMaxAmount
- *
- * Discussion:
- * maximum amount of items in the list. Associated property is
- * CFNumber
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListRecentItemsMaxAmount: CFStringRef; external name '_kLSSharedFileListRecentItemsMaxAmount'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListVolumesComputerVisible
- *
- * Discussion:
- * is Computer item visible in favorite volumes list. Associated
- * property is CFBoolean.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListVolumesComputerVisible: CFStringRef; external name '_kLSSharedFileListVolumesComputerVisible'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListVolumesIDiskVisible
- *
- * Discussion:
- * is iDisk item visible in favorite volumes list. Associated
- * property is CFBoolean.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListVolumesIDiskVisible: CFStringRef; external name '_kLSSharedFileListVolumesIDiskVisible'; (* attribute const *)
- (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
- {
- * kLSSharedFileListVolumesNetworkVisible
- *
- * Discussion:
- * is Network item visible in favorite volumes list. Associated
- * property is CFBoolean.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListVolumesNetworkVisible: CFStringRef; external name '_kLSSharedFileListVolumesNetworkVisible'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- { item default positions }
- {
- * kLSSharedFileListItemBeforeFirst
- *
- * Discussion:
- * A virtual item reference for inserting new item at beginning of
- * the list.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListItemBeforeFirst: LSSharedFileListItemRef; external name '_kLSSharedFileListItemBeforeFirst'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListItemLast
- *
- * Discussion:
- * A virtual item reference for inserting new item at end of the
- * list.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListItemLast: LSSharedFileListItemRef; external name '_kLSSharedFileListItemLast'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- { LSSharedFileListItem property keys }
- {
- * kLSSharedFileListItemHidden
- *
- * Discussion:
- * Is item hidden in UI? Associated property is CFBoolean.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListItemHidden: CFStringRef; external name '_kLSSharedFileListItemHidden'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * kLSSharedFileListLoginItemHidden
- *
- * Discussion:
- * Should UI hide login item's window? Associated property is
- * CFBoolean.
- *
- * Availability:
- * Mac OS X: in version 10.6 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kLSSharedFileListLoginItemHidden: CFStringRef; external name '_kLSSharedFileListLoginItemHidden'; (* attribute const *)
- (* __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_NA) *)
- { LSSharedFileListItemResolve flags }
- const
- kLSSharedFileListNoUserInteraction = 1 shl 0; { no user interaction during resolution }
- kLSSharedFileListDoNotMountVolumes = 1 shl 1; { do not mount volumes during resolution }
- {
- * LSSharedFileListChangedProcPtr
- *
- * Discussion:
- * callback to use with LSSharedFileListAddObserver and
- * LSSharedFileListRemoveObserver.
- }
- type
- LSSharedFileListChangedProcPtr = procedure( inList: LSSharedFileListRef; context: UnivPtr );
- {
- * LSSharedFileListGetTypeID()
- *
- * Discussion:
- * This routine will return the CFTypeID for the LSSharedFileListRef
- * type.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Result:
- * CFTypeID for the LSSharedFileListRef type.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListGetTypeID: CFTypeID; external name '_LSSharedFileListGetTypeID';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListItemGetTypeID()
- *
- * Discussion:
- * This routine will return the CFTypeID for the
- * LSSharedFileListItemRef type.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Result:
- * CFTypeID for the LSSharedFileListItemRef type.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListItemGetTypeID: CFTypeID; external name '_LSSharedFileListItemGetTypeID';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListCreate()
- *
- * Summary:
- * Create shared file list reference.
- *
- * Discussion:
- * Creates shared file list reference to be used for changing list
- * and reading its various properties.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inAllocator:
- * CFAllocatorRef used to allocate the LSSharedFileListRef object.
- * As usual, NULL means default allocator.
- *
- * inListType:
- * A constant indicating list type to create (for example
- * kLSSharedFileListSessionLoginItems).
- *
- * listOptions:
- * Additional parameters for the list type (as applicable). NULL
- * means no options.
- *
- * Result:
- * A reference to created shared file list object or NULL if
- * creation failed. Has to be released with CFRelease when list
- * object is not needed anymore.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListCreate( inAllocator: CFAllocatorRef; inListType: CFStringRef; listOptions: CFTypeRef ): LSSharedFileListRef; external name '_LSSharedFileListCreate';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListSetAuthorization()
- *
- * Summary:
- * Set authorization reference for the shared list.
- *
- * Discussion:
- * Sets authorization reference for the shared list. Before
- * attempting to perform a privileged operation on the shared list
- * caller must authorize appropriate rights. For example, modifying
- * kLSSharedFileListGlobalLoginItems list requires
- * "system.global-login-items." right authorized.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * inAuthorization:
- * Authorization reference.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListSetAuthorization( inList: LSSharedFileListRef; inAuthorization: AuthorizationRef ): OSStatus; external name '_LSSharedFileListSetAuthorization';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListAddObserver()
- *
- * Summary:
- * Add observer of shared list changes.
- *
- * Discussion:
- * Adds observer of shared list changes. The provided function will
- * be called when the list has changed (or any item property has
- * changed).
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * inRunloop:
- * Runloop to run on.
- *
- * inRunloopMode:
- * Mode for runloop.
- *
- * callback:
- * Function to call when list has changed.
- *
- * context:
- * Context pointer defined by client.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- procedure LSSharedFileListAddObserver( inList: LSSharedFileListRef; inRunloop: CFRunLoopRef; inRunloopMode: CFStringRef; callback: LSSharedFileListChangedProcPtr; context: UnivPtr ); external name '_LSSharedFileListAddObserver';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListRemoveObserver()
- *
- * Summary:
- * Remove observer of shared list changes.
- *
- * Discussion:
- * Removes observer of shared list changes.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * inRunloop:
- * Runloop to run on.
- *
- * inRunloopMode:
- * Mode for runloop.
- *
- * callback:
- * Function to call when list has changed.
- *
- * context:
- * Context pointer defined by client.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- procedure LSSharedFileListRemoveObserver( inList: LSSharedFileListRef; inRunloop: CFRunLoopRef; inRunloopMode: CFStringRef; callback: LSSharedFileListChangedProcPtr; context: UnivPtr ); external name '_LSSharedFileListRemoveObserver';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListGetSeedValue()
- *
- * Summary:
- * Return current seed value.
- *
- * Discussion:
- * Returns seed value of the shared list.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListGetSeedValue( inList: LSSharedFileListRef ): UInt32; external name '_LSSharedFileListGetSeedValue';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListCopyProperty()
- *
- * Summary:
- * Return property by its name.
- *
- * Discussion:
- * Returns lists named property as CFTypeRef object.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * inPropertyName:
- * Name of the property to return.
- *
- * Result:
- * CFTypeRef containing requested property. NULL means list has no
- * property with this name. Has to be released with CFRelease when
- * property object is not needed anymore.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListCopyProperty( inList: LSSharedFileListRef; inPropertyName: CFStringRef ): CFTypeRef; external name '_LSSharedFileListCopyProperty';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListSetProperty()
- *
- * Summary:
- * Set property by its name.
- *
- * Discussion:
- * Set lists named property as CFTypeRef object.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * inPropertyName:
- * Name of the property to return.
- *
- * inPropertyData:
- * Property data to set. Pass NULL to remove existing property.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListSetProperty( inList: LSSharedFileListRef; inPropertyName: CFStringRef; inPropertyData: CFTypeRef ): OSStatus; external name '_LSSharedFileListSetProperty';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListCopySnapshot()
- *
- * Summary:
- * Create snapshot array.
- *
- * Discussion:
- * Creates snapshot array, which is list of all items at the moment
- * LSSharedFileListCopySnapshot was called.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * outSnapshotSeed:
- * Returned seed value at which snapshot was taken.
- *
- * Result:
- * Immutable CFArray of LSSharedFileListItemRef values. Has to be
- * released with CFRelease when snapshot array is not needed anymore.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListCopySnapshot( inList: LSSharedFileListRef; var outSnapshotSeed: UInt32 ): CFArrayRef; external name '_LSSharedFileListCopySnapshot';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListInsertItemURL()
- *
- * Summary:
- * Insert item into shared list.
- *
- * Discussion:
- * Inserts item into shared list at specified location. If the item
- * already exists in the list it will be moved and its icon, display
- * name and properties will be updated.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * insertAfterThisItem:
- * Item after which new item has to be inserted. To insert at the
- * beginning of the list use kLSSharedFileListItemBeforeFirst or
- * to insert at the end of the list use kLSSharedFileListItemLast.
- *
- * inDisplayName:
- * Display name of the new item. Can be NULL.
- *
- * inIconRef:
- * Icon of the new item. Can be NULL.
- *
- * inURL:
- * URL of the new item.
- *
- * inPropertiesToSet:
- * CFDictionary of properties to set. Keys are property names and
- * values are property values. The property values are retained
- * and copied by the API. Can be NULL.
- *
- * inPropertiesToClear:
- * CFArray of property names to clear if item already exists. Can
- * be NULL.
- *
- * Result:
- * Reference to new item. Has to be released with CFRelease when the
- * item is not needed anymore.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListInsertItemURL( inList: LSSharedFileListRef; insertAfterThisItem: LSSharedFileListItemRef; inDisplayName: CFStringRef; inIconRef: IconRef; inURL: CFURLRef; inPropertiesToSet: CFDictionaryRef; inPropertiesToClear: CFArrayRef ): LSSharedFileListItemRef; external name '_LSSharedFileListInsertItemURL';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListInsertItemFSRef()
- *
- * Summary:
- * Insert item into shared list.
- *
- * Discussion:
- * Inserts item into shared list at specified location. If the item
- * already exists in the list it will be moved and its icon, display
- * name and properties will be updated.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * insertAfterThisItem:
- * Item after which new item has to be inserted. To insert at the
- * beginning of the list use kLSSharedFileListItemBeforeFirst or
- * to insert at the end of the list use kLSSharedFileListItemLast.
- *
- * inDisplayName:
- * Display name of the new item. Can be NULL.
- *
- * inIconRef:
- * Icon of the new item. Can be NULL.
- *
- * inFSRef:
- * FSRef of the new item.
- *
- * inPropertiesToSet:
- * CFDictionary of properties to set. Keys are property names and
- * values are property values. The property values are retained
- * and copied by the API. Can be NULL.
- *
- * inPropertiesToClear:
- * CFArray of property names to clear if item already exists. Can
- * be NULL.
- *
- * Result:
- * Reference to new item. Has to be released with CFRelease when the
- * item is not needed anymore.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListInsertItemFSRef( inList: LSSharedFileListRef; insertAfterThisItem: LSSharedFileListItemRef; inDisplayName: CFStringRef; inIconRef: IconRef; const (*var*) inFSRef: FSRef; inPropertiesToSet: CFDictionaryRef; inPropertiesToClear: CFArrayRef ): LSSharedFileListItemRef; external name '_LSSharedFileListInsertItemFSRef';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListItemMove()
- *
- * Summary:
- * Move item.
- *
- * Discussion:
- * Moves item at specified location.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * inItem:
- * Item to move.
- *
- * inMoveAfterItem:
- * New icon of the new item. Use kLSSharedFileListItemBeforeFirst
- * and kLSSharedFileListItemLast to move at the beginning or the
- * end of the shared list.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListItemMove( inList: LSSharedFileListRef; inItem: LSSharedFileListItemRef; inMoveAfterItem: LSSharedFileListItemRef ): OSStatus; external name '_LSSharedFileListItemMove';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListItemRemove()
- *
- * Summary:
- * Remove item from shared list.
- *
- * Discussion:
- * Removes item from shared list.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list reference.
- *
- * inItem:
- * Item to remove.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListItemRemove( inList: LSSharedFileListRef; inItem: LSSharedFileListItemRef ): OSStatus; external name '_LSSharedFileListItemRemove';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListRemoveAllItems()
- *
- * Summary:
- * Remove all items from shared list.
- *
- * Discussion:
- * Removes all items from shared list.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inList:
- * Shared list to clear.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListRemoveAllItems( inList: LSSharedFileListRef ): OSStatus; external name '_LSSharedFileListRemoveAllItems';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListItemGetID()
- *
- * Summary:
- * Obtain unique item id.
- *
- * Discussion:
- * Returns unique item id.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListItemGetID( inItem: LSSharedFileListItemRef ): UInt32; external name '_LSSharedFileListItemGetID';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListItemCopyIconRef()
- *
- * Summary:
- * Obtain item's icon.
- *
- * Discussion:
- * Returns icon ref for the item.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Result:
- * IconRef to the item. Caller is responsible to releasing it by
- * calling ReleaseIconRef().
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListItemCopyIconRef( inItem: LSSharedFileListItemRef ): IconRef; external name '_LSSharedFileListItemCopyIconRef';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListItemCopyDisplayName()
- *
- * Summary:
- * Obtain item's display name.
- *
- * Discussion:
- * Returns display name of the item. Caller is responsible to
- * releasing it by calling CFRelease().
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListItemCopyDisplayName( inItem: LSSharedFileListItemRef ): CFStringRef; external name '_LSSharedFileListItemCopyDisplayName';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListItemResolve()
- *
- * Summary:
- * Resolve LSSharedFileListItemRef's item and return its FSRef.
- *
- * Discussion:
- * Resolves LSSharedFileListItemRef's item and returns its FSRef.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Parameters:
- *
- * inItem:
- * Item to resolve.
- *
- * inFlags:
- * Resolution flags. Pass zero for default resolution flags.
- *
- * outURL:
- * CFURL of original item. Can be NULL. Returned valus has to be
- * released with CFRelease().
- *
- * outRef:
- * FSRef of original item. Can be NULL.
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListItemResolve( inItem: LSSharedFileListItemRef; inFlags: UInt32; var outURL: CFURLRef; var outRef: FSRef ): OSStatus; external name '_LSSharedFileListItemResolve';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListItemCopyProperty()
- *
- * Summary:
- * Obtain item's property by its name.
- *
- * Discussion:
- * Returns persistent item's property as CF object. Caller is
- * responsible to releasing it by calling CFRelease().
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListItemCopyProperty( inItem: LSSharedFileListItemRef; inPropertyName: CFStringRef ): CFTypeRef; external name '_LSSharedFileListItemCopyProperty';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {
- * LSSharedFileListItemSetProperty()
- *
- * Summary:
- * Set item property by its name.
- *
- * Discussion:
- * Sets persistent item property by its name.
- *
- * Mac OS X threading:
- * Thread safe since version 10.5
- *
- * Availability:
- * Mac OS X: in version 10.5 and later in CoreServices.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- function LSSharedFileListItemSetProperty( inItem: LSSharedFileListItemRef; inPropertyName: CFStringRef; inPropertyData: CFTypeRef ): OSStatus; external name '_LSSharedFileListItemSetProperty';
- (* __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA) *)
- {$endc} {TARGET_OS_MAC}
- {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
- end.
- {$endc} {not MACOSALLINCLUDE}
|