]> gitweb @ CieloNegro.org - bindings-CarbonCore.git/commitdiff
Files.h
authorPHO <pho@cielonegro.org>
Thu, 14 Oct 2010 15:11:47 +0000 (00:11 +0900)
committerPHO <pho@cielonegro.org>
Thu, 14 Oct 2010 15:11:47 +0000 (00:11 +0900)
Bindings/CoreServices/CarbonCore/Files.hsc
Bindings/CoreServices/CarbonCore/Finder.hsc [new file with mode: 0644]
bindings-carbon-core.cabal
cbits/helper_files.c [new file with mode: 0644]

index 03b03b058f915709df338c0d393abc3424d8379d..df6bdcd0b108a20689fcbff498847bba1330b07c 100644 (file)
@@ -4,6 +4,7 @@
 
 module Bindings.CoreServices.CarbonCore.Files where
 #strict_import
+import Bindings.CoreServices.CarbonCore.Finder
 import Bindings.CoreServices.CarbonCore.MacTypes
 
 #starttype struct HFSUniStr255
@@ -1444,3 +1445,501 @@ import Bindings.CoreServices.CarbonCore.MacTypes
 #ccall FSCloseFork          , <FSIORefNum> -> IO <OSErr>
 #ccall PBCloseForkSync      , Ptr <FSForkIOParam> -> IO <OSErr>
 #ccall PBCloseForkAsync     , Ptr <FSForkIOParam> -> IO ()
+#ccall FSGetForkCBInfo      , <FSIORefNum> -> <FSVolumeRefNum> -> Ptr CShort -> Ptr <FSIORefNum> -> Ptr <FSForkInfo> -> Ptr <FSRef> -> Ptr <HFSUniStr255> -> IO <OSErr>
+#ccall PBGetForkCBInfoSync  , Ptr <FSForkCBInfoParam> -> IO <OSErr>
+#ccall PBGetForkCBInfoAsync , Ptr <FSForkCBInfoParam> -> IO ()
+#ccall FSLockRange          , <FSIORefNum> -> <UInt16> -> <SInt64> -> <UInt64> -> Ptr <UInt64> -> IO <OSErr>
+#ccall PBXLockRangeSync     , <FSRangeLockParamPtr> -> IO <OSErr>
+#ccall PBXLockRangeAsync    , <FSRangeLockParamPtr> -> IO <OSStatus>
+#ccall FSUnlockRange        , <FSIORefNum> -> <UInt16> -> <SInt64> -> <UInt64> -> Ptr <UInt64> -> IO <OSStatus>
+#ccall PBXUnlockRangeSync   , <FSRangeLockParamPtr> -> IO <OSStatus>
+#ccall PBXUnlockRangeAsync  , <FSRangeLockParamPtr> -> IO <OSStatus>
+#ccall FSGetVolumeInfo      , <FSVolumeRefNum> -> <ItemCount> -> Ptr <FSVolumeRefNum> -> <FSVolumeInfoBitmap> -> Ptr <FSVolumeInfo> -> Ptr <HFSUniStr255> -> Ptr <FSRef> -> IO <OSErr>
+#ccall PBGetVolumeInfoSync  , Ptr <FSVolumeInfoParam> -> IO <OSErr>
+#ccall PBGetVolumeInfoAsync , Ptr <FSVolumeInfoParam> -> IO ()
+#ccall FSSetVolumeInfo      , <FSVolumeRefNum> -> <FSVolumeInfoBitmap> -> Ptr <FSVolumeInfo> -> IO <OSErr>
+#ccall PBSetVolumeInfoSync  , Ptr <FSVolumeInfoParam> -> IO <OSErr>
+#ccall PBSetVolumeInfoAsync , Ptr <FSVolumeInfoParam> -> IO ()
+#ccall FSGetDataForkName    , Ptr <HFSUniStr255> -> IO <OSErr>
+#ccall FSGetResourceForkName, Ptr <HFSUniStr255> -> IO <OSErr>
+#ccall FSRefMakePath        , Ptr <FSRef> -> Ptr <UInt8> -> <UInt32> -> IO <OSStatus>
+#ccall FSPathMakeRef        , Ptr <UInt8> -> Ptr <FSRef> -> Ptr <Boolean> -> IO <OSStatus>
+
+#num kFSPathMakeRefDefaultOptions
+#num kFSPathMakeRefDoNotFollowLeafSymlink
+
+#ccall FSPathMakeRefWithOptions, Ptr <UInt8> -> <OptionBits> -> Ptr <FSRef> -> Ptr <Boolean> -> IO <OSStatus>
+#ccall FSIsFSRefValid          , Ptr <FSRef> -> IO <Boolean>
+
+#synonym_t FNMessage, <UInt32>
+#num kFNDirectoryModifiedMessage
+
+#ccall FNNotify      , Ptr <FSRef> -> <FNMessage> -> <OptionBits> -> IO <OSStatus>
+#ccall FNNotifyByPath, Ptr <UInt8> -> <FNMessage> -> <OptionBits> -> IO <OSStatus>
+#ccall FNNotifyAll   , <FNMessage> -> <OptionBits> -> IO <OSStatus>
+
+#opaque_t  OpaqueFNSubscriptionRef
+#synonym_t FNSubscriptionRef, Ptr <OpaqueFNSubscriptionRef>
+
+#num kFNNoImplicitAllSubscription
+#num kFNNotifyInBackground
+
+#callback  FNSubscriptionProcPtr, <FNMessage> -> <OptionBits> -> Ptr () -> <FNSubscriptionRef> -> IO ()
+#synonym_t FNSubscriptionUPP    , <FNSubscriptionProcPtr>
+
+#ccall FNSubscribe      , Ptr <FSRef> -> <FNSubscriptionUPP> -> Ptr () -> <OptionBits> -> Ptr <FNSubscriptionRef> -> IO <OSStatus>
+#ccall FNSubscribeByPath, Ptr <UInt8> -> <FNSubscriptionUPP> -> Ptr () -> <OptionBits> -> Ptr <FNSubscriptionRef> -> IO <OSStatus>
+#ccall FNUnsubscribe    , <FNSubscriptionRef> -> IO <OSStatus>
+#ccall FNGetDirectoryForSubscription, <FNSubscriptionRef> -> Ptr <FSRef> -> IO <OSStatus>
+
+#num kAsyncMountInProgress
+#num kAsyncMountComplete
+#num kAsyncUnmountInProgress
+#num kAsyncUnmountComplete
+#num kAsyncEjectInProgress
+#num kAsyncEjectComplete
+
+#synonym_t FSMountStatus    , <UInt32>
+#synonym_t FSEjectStatus    , <UInt32>
+#synonym_t FSUnmountStatus  , <UInt32>
+#opaque_t  OpaqueFSVolumeOperation
+#synonym_t FSVolumeOperation     , Ptr <OpaqueFSVolumeOperation>
+#callback  FSVolumeMountProcPtr  , <FSVolumeOperation> -> Ptr () -> <OSStatus> -> <FSVolumeRefNum> -> IO ()
+#callback  FSVolumeUnmountProcPtr, <FSVolumeOperation> -> Ptr () -> <OSStatus> -> <FSVolumeRefNum> -> CPid -> IO ()
+#callback  FSVolumeEjectProcPtr  , <FSVolumeOperation> -> Ptr () -> <OSStatus> -> <FSVolumeRefNum> -> CPid -> IO ()
+#synonym_t FSVolumeMountUPP      , <FSVolumeMountProcPtr>
+#synonym_t FSVolumeUnmountUPP    , <FSVolumeUnmountProcPtr>
+#synonym_t FSVolumeEjectUPP      , <FSVolumeEjectProcPtr>
+
+#num kFSMountServerMarkDoNotDisplay
+#num kFSMountServerMountOnMountDir
+#num kFSMountServerMountWithoutNotification
+#num kFSEjectVolumeForceEject
+#num kFSUnmountVolumeForceUnmount
+
+#ccall FSCreateVolumeOperation , Ptr <FSVolumeOperation> -> IO <OSStatus>
+#ccall FSDisposeVolumeOperation, <FSVolumeOperation> -> IO <OSStatus>
+#ccall FSMountLocalVolumeSync  , <CFStringRef> -> <CFURLRef> -> Ptr <FSVolumeRefNum> -> <OptionBits> -> IO <OSStatus>
+#ccall FSMountLocalVolumeAsync , <CFStringRef> -> <CFURLRef> -> <FSVolumeOperation> -> Ptr () -> <OptionBits> -> <FSVolumeMountUPP> -> <CFRunLoopRef> -> <CFStringRef> -> IO <OSStatus>
+#ccall FSMountServerVolumeSync , <CFURLRef> -> <CFURLRef> -> <CFStringRef> -> <CFStringRef> -> Ptr <FSVolumeRefNum> -> <OptionBits> -> IO <OSStatus>
+#ccall FSMountServerVolumeAsync, <CFURLRef> -> <CFURLRef> -> <CFStringRef> -> <CFStringRef> -> <FSVolumeOperation> -> Ptr () -> <OptionBits> -> <FSVolumeMountUPP> -> <CFRunLoopRef> -> <CFStringRef> -> IO <OSStatus>
+#ccall FSGetAsyncMountStatus   , <FSVolumeOperation> -> Ptr <FSMountStatus> -> Ptr <OSStatus> -> Ptr <FSVolumeRefNum> -> Ptr (Ptr ()) -> IO <OSStatus>
+#ccall FSUnmountVolumeSync     , <FSVolumeRefNum> -> <OptionBits> -> Ptr CPid -> IO <OSStatus>
+#ccall FSUnmountVolumeAsync    , <FSVolumeRefNum> -> <OptionBits> -> <FSVolumeOperation> -> Ptr () -> <FSVolumeUnmountUPP> -> <CFRunLoopRef> -> <CFStringRef> -> IO <OSStatus>
+#ccall FSGetAsyncUnmountStatus , <FSVolumeOperation> -> Ptr <FSUnmountStatus> -> Ptr <OSStatus> -> Ptr <FSVolumeRefNum> -> Ptr CPid -> Ptr (Ptr ()) -> IO <OSStatus>
+#ccall FSCancelVolumeOperation , <FSVolumeOperation> -> IO <OSStatus>
+#ccall FSEjectVolumeSync       , <FSVolumeRefNum> -> <OptionBits> -> Ptr CPid -> IO <OSStatus>
+#ccall FSEjectVolumeAsync      , <FSVolumeRefNum> -> <OptionBits> -> <FSVolumeOperation> -> Ptr () -> <FSVolumeEjectUPP> -> <CFRunLoopRef> -> <CFStringRef> -> IO <OSStatus>
+#ccall FSGetAsyncEjectStatus   , <FSVolumeOperation> -> Ptr <FSEjectStatus> -> Ptr <OSStatus> -> Ptr <FSVolumeRefNum> -> Ptr CPid -> Ptr (Ptr ()) -> IO <OSStatus>
+#ccall FSCopyDiskIDForVolume   , <FSVolumeRefNum> -> Ptr <CFStringRef> -> IO <OSStatus>
+#ccall FSCopyURLForVolume      , <FSVolumeRefNum> -> Ptr <CFURLRef> -> IO <OSStatus>
+#ccall FSGetVolumeForDiskID    , <CFStringRef> -> Ptr <FSVolumeRefNum> -> IO <OSStatus>
+#ccall FSCopyDADiskForVolume   , <FSVolumeRefNum> -> Ptr <DADiskRef> -> IO <OSStatus>
+#ccall FSGetVolumeForDADisk    , <DADiskRef> -> Ptr <FSVolumeRefNum> -> IO <OSStatus>
+
+#opaque_t  __FSFileOperation
+#synonym_t FSFileOperationRef  , Ptr <__FSFileOperation>
+#synonym_t FSFileOperationStage, <UInt32>
+
+#starttype struct FSFileOperationClientContext
+#  field version, <CFIndex>
+#  field info   , Ptr ()
+#  field retain , <CFAllocatorRetainCallBack>
+#  field release, <CFAllocatorReleaseCallBack>
+#  field copyDescription, <CFAllocatorCopyDescriptionCallBack>
+#stoptype
+
+#callback FSFileOperationStatusProcPtr    , <FSFileOperationRef> -> Ptr <FSRef> -> <FSFileOperationStage> -> <OSStatus> -> <CFDictionaryRef> -> Ptr () -> IO ()
+#callback FSPathFileOperationStatusProcPtr, <FSFileOperationRef> -> Ptr CChar -> <FSFileOperationStage> -> <OSStatus> -> <CFDictionaryRef> -> Ptr () -> IO ()
+
+#num kFSFileOperationDefaultOptions
+#num kFSFileOperationOverwrite
+#num kFSFileOperationSkipSourcePermissionErrors
+#num kFSFileOperationDoNotMoveAcrossVolumes
+#num kFSFileOperationSkipPreflight
+
+#num kFSOperationStageUndefined
+#num kFSOperationStagePreflighting
+#num kFSOperationStageRunning
+#num kFSOperationStageComplete
+
+#cinline kFSOperationTotalBytesKey      , IO <CFStringRef>
+#cinline kFSOperationBytesCompleteKey   , IO <CFStringRef>
+#cinline kFSOperationBytesRemainingKey  , IO <CFStringRef>
+#cinline kFSOperationTotalObjectsKey    , IO <CFStringRef>
+#cinline kFSOperationObjectsCompleteKey , IO <CFStringRef>
+#cinline kFSOperationObjectsRemainingKey, IO <CFStringRef>
+#cinline kFSOperationTotalUserVisibleObjectsKey    , IO <CFStringRef>
+#cinline kFSOperationUserVisibleObjectsCompleteKey , IO <CFStringRef>
+#cinline kFSOperationUserVisibleObjectsRemainingKey, IO <CFStringRef>
+#cinline kFSOperationThroughputKey      , IO <CFStringRef>
+
+#ccall FSCopyObjectSync       , Ptr <FSRef> -> Ptr <FSRef> -> <CFStringRef> -> Ptr <FSRef> -> <OptionBits> -> IO <OSStatus>
+#ccall FSMoveObjectSync       , Ptr <FSRef> -> Ptr <FSRef> -> <CFStringRef> -> Ptr <FSRef> -> <OptionBits> -> IO <OSStatus>
+#ccall FSMoveObjectToTrashSync, Ptr <FSRef> -> Ptr <FSRef> -> <OptionBits> -> IO <OSStatus>
+#ccall FSPathCopyObjectSync   , Ptr CChar -> Ptr CChar -> <CFStringRef> -> Ptr (Ptr CChar) -> <OptionBits> -> IO <OSStatus>
+#ccall FSPathMoveObjectSync   , Ptr CChar -> Ptr CChar -> <CFStringRef> -> Ptr (Ptr CChar) -> <OptionBits> -> IO <OSStatus>
+#ccall FSPathMoveObjectToTrashSync, Ptr CChar -> Ptr (Ptr CChar) -> <OptionBits> -> IO <OSStatus>
+#ccall FSFileOperationGetTypeID   , IO <CFTypeID>
+#ccall FSFileOperationCreate  , <CFAllocatorRef> -> IO <FSFileOperationRef>
+#ccall FSFileOperationScheduleWithRunLoop  , <FSFileOperationRef> -> <CFRunLoopRef> -> <CFStringRef> -> IO <OSStatus>
+#ccall FSFileOperationUnscheduleFromRunLoop, <FSFileOperationRef> -> <CFRunLoopRef> -> <CFStringRef> -> IO <OSStatus>
+#ccall FSCopyObjectAsync      , <FSFileOperationRef> -> Ptr <FSRef> -> Ptr <FSRef> -> <CFStringRef> -> <OptionBits> -> <FSFileOperationStatusProcPtr> -> <CFTimeInterval> -> Ptr <FSFileOperationClientContext> -> IO <OSStatus>
+#ccall FSMoveObjectAsync      , <FSFileOperationRef> -> Ptr <FSRef> -> Ptr <FSRef> -> <CFStringRef> -> <OptionBits> -> <FSFileOperationStatusProcPtr> -> <CFTimeInterval> -> Ptr <FSFileOperationClientContext> -> IO <OSStatus>
+#ccall FSMoveObjectToTrashAsync, <FSFileOperationRef> -> Ptr <FSRef> -> <OptionBits> -> <FSFileOperationStatusProcPtr> -> <CFTimeInterval> -> Ptr <FSFileOperationClientContext> -> IO <OSStatus>
+#ccall FSPathCopyObjectAsync  , <FSFileOperationRef> -> Ptr CChar -> Ptr CChar -> <CFStringRef> -> <OptionBits> -> <FSPathFileOperationStatusProcPtr> -> <CFTimeInterval> -> Ptr <FSFileOperationClientContext> -> IO <OSStatus>
+#ccall FSPathMoveObjectAsync  , <FSFileOperationRef> -> Ptr CChar -> Ptr CChar -> <CFStringRef> -> <OptionBits> -> <FSPathFileOperationStatusProcPtr> -> <CFTimeInterval> -> Ptr <FSFileOperationClientContext> -> IO <OSStatus>
+#ccall FSPathMoveObjectToTrashAsync, <FSFileOperationRef> -> Ptr CChar -> <OptionBits> -> <FSPathFileOperationStatusProcPtr> -> <CFTimeInterval> -> Ptr <FSFileOperationClientContext> -> IO <OSStatus>
+#ccall FSFileOperationCancel  , <FSFileOperationRef> -> IO <OSStatus>
+#ccall FSFileOperationCopyStatus    , <FSFileOperationRef> -> Ptr <FSRef> -> Ptr <FSFileOperationStage> -> Ptr <OSStatus> -> Ptr <CFDictionaryRef> -> Ptr (Ptr ()) -> IO <OSStatus>
+#ccall FSPathFileOperationCopyStatus, <FSFileOperationRef> -> Ptr (Ptr CChar) -> Ptr <FSFileOperationStage> -> Ptr <OSStatus> -> Ptr <CFDictionaryRef> -> Ptr (Ptr ()) -> IO <OSStatus>
+#ccall FSCreateStringFromHFSUniStr  , <CFAllocatorRef> -> Ptr <HFSUniStr255> -> IO <CFStringRef>
+#ccall FSGetHFSUniStrFromString     , <CFStringRef> -> Ptr <HFSUniStr255> -> IO <OSStatus>
+#ccall FSFileSecurityGetTypeID      , IO <CFTypeID>
+#ccall FSFileSecurityCreate         , <CFAllocatorRef> -> IO <FSFileSecurityRef>
+#ccall FSFileSecurityCreateWithFSPermissionInfo, <CFAllocatorRef> -> Ptr <FSPermissionInfo> -> IO <FSFileSecurityRef>
+#ccall FSFileSecurityRefCreateCopy  , <CFAllocatorRef> -> <FSFileSecurityRef> -> IO <FSFileSecurityRef>
+#ccall FSFileSecurityGetOwnerUUID   , <FSFileSecurityRef> -> Ptr <CFUUIDBytes> -> IO <OSStatus>
+#ccall FSFileSecuritySetOwnerUUID   , <FSFileSecurityRef> -> Ptr <CFUUIDBytes> -> IO <OSStatus>
+#ccall FSFileSecurityGetGroupUUID   , <FSFileSecurityRef> -> Ptr <CFUUIDBytes> -> IO <OSStatus>
+#ccall FSFileSecuritySetGroupUUID   , <FSFileSecurityRef> -> Ptr <CFUUIDBytes> -> IO <OSStatus>
+#ccall FSFileSecurityCopyAccessControlList, <FSFileSecurityRef> -> <acl_t> -> IO <OSStatus>
+#ccall FSFileSecuritySetAccessControlList , <FSFileSecurityRef> -> <acl_t> -> IO <OSStatus>
+#ccall FSFileSecurityGetOwner       , <FSFileSecurityRef> -> Ptr <UInt32> -> IO <OSStatus>
+#ccall FSFileSecuritySetOwner       , <FSFileSecurityRef> -> <UInt32> -> IO <OSStatus>
+#ccall FSFileSecurityGetGroup       , <FSFileSecurityRef> -> Ptr <UInt32> -> IO <OSStatus>
+#ccall FSFileSecuritySetGroup       , <FSFileSecurityRef> -> <UInt32> -> IO <OSStatus>
+#ccall FSFileSecurityGetMode        , <FSFileSecurityRef> -> Ptr <UInt16> -> IO <OSStatus>
+#ccall FSFileSecuritySetMode        , <FSFileSecurityRef> -> <UInt16> -> IO <OSStatus>
+
+#num pleaseCacheBit
+#num pleaseCacheMask
+#num noCacheBit
+#num noCacheMask
+#num rdVerifyBit
+#num rdVerifyMask
+#num rdVerify
+#num forceReadBit
+#num forceReadMask
+#num newLineBit
+#num newLineMask
+#num newLineCharMask
+
+#num kOwnerID2Name
+#num kGroupID2Name
+#num kOwnerName2ID
+#num kGroupName2ID
+#num kReturnNextUser
+#num kReturnNextGroup
+#num kReturnNextUG
+
+#num kVCBFlagsIdleFlushBit
+#num kVCBFlagsIdleFlushMask
+#num kVCBFlagsHFSPlusAPIsBit
+#num kVCBFlagsHFSPlusAPIsMask
+#num kVCBFlagsHardwareGoneBit
+#num kVCBFlagsHardwareGoneMask
+#num kVCBFlagsVolumeDirtyBit
+#num kVCBFlagsVolumeDirtyMask
+
+#num kioVAtrbDefaultVolumeBit
+#num kioVAtrbDefaultVolumeMask
+#num kioVAtrbFilesOpenBit
+#num kioVAtrbFilesOpenMask
+#num kioVAtrbHardwareLockedBit
+#num kioVAtrbHardwareLockedMask
+#num kioVAtrbSoftwareLockedBit
+#num kioVAtrbSoftwareLockedMask
+
+#num kioFlAttribLockedBit
+#num kioFlAttribLockedMask
+#num kioFlAttribResOpenBit
+#num kioFlAttribResOpenMask
+#num kioFlAttribDataOpenBit
+#num kioFlAttribDataOpenMask
+#num kioFlAttribDirBit
+#num kioFlAttribDirMask
+#num ioDirFlg
+#num ioDirMask
+#num kioFlAttribCopyProtBit
+#num kioFlAttribCopyProtMask
+#num kioFlAttribFileOpenBit
+#num kioFlAttribFileOpenMask
+#num kioFlAttribInSharedBit
+#num kioFlAttribInSharedMask
+#num kioFlAttribMountedBit
+#num kioFlAttribMountedMask
+#num kioFlAttribSharePointBit
+#num kioFlAttribSharePointMask
+
+#num kioFCBWriteBit
+#num kioFCBWriteMask
+#num kioFCBResourceBit
+#num kioFCBResourceMask
+#num kioFCBWriteLockedBit
+#num kioFCBWriteLockedMask
+#num kioFCBLargeFileBit
+#num kioFCBLargeFileMask
+#num kioFCBSharedWriteBit
+#num kioFCBSharedWriteMask
+#num kioFCBFileLockedBit
+#num kioFCBFileLockedMask
+#num kioFCBOwnClumpBit
+#num kioFCBOwnClumpMask
+#num kioFCBModifiedBit
+#num kioFCBModifiedMask
+
+#num kioACUserNoSeeFolderBit
+#num kioACUserNoSeeFolderMask
+#num kioACUserNoSeeFilesBit
+#num kioACUserNoSeeFilesMask
+#num kioACUserNoMakeChangesBit
+#num kioACUserNoMakeChangesMask
+#num kioACUserNotOwnerBit
+#num kioACUserNotOwnerMask
+
+#num kioACAccessOwnerBit
+#num kioACAccessOwnerMask
+#num kioACAccessBlankAccessBit
+#num kioACAccessBlankAccessMask
+#num kioACAccessUserWriteBit
+#num kioACAccessUserWriteMask
+#num kioACAccessUserReadBit
+#num kioACAccessUserReadMask
+#num kioACAccessUserSearchBit
+#num kioACAccessUserSearchMask
+#num kioACAccessEveryoneWriteBit
+#num kioACAccessEveryoneWriteMask
+#num kioACAccessEveryoneReadBit
+#num kioACAccessEveryoneReadMask
+#num kioACAccessEveryoneSearchBit
+#num kioACAccessEveryoneSearchMask
+#num kioACAccessGroupWriteBit
+#num kioACAccessGroupWriteMask
+#num kioACAccessGroupReadBit
+#num kioACAccessGroupReadMask
+#num kioACAccessGroupSearchBit
+#num kioACAccessGroupSearchMask
+#num kioACAccessOwnerWriteBit
+#num kioACAccessOwnerWriteMask
+#num kioACAccessOwnerReadBit
+#num kioACAccessOwnerReadMask
+#num kioACAccessOwnerSearchBit
+#num kioACAccessOwnerSearchMask
+#num kfullPrivileges
+#num kownerPrivileges
+
+#ccall FSGetVolumeParms        , <FSVolumeRefNum> -> Ptr <GetVolParmsInfoBuffer> -> <ByteCount> -> IO <OSStatus>
+#ccall FSGetVolumeMountInfoSize, <FSVolumeRefNum> -> Ptr <ByteCount> -> IO <OSStatus>
+#ccall FSGetVolumeMountInfo    , <FSVolumeRefNum> -> <BytePtr> -> <ByteCount> -> Ptr <ByteCount> -> IO <OSStatus>
+#ccall FSVolumeMount           , <BytePtr> -> Ptr <FSVolumeRefNum> -> IO <OSStatus>
+#ccall FSFlushVolume           , <FSVolumeRefNum> -> IO <OSStatus>
+#ccall PBFlushVolumeSync       , <FSRefParamPtr> -> IO <OSStatus>
+#ccall PBFlushVolumeAsync      , <FSRefParamPtr> -> IO <OSStatus>
+#ccall PBFSCopyFileSync        , <FSRefParamPtr> -> IO <OSStatus>
+#ccall PBFSCopyFileAsync       , <FSRefParamPtr> -> IO <OSStatus>
+#ccall FSResolveNodeID         , <FSVolumeRefNum> -> <UInt32> -> <FSRefPtr> -> IO <OSStatus>
+#ccall PBFSResolveNodeIDSync   , <FSRefParamPtr> -> IO <OSStatus>
+#ccall PBFSResolveNodeIDAsync  , <FSRefParamPtr> -> IO <OSStatus>
+
+#if !__LP64__
+#  ccall FSpMakeFSRef    , Ptr <FSSpec> -> Ptr <FSRef> -> IO <OSErr>
+#  ccall PBMakeFSRefSync , Ptr <FSRefParam> -> IO <OSErr>
+#  ccall PBMakeFSRefAsync, Ptr <FSRefParam> -> IO ()
+#  ccall PBCloseSync     , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBCloseAsync    , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBReadSync      , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBReadAsync     , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBWriteSync     , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBWriteAsync    , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBWaitIOComplete, <ParmBlkPtr> -> <Duration> -> IO <OSErr>
+#  ccall PBHGetVolParmsSync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHGetVolParmsAsync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetVolMountInfoSize, <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetVolMountInfo    , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBVolumeMount        , <ParmBlkPtr> -> IO <OSErr>
+#  ccall FlushVol             , <ConstStr63Param> -> <FSVolumeRefNum> -> IO <OSErr>
+#  ccall PBFlushVolSync       , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBFlushVolAsync      , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenDenySync      , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenDenyAsync     , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenRFDenySync    , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenRFDenyAsync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHGetDirAccessSync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHGetDirAccessAsync , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHSetDirAccessSync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHSetDirAccessAsync , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHMapIDSync         , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHMapIDAsync        , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHMapNameSync       , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHMapNameAsync      , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHCopyFileSync      , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHCopyFileAsync     , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBCreateFileIDRefSync, <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBCreateFileIDRefAsync , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBResolveFileIDRefSync , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBResolveFileIDRefAsync, <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBDeleteFileIDRefSync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBDeleteFileIDRefAsync , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBXGetVolInfoSync    , <XVolumeParamPtr> -> IO <OSErr>
+#  ccall PBXGetVolInfoAsync   , <XVolumeParamPtr> -> IO <OSErr>
+#  ccall PBAllocateSync       , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBAllocateAsync      , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetEOFSync         , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetEOFAsync        , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBSetEOFSync         , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBSetEOFAsync        , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetFPosSync        , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetFPosAsync       , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBSetFPosSync        , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBSetFPosAsync       , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBFlushFileSync      , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBFlushFileAsync     , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBUnmountVol         , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBCatSearchSync      , <CSParamPtr> -> IO <OSErr>
+#  ccall PBCatSearchAsync     , <CSParamPtr> -> IO <OSErr>
+#  ccall UnmountVol, <ConstStr63Param> -> <FSVolumeRefNum> -> IO <OSErr>
+#  ccall HSetVol   , <ConstStr63Param> -> <FSVolumeRefNum> -> <SInt32> -> IO <OSErr>
+#  ccall FSClose   , <FSIORefNum> -> IO <OSErr>
+#  ccall FSRead    , <FSIORefNum> -> Ptr <SInt32> -> Ptr () -> IO <OSErr>
+#  ccall FSWrite   , <FSIORefNum> -> Ptr <SInt32> -> Ptr () -> IO <OSErr>
+#  ccall Allocate  , <FSIORefNum> -> Ptr <SInt32> -> IO <OSErr>
+#  ccall GetEOF    , <FSIORefNum> -> Ptr <SInt32> -> IO <OSErr>
+#  ccall SetEOF    , <FSIORefNum> -> <SInt32> -> IO <OSErr>
+#  ccall GetFPos   , <FSIORefNum> -> Ptr <SInt32> -> IO <OSErr>
+#  ccall SetFPos   , <FSIORefNum> -> <SInt16> -> <SInt32> -> IO <OSErr>
+#  ccall GetVRefNum, <FSIORefNum> -> Ptr <FSVolumeRefNum> -> IO <OSErr>
+#  ccall PBLockRangeSync   , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBLockRangeAsync  , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBUnlockRangeSync , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBUnlockRangeAsync, <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBHSetVolSync     , <WDPBPtr> -> IO <OSErr>
+#  ccall PBHSetVolAsync    , <WDPBPtr> -> IO <OSErr>
+#  ccall PBHGetVolSync     , <WDPBPtr> -> IO <OSErr>
+#  ccall PBHGetVolAsync    , <WDPBPtr> -> IO <OSErr>
+#  ccall PBCatMoveSync     , <CMovePBPtr> -> IO <OSErr>
+#  ccall PBCatMoveAsync    , <CMovePBPtr> -> IO <OSErr>
+#  ccall PBDirCreateSync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBDirCreateAsync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetFCBInfoSync  , <FCBPBPtr> -> IO <OSErr>
+#  ccall PBGetFCBInfoAsync , <FCBPBPtr> -> IO <OSErr>
+#  ccall PBGetCatInfoSync  , <CInfoPBPtr> -> IO <OSErr>
+#  ccall PBGetCatInfoAsync , <CInfoPBPtr> -> IO <OSErr>
+#  ccall PBSetCatInfoSync  , <CInfoPBPtr> -> IO <OSErr>
+#  ccall PBSetCatInfoAsync , <CInfoPBPtr> -> IO <OSErr>
+#  ccall PBAllocContigSync , <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBAllocContigAsync, <ParmBlkPtr> -> IO <OSErr>
+#  ccall PBSetVInfoSync    , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBSetVInfoAsync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHGetVInfoSync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHGetVInfoAsync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenSync       , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenAsync      , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenRFSync     , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenRFAsync    , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenDFSync     , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHOpenDFAsync    , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHCreateSync     , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHCreateAsync    , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHDeleteSync     , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHDeleteAsync    , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHRenameSync     , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHRenameAsync    , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHRstFLockSync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHRstFLockAsync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHSetFLockSync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHSetFLockAsync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHGetFInfoSync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHGetFInfoAsync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHSetFInfoSync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHSetFInfoAsync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBMakeFSSpecSync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBMakeFSSpecAsync , <HParmBlkPtr> -> IO <OSErr>
+#  ccall HGetVol    , <StringPtr> -> Ptr <FSVolumeRefNum> -> Ptr <SInt32> -> IO <OSErr>
+#  ccall HOpen      , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> <SInt8> -> Ptr <FSIORefNum> -> IO <OSErr>
+#  ccall HOpenDF    , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> <SInt8> -> Ptr <FSIORefNum> -> IO <OSErr>
+#  ccall HOpenRF    , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> <SInt8> -> Ptr <FSIORefNum> -> IO <OSErr>
+#  ccall AllocContig, <FSVolumeRefNum> -> Ptr <SInt32> -> IO <OSErr>
+#  ccall HCreate    , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> <OSType> -> <OSType> -> IO <OSErr>
+#  ccall DirCreate  , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> Ptr <SInt32> -> IO <OSErr>
+#  ccall HDelete    , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> IO <OSErr>
+#  ccall HGetFInfo  , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> Ptr <FInfo> -> IO <OSErr>
+#  ccall HSetFInfo  , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> Ptr <FInfo> -> IO <OSErr>
+#  ccall HSetFLock  , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> Ptr <OSErr>
+#  ccall HRstFLock  , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> Ptr <OSErr>
+#  ccall HRename    , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> <ConstStr255Param> -> IO <OSErr>
+#  ccall CatMove    , <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> <SInt32> -> <ConstStr255Param> -> IO <OSErr>
+#  ccall PBHGetLogInInfoSync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHGetLogInInfoAsync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHMoveRenameSync     , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBHMoveRenameAsync    , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetXCatInfoSync     , <XCInfoPBPtr> -> IO <OSErr>
+#  ccall PBGetXCatInfoAsync    , <XCInfoPBPtr> -> IO <OSErr>
+#  ccall PBExchangeFilesSync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBExchangeFilesAsync  , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetForeignPrivsSync , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetForeignPrivsAsync, <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBSetForeignPrivsSync , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBSetForeignPrivsAsync, <HParmBlkPtr> -> IO <OSErr>
+#endif
+
+#if !__LP64__
+#  num kLargeIcon
+#  num kLarge4BitIcon
+#  num kLarge8BitIcon
+#  num kSmallIcon
+#  num kSmall4BitIcon
+#  num kSmall8BitIcon
+#  num kicnsIconFamily
+#endif
+
+#if !__LP64__
+#  ccall PBDTGetPath     , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTCloseDown   , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTAddIconSync , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTAddIconAsync, <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetIconSync , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetIconAsync, <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetIconInfoSync , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetIconInfoAsync, <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTAddAPPLSync     , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTAddAPPLAsync    , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTRemoveAPPLSync  , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTRemoveAPPLAsync , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetAPPLSync     , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetAPPLAsync    , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTSetCommentSync  , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTSetCommentAsync , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTRemoveCommentSync , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTRemoveCommentAsync, <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetCommentSync  , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetCommentAsync , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTFlushSync       , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTFlushAsync      , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTResetSync       , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTResetAsync      , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetInfoSync     , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTGetInfoAsync    , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTOpenInform      , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTDeleteSync      , <DTPBPtr> -> IO <OSErr>
+#  ccall PBDTDeleteAsync     , <DTPBPtr> -> IO <OSErr>
+#  ccall FSMakeFSSpec, <FSVolumeRefNum> -> <SInt32> -> <ConstStr255Param> -> Ptr <FSSpec> -> IO <OSErr>
+#  ccall FSpOpenDF   , Ptr <FSSpec> -> <SInt8> -> Ptr <FSIORefNum> -> IO <OSErr>
+#  ccall FSpOpenRF   , Ptr <FSSpec> -> <SInt8> -> Ptr <FSIORefNum> -> IO <OSErr>
+#  ccall FSpCreate   , Ptr <FSSpec> -> <OSType> -> <OSType> -> <ScriptCode> -> IO <OSErr>
+#  ccall FSpDirCreate, Ptr <FSSpec> -> <ScriptCode> -> Ptr <SInt32> -> IO <OSErr>
+#  ccall FSpDelete   , Ptr <FSSpec> -> IO <OSErr>
+#  ccall FSpGetFInfo , Ptr <FSSpec> -> Ptr <FInfo> -> IO <OSErr>
+#  ccall FSpSetFInfo , Ptr <FSSpec> -> Ptr <FInfo> -> IO <OSErr>
+#  ccall FSpSetFLock , Ptr <FSSpec> -> IO <OSErr>
+#  ccall FSpRstFLock , Ptr <FSSpec> -> IO <OSErr>
+#  ccall FSpRename   , Ptr <FSSpec> -> <ConstStr255Param> -> IO <OSErr>
+#  ccall FSpCatMove  , Ptr <FSSpec> -> Ptr <FSSpec> -> IO <OSErr>
+#  ccall FSpExchangeFiles , Ptr <FSSpec> -> Ptr <FSSpec> -> IO <OSErr>
+#  ccall PBShareSync      , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBShareAsync     , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBUnshareSync    , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBUnshareAsync   , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetUGEntrySync , <HParmBlkPtr> -> IO <OSErr>
+#  ccall PBGetUGEntryAsync, <HParmBlkPtr> -> IO <OSErr>
+#endif
diff --git a/Bindings/CoreServices/CarbonCore/Finder.hsc b/Bindings/CoreServices/CarbonCore/Finder.hsc
new file mode 100644 (file)
index 0000000..e0ab1bf
--- /dev/null
@@ -0,0 +1,7 @@
+#include <bindings.dsl.h>
+#include <CoreServices/CoreServices.h>
+
+module Bindings.CoreServices.CarbonCore.Finder where
+#strict_import
+import Bindings.CoreServices.CarbonCore.MacTypes
+
index fe03998d14de6c76dc6e30ae6e7d9ddb317ee987..d23bd3af7a975f01c6cb856ae1a11205b0fa318a 100644 (file)
@@ -33,11 +33,13 @@ Library
         Bindings.CoreServices.CarbonCore.AVLTree
         Bindings.CoreServices.CarbonCore.Aliases
         Bindings.CoreServices.CarbonCore.Files
+        Bindings.CoreServices.CarbonCore.Finder
         Bindings.CoreServices.CarbonCore.MacTypes
         Bindings.CoreServices.CarbonCore.UTCUtils
 
     C-Sources:
         cbits/helper_aiff.c
+        cbits/helper_files.c
         cbits/helper_mactypes.c
 
     CC-Options:
diff --git a/cbits/helper_files.c b/cbits/helper_files.c
new file mode 100644 (file)
index 0000000..e5bb41d
--- /dev/null
@@ -0,0 +1,13 @@
+#include <bindings.cmacros.h>
+#include <CoreServices/CoreServices.h>
+
+BC_INLINE_(kFSOperationTotalBytesKey      , CFStringRef)
+BC_INLINE_(kFSOperationBytesCompleteKey   , CFStringRef)
+BC_INLINE_(kFSOperationBytesRemainingKey  , CFStringRef)
+BC_INLINE_(kFSOperationTotalObjectsKey    , CFStringRef)
+BC_INLINE_(kFSOperationObjectsCompleteKey , CFStringRef)
+BC_INLINE_(kFSOperationObjectsRemainingKey, CFStringRef)
+BC_INLINE_(kFSOperationTotalUserVisibleObjectsKey    , CFStringRef)
+BC_INLINE_(kFSOperationUserVisibleObjectsCompleteKey , CFStringRef)
+BC_INLINE_(kFSOperationUserVisibleObjectsRemainingKey, CFStringRef)
+BC_INLINE_(kFSOperationThroughputKey      , CFStringRef)