Something went wrong. Try again.
Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
4.9 kB · 218 lines
C
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219#ifdef __cplusplusextern "C" {#endif
#pragma pack(push, 2)
typedef CF_OPTIONS(OptionBits, LSRequestedInfo) { kLSRequestExtension = 0x00000001, kLSRequestTypeCreator = 0x00000002, kLSRequestBasicFlagsOnly = 0x00000004, kLSRequestAppTypeFlags = 0x00000008, kLSRequestAllFlags = 0x00000010, kLSRequestIconAndKind = 0x00000020, kLSRequestExtensionFlagsOnly = 0x00000040, kLSRequestAllInfo = (UInt32)0xFFFFFFFF};
typedef CF_OPTIONS(OptionBits, LSItemInfoFlags) { kLSItemInfoIsPlainFile = 0x00000001, kLSItemInfoIsPackage = 0x00000002, kLSItemInfoIsApplication = 0x00000004, kLSItemInfoIsContainer = 0x00000008, kLSItemInfoIsAliasFile = 0x00000010, kLSItemInfoIsSymlink = 0x00000020, kLSItemInfoIsInvisible = 0x00000040, kLSItemInfoIsNativeApp = 0x00000080, kLSItemInfoIsClassicApp = 0x00000100, kLSItemInfoAppPrefersNative = 0x00000200, kLSItemInfoAppPrefersClassic = 0x00000400, kLSItemInfoAppIsScriptable = 0x00000800, kLSItemInfoIsVolume = 0x00001000, kLSItemInfoExtensionIsHidden = 0x00100000};
typedef struct LSItemInfoRecord { LSItemInfoFlags flags; OSType filetype; OSType creator; CFStringRef extension;} LSItemInfoRecord;
extern OSStatusLSCopyItemInfoForURL( CFURLRef inURL, LSRequestedInfo inWhichInfo, LSItemInfoRecord * outItemInfo);
extern OSStatusLSCopyItemInfoForRef( const FSRef * inItemRef, LSRequestedInfo inWhichInfo, LSItemInfoRecord * outItemInfo);
extern OSStatusLSGetExtensionInfo( UniCharCount inNameLen, const UniChar inNameBuffer[], UniCharCount * outExtStartIndex);
extern OSStatusLSCopyDisplayNameForRef( const FSRef * inRef, CFStringRef * outDisplayName);
extern OSStatusLSCopyDisplayNameForURL( CFURLRef inURL, CFStringRef * outDisplayName);
extern OSStatusLSSetExtensionHiddenForRef( const FSRef * inRef, Boolean inHide);
extern OSStatusLSSetExtensionHiddenForURL( CFURLRef inURL, Boolean inHide);
extern OSStatusLSCopyKindStringForRef( const FSRef * inFSRef, CFStringRef * outKindString);
extern OSStatusLSCopyKindStringForURL( CFURLRef inURL, CFStringRef * outKindString);
extern OSStatusLSCopyKindStringForTypeInfo( OSType inType, OSType inCreator, CFStringRef inExtension, CFStringRef * outKindString);
extern OSStatusLSCopyKindStringForMIMEType( CFStringRef inMIMEType, CFStringRef * outKindString);
extern OSStatusLSGetApplicationForItem( const FSRef * inItemRef, LSRolesMask inRoleMask, FSRef * outAppRef, CFURLRef * outAppURL);
extern OSStatusLSGetApplicationForInfo( OSType inType, OSType inCreator, CFStringRef inExtension, LSRolesMask inRoleMask, FSRef * outAppRef, CFURLRef * outAppURL);
extern OSStatusLSCopyApplicationForMIMEType( CFStringRef inMIMEType, LSRolesMask inRoleMask, CFURLRef * outAppURL);
extern OSStatusLSGetApplicationForURL( CFURLRef inURL, LSRolesMask inRoleMask, FSRef * outAppRef, CFURLRef * outAppURL);
extern OSStatusLSFindApplicationForInfo( OSType inCreator, CFStringRef inBundleID, CFStringRef inName, FSRef * outAppRef, CFURLRef * outAppURL);
extern OSStatusLSCanRefAcceptItem( const FSRef * inItemFSRef, const FSRef * inTargetRef, LSRolesMask inRoleMask, LSAcceptanceFlags inFlags, Boolean * outAcceptsItem);
extern OSStatusLSRegisterFSRef( const FSRef * inRef, Boolean inUpdate);
extern const CFStringRef kLSItemContentType;extern const CFStringRef kLSItemFileType;extern const CFStringRef kLSItemFileCreator;extern const CFStringRef kLSItemExtension;extern const CFStringRef kLSItemDisplayName;extern const CFStringRef kLSItemDisplayKind;extern const CFStringRef kLSItemRoleHandlerDisplayName;extern const CFStringRef kLSItemIsInvisible;extern const CFStringRef kLSItemExtensionIsHidden;extern const CFStringRef kLSItemQuarantineProperties;
extern OSStatusLSCopyItemAttribute( const FSRef * inItem, LSRolesMask inRoles, CFStringRef inAttributeName, CFTypeRef * outValue);
extern OSStatusLSCopyItemAttributes( const FSRef * inItem, LSRolesMask inRoles, CFArrayRef inAttributeNames, CFDictionaryRef * outValues);
extern OSStatusLSSetItemAttribute( const FSRef * inItem, LSRolesMask inRoles, CFStringRef inAttributeName, CFTypeRef inValue);
typedef CF_OPTIONS(OptionBits, LSHandlerOptions) { kLSHandlerOptionsDefault = 0, kLSHandlerOptionsIgnoreCreator = 1};
extern LSHandlerOptionsLSGetHandlerOptionsForContentType(CFStringRef inContentType);
extern OSStatusLSSetHandlerOptionsForContentType( CFStringRef inContentType, LSHandlerOptions inOptions);
extern CFArrayRefLSCopyAllHandlersForURLScheme( CFStringRef inURLScheme);
extern CFArrayRefLSCopyAllRoleHandlersForContentType( CFStringRef inContentType, LSRolesMask inRole);
extern CFStringRefLSCopyDefaultHandlerForURLScheme( CFStringRef inURLScheme);
#pragma pack(pop)
#ifdef __cplusplus}#endif