|
Mac Dev Center
Mac OS X Reference Library Drivers, Kernel, & Hardware: User-Space Device Access Disk Arbitration Framework Reference
|
DiskArbitration.h |
| Includes: | <CoreFoundation/CoreFoundation.h> <DiskArbitration/DADisk.h> <DiskArbitration/DADissenter.h> <DiskArbitration/DASession.h> |
Use the links in the table of contents to the left to access the documentation.
Claims the specified disk object for exclusive use.
Ejects the specified disk object.
Obtains the options for the specified disk.
Reports whether or not the disk is claimed.
Mounts the volume at the specified disk object.
Mounts the volume at the specified disk object, with the specified mount options.
Renames the volume at the specified disk object.
Sets the options for the specified disk.
Unclaims the specified disk object.
Unmounts the volume at the specified disk object.
Registers a callback function to be called whenever a disk has appeared.
Registers a callback function to be called whenever a disk description has changed.
Registers a callback function to be called whenever a disk has disappeared.
Registers a callback function to be called whenever a volume is to be ejected.
Registers a callback function to be called whenever a volume is to be mounted.
Registers a callback function to be called whenever a disk has been probed.
Registers a callback function to be called whenever a volume is to be unmounted.
Unregisters a registered callback function.
Unregisters a registered callback function.
DADiskClaim |
Claims the specified disk object for exclusive use.
extern void DADiskClaim( DADiskRef disk, DADiskClaimOptions options, DADiskClaimReleaseCallback release, void *releaseContext, DADiskClaimCallback callback, void *callbackContext );
diskThe disk object.
optionsThe claim options.
releaseThe callback function to call when the claim is to be released.
releaseContextThe user-defined context parameter to pass to the callback function.
callbackThe callback function to call once the claim completes.
callbackContextThe user-defined context parameter to pass to the callback function.
DADiskEject |
Ejects the specified disk object.
extern void DADiskEject( DADiskRef disk, DADiskEjectOptions options, DADiskEjectCallback callback, void *context );
diskThe disk object.
optionsThe eject options.
callbackThe callback function to call once the ejection completes.
contextThe user-defined context parameter to pass to the callback function.
DADiskGetOptions |
Obtains the options for the specified disk.
extern DADiskOptions DADiskGetOptions( DADiskRef disk );
diskThe disk object for which to obtain the options.
The options.
DADiskIsClaimed |
Reports whether or not the disk is claimed.
extern Boolean DADiskIsClaimed( DADiskRef disk );
diskThe disk object.
TRUE if the disk is claimed, otherwise FALSE.
DADiskMount |
Mounts the volume at the specified disk object.
extern void DADiskMount( DADiskRef disk, CFURLRef path, DADiskMountOptions options, DADiskMountCallback callback, void *context );
diskThe disk object.
pathThe mount path. Pass NULL for a "standard" mount path.
optionsThe mount options.
callbackThe callback function to call once the mount completes.
contextThe user-defined context parameter to pass to the callback function.
DADiskMountWithArguments |
Mounts the volume at the specified disk object, with the specified mount options.
extern void DADiskMountWithArguments( DADiskRef disk, CFURLRef path, DADiskMountOptions options, DADiskMountCallback callback, void *context, CFStringRef arguments[] );
diskThe disk object.
pathThe mount path. Pass NULL for a "standard" mount path.
optionsThe mount options.
callbackThe callback function to call once the mount completes.
contextThe user-defined context parameter to pass to the callback function.
argumentsThe null-terminated list of mount options to pass to /sbin/mount -o.
DADiskRename |
Renames the volume at the specified disk object.
extern void DADiskRename( DADiskRef disk, CFStringRef name, DADiskRenameOptions options, DADiskRenameCallback callback, void *context );
diskThe disk object.
optionsThe rename options.
callbackThe callback function to call once the rename completes.
contextThe user-defined context parameter to pass to the callback function.
DADiskSetOptions |
Sets the options for the specified disk.
extern DAReturn DADiskSetOptions( DADiskRef disk, DADiskOptions options, Boolean value );
diskThe disk object for which to set the options.
optionsThe options to set or clear.
valuePass TRUE to set options; otherwise pass FALSE to clear options.
A result code.
DADiskUnclaim |
Unclaims the specified disk object.
extern void DADiskUnclaim( DADiskRef disk );
diskThe disk object.
DADiskUnmount |
Unmounts the volume at the specified disk object.
extern void DADiskUnmount( DADiskRef disk, DADiskUnmountOptions options, DADiskUnmountCallback callback, void *context );
diskThe disk object.
optionsThe unmount options.
callbackThe callback function to call once the unmount completes.
contextThe user-defined context parameter to pass to the callback function.
DARegisterDiskAppearedCallback |
Registers a callback function to be called whenever a disk has appeared.
extern void DARegisterDiskAppearedCallback( DASessionRef session, CFDictionaryRef match, DADiskAppearedCallback callback, void *context );
sessionThe session object.
matchThe disk description keys to match. Pass NULL for all disk objects.
callbackThe callback function to call when a disk has appeared.
contextThe user-defined context parameter to pass to the callback function.
DARegisterDiskDescriptionChangedCallback |
Registers a callback function to be called whenever a disk description has changed.
extern void DARegisterDiskDescriptionChangedCallback( DASessionRef session, CFDictionaryRef match, CFArrayRef watch, DADiskDescriptionChangedCallback callback, void *context );
sessionThe session object.
matchThe disk description keys to match. Pass NULL for all disk objects.
watchThe disk description keys to watch. Pass NULL for all keys.
callbackThe callback function to call when a watched key changes.
contextThe user-defined context parameter to pass to the callback function.
DARegisterDiskDisappearedCallback |
Registers a callback function to be called whenever a disk has disappeared.
extern void DARegisterDiskDisappearedCallback( DASessionRef session, CFDictionaryRef match, DADiskDisappearedCallback callback, void *context );
sessionThe session object.
matchThe disk description keys to match. Pass NULL for all disk objects.
callbackThe callback function to call when a disk has disappeared.
contextThe user-defined context parameter to pass to the callback function.
DARegisterDiskEjectApprovalCallback |
Registers a callback function to be called whenever a volume is to be ejected.
extern void DARegisterDiskEjectApprovalCallback( DAApprovalSessionRef session, CFDictionaryRef match, DADiskEjectApprovalCallback callback, void *context );
sessionThe approval session object.
matchThe disk description keys to match. Pass NULL for all disk objects.
callbackThe callback function to call when a volume is to be ejected.
contextThe user-defined context parameter to pass to the callback function.
DARegisterDiskMountApprovalCallback |
Registers a callback function to be called whenever a volume is to be mounted.
extern void DARegisterDiskMountApprovalCallback( DAApprovalSessionRef session, CFDictionaryRef match, DADiskMountApprovalCallback callback, void *context );
sessionThe approval session object.
matchThe disk description keys to match. Pass NULL for all disk objects.
callbackThe callback function to call when a volume is to be mounted.
contextThe user-defined context parameter to pass to the callback function.
DARegisterDiskPeekCallback |
Registers a callback function to be called whenever a disk has been probed.
extern void DARegisterDiskPeekCallback( DASessionRef session, CFDictionaryRef match, CFIndex order, DADiskPeekCallback callback, void *context );
sessionThe session object.
matchThe disk description keys to match. Pass NULL for all disk objects.
orderThe callback order, from lowest to highest. Pass 0 for the default.
callbackThe callback function to call when a disk has been probed.
contextThe user-defined context parameter to pass to the callback function.
DARegisterDiskUnmountApprovalCallback |
Registers a callback function to be called whenever a volume is to be unmounted.
extern void DARegisterDiskUnmountApprovalCallback( DAApprovalSessionRef session, CFDictionaryRef match, DADiskUnmountApprovalCallback callback, void *context );
sessionThe approval session object.
matchThe disk description keys to match. Pass NULL for all disk objects.
callbackThe callback function to call when a volume is to be unmounted.
contextThe user-defined context parameter to pass to the callback function.
DAUnregisterApprovalCallback |
Unregisters a registered callback function.
extern void DAUnregisterApprovalCallback( DAApprovalSessionRef session, void *callback, void *context );
sessionThe approval session object.
callbackThe registered callback function.
contextThe user-defined context parameter.
DAUnregisterCallback |
Unregisters a registered callback function.
extern void DAUnregisterCallback( DASessionRef session, void *callback, void *context );
sessionThe session object.
callbackThe registered callback function.
contextThe user-defined context parameter.
Type of the callback function used by DARegisterDiskAppearedCallback().
Type of the callback function used by DADiskClaim().
Type of the callback function used by DADiskClaim().
Type of the callback function used by DARegisterDiskDescriptionChangedCallback().
Type of the callback function used by DARegisterDiskDisappearedCallback().
Type of the callback function used by DARegisterDiskEjectApprovalCallback().
Type of the callback function used by DADiskEject().
Type of the callback function used by DARegisterDiskMountApprovalCallback().
Type of the callback function used by DADiskMount().
Type of the callback function used by DARegisterDiskPeekCallback().
Type of the callback function used by DADiskRename().
Type of the callback function used by DARegisterDiskUnmountApprovalCallback().
Type of the callback function used by DADiskUnmount().
DADiskAppearedCallback |
Type of the callback function used by DARegisterDiskAppearedCallback().
diskA disk object.
contextThe user-defined context parameter given to the registration function.
DADiskClaimCallback |
Type of the callback function used by DADiskClaim().
typedef void ( *DADiskClaimCallback )( DADiskRef disk, DADissenterRef dissenter, void *context );
diskThe disk object.
dissenterA dissenter object on failure or NULL on success.
contextThe user-defined context parameter given to the claim function.
DADiskClaimReleaseCallback |
Type of the callback function used by DADiskClaim().
typedef DADissenterRef ( *DADiskClaimReleaseCallback )( DADiskRef disk, void *context );
diskThe disk object.
contextThe user-defined context parameter given to the claim function.
A dissenter reference. Pass NULL to release claim.
The caller of this callback receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CFRelease().
DADiskDescriptionChangedCallback |
Type of the callback function used by DARegisterDiskDescriptionChangedCallback().
typedef void ( *DADiskDescriptionChangedCallback )( DADiskRef disk, CFArrayRef keys, void *context );
diskA disk object.
keysA list of changed keys.
contextThe user-defined context parameter given to the registration function.
DADiskDisappearedCallback |
Type of the callback function used by DARegisterDiskDisappearedCallback().
diskA disk object.
contextThe user-defined context parameter given to the registration function.
DADiskEjectApprovalCallback |
Type of the callback function used by DARegisterDiskEjectApprovalCallback().
typedef DADissenterRef ( *DADiskEjectApprovalCallback )( DADiskRef disk, void *context );
diskA disk object.
contextThe user-defined context parameter given to the registration function.
A dissenter reference. Pass NULL to approve.
The caller of this callback receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CFRelease().
DADiskEjectCallback |
Type of the callback function used by DADiskEject().
typedef void ( *DADiskEjectCallback )( DADiskRef disk, DADissenterRef dissenter, void *context );
diskThe disk object.
dissenterA dissenter object on failure or NULL on success.
contextThe user-defined context parameter given to the eject function.
DADiskMountApprovalCallback |
Type of the callback function used by DARegisterDiskMountApprovalCallback().
typedef DADissenterRef ( *DADiskMountApprovalCallback )( DADiskRef disk, void *context );
diskA disk object.
contextThe user-defined context parameter given to the registration function.
A dissenter reference. Pass NULL to approve.
The caller of this callback receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CFRelease().
DADiskMountCallback |
Type of the callback function used by DADiskMount().
typedef void ( *DADiskMountCallback )( DADiskRef disk, DADissenterRef dissenter, void *context );
diskThe disk object.
dissenterA dissenter object on failure or NULL on success.
contextThe user-defined context parameter given to the mount function.
DADiskPeekCallback |
Type of the callback function used by DARegisterDiskPeekCallback().
diskA disk object.
contextThe user-defined context parameter given to the registration function.
The peek callback functions are called in a specific order, from lowest order to highest order. DADiskClaim() could be used here to claim the disk object and DADiskSetOptions() could be used here to set up options on the disk object.
DADiskRenameCallback |
Type of the callback function used by DADiskRename().
typedef void ( *DADiskRenameCallback )( DADiskRef disk, DADissenterRef dissenter, void *context );
diskThe disk object.
dissenterA dissenter object on failure or NULL on success.
contextThe user-defined context parameter given to the rename function.
DADiskUnmountApprovalCallback |
Type of the callback function used by DARegisterDiskUnmountApprovalCallback().
typedef DADissenterRef ( *DADiskUnmountApprovalCallback )( DADiskRef disk, void *context );
diskA disk object.
contextThe user-defined context parameter given to the registration function.
A dissenter reference. Pass NULL to approve.
The caller of this callback receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CFRelease().
DADiskUnmountCallback |
Type of the callback function used by DADiskUnmount().
typedef void ( *DADiskUnmountCallback )( DADiskRef disk, DADissenterRef dissenter, void *context );
diskThe disk object.
dissenterA dissenter object on failure or NULL on success.
contextThe user-defined context parameter given to the unmount function.
kDADiskDescriptionMatchMediaUnformatted |
Predefined CFDictionary object containing a set of disk description keys and values appropriate for matching unformatted media using DARegister*Callback().
kDADiskDescriptionMatchMediaWhole |
Predefined CFDictionary object containing a set of disk description keys and values appropriate for matching whole media using DARegister*Callback().
kDADiskDescriptionMatchVolumeMountable |
Predefined CFDictionary object containing a set of disk description keys and values appropriate for matching mountable volumes using DARegister*Callback().
kDADiskDescriptionMatchVolumeUnrecognized |
Predefined CFDictionary object containing a set of disk description keys and values appropriate for matching unrecognized volumes using DARegister*Callback().
kDADiskDescriptionWatchVolumeName |
Predefined CFArray object containing a set of disk description keys appropriate for watching volume name changes using DARegisterDiskDescriptionChangedCallback().
kDADiskDescriptionWatchVolumePath |
Predefined CFArray object containing a set of disk description keys appropriate for watching volume mount changes using DARegisterDiskDescriptionChangedCallback().
Options for DADiskClaim().
Options for DADiskEject().
Options for DADiskMount().
Options for DADiskGetOptions() and DADiskSetOptions().
Options for DADiskRename().
Options for DADiskUnmount().
DADiskClaimOptions |
Options for DADiskClaim().
enum { kDADiskClaimOptionDefault = 0x00000000 };
kDADiskClaimOptionDefaultDefault options.
DADiskEjectOptions |
Options for DADiskEject().
enum { kDADiskEjectOptionDefault = 0x00000000 };
kDADiskEjectOptionDefaultDefault options.
DADiskMountOptions |
Options for DADiskMount().
enum { kDADiskMountOptionDefault = 0x00000000, kDADiskMountOptionWhole = 0x00000001 };
kDADiskMountOptionDefaultDefault options.
kDADiskMountOptionWholeMount the volumes tied to the whole disk object.
DADiskOptions |
Options for DADiskGetOptions() and DADiskSetOptions().
enum { kDADiskOptionDefault = 0x00000000, kDADiskOptionEjectUponLogout = 0x00000001, kDADiskOptionMountAutomatic = 0x00000010, kDADiskOptionMountAutomaticNoDefer = 0x00000020, kDADiskOptionPrivate = 0x00000100 };
kDADiskOptionDefaultDefault options.
kDADiskOptionEjectUponLogoutEject the disk upon logout.
kDADiskOptionMountAutomaticMount the disk upon appearance.
kDADiskOptionMountAutomaticNoDeferMount the disk upon appearance, even if no login.
kDADiskOptionPrivateHides the disk from callbacks.
DADiskRenameOptions |
Options for DADiskRename().
enum { kDADiskRenameOptionDefault = 0x00000000 };
kDADiskRenameOptionDefaultDefault options.
DADiskUnmountOptions |
Options for DADiskUnmount().
enum { kDADiskUnmountOptionDefault = 0x00000000, kDADiskUnmountOptionForce = 0x00080000, kDADiskUnmountOptionWhole = 0x00000001 };
kDADiskUnmountOptionDefaultDefault options.
kDADiskUnmountOptionForceUnmount the volume even if files are still active.
kDADiskUnmountOptionWholeUnmount the volumes tied to the whole disk object.
Last Updated: 2009-10-26