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 );
disk
The disk object.
options
The claim options.
release
The callback function to call when the claim is to be released.
releaseContext
The user-defined context parameter to pass to the callback function.
callback
The callback function to call once the claim completes.
callbackContext
The 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 );
disk
The disk object.
options
The eject options.
callback
The callback function to call once the ejection completes.
context
The user-defined context parameter to pass to the callback function.
DADiskGetOptions |
Obtains the options for the specified disk.
extern DADiskOptions DADiskGetOptions( DADiskRef disk );
disk
The disk object for which to obtain the options.
The options.
DADiskIsClaimed |
Reports whether or not the disk is claimed.
extern Boolean DADiskIsClaimed( DADiskRef disk );
disk
The 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 );
disk
The disk object.
path
The mount path. Pass NULL for a "standard" mount path.
options
The mount options.
callback
The callback function to call once the mount completes.
context
The 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[] );
disk
The disk object.
path
The mount path. Pass NULL for a "standard" mount path.
options
The mount options.
callback
The callback function to call once the mount completes.
context
The user-defined context parameter to pass to the callback function.
arguments
The 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 );
disk
The disk object.
options
The rename options.
callback
The callback function to call once the rename completes.
context
The 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 );
disk
The disk object for which to set the options.
options
The options to set or clear.
value
Pass TRUE to set options; otherwise pass FALSE to clear options.
A result code.
DADiskUnclaim |
Unclaims the specified disk object.
extern void DADiskUnclaim( DADiskRef disk );
disk
The disk object.
DADiskUnmount |
Unmounts the volume at the specified disk object.
extern void DADiskUnmount( DADiskRef disk, DADiskUnmountOptions options, DADiskUnmountCallback callback, void *context );
disk
The disk object.
options
The unmount options.
callback
The callback function to call once the unmount completes.
context
The 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 );
session
The session object.
match
The disk description keys to match. Pass NULL for all disk objects.
callback
The callback function to call when a disk has appeared.
context
The 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 );
session
The session object.
match
The disk description keys to match. Pass NULL for all disk objects.
watch
The disk description keys to watch. Pass NULL for all keys.
callback
The callback function to call when a watched key changes.
context
The 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 );
session
The session object.
match
The disk description keys to match. Pass NULL for all disk objects.
callback
The callback function to call when a disk has disappeared.
context
The 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 );
session
The approval session object.
match
The disk description keys to match. Pass NULL for all disk objects.
callback
The callback function to call when a volume is to be ejected.
context
The 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 );
session
The approval session object.
match
The disk description keys to match. Pass NULL for all disk objects.
callback
The callback function to call when a volume is to be mounted.
context
The 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 );
session
The session object.
match
The disk description keys to match. Pass NULL for all disk objects.
order
The callback order, from lowest to highest. Pass 0 for the default.
callback
The callback function to call when a disk has been probed.
context
The 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 );
session
The approval session object.
match
The disk description keys to match. Pass NULL for all disk objects.
callback
The callback function to call when a volume is to be unmounted.
context
The 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 );
session
The approval session object.
callback
The registered callback function.
context
The user-defined context parameter.
DAUnregisterCallback |
Unregisters a registered callback function.
extern void DAUnregisterCallback( DASessionRef session, void *callback, void *context );
session
The session object.
callback
The registered callback function.
context
The 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().
disk
A disk object.
context
The 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 );
disk
The disk object.
dissenter
A dissenter object on failure or NULL on success.
context
The 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 );
disk
The disk object.
context
The 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 );
disk
A disk object.
keys
A list of changed keys.
context
The user-defined context parameter given to the registration function.
DADiskDisappearedCallback |
Type of the callback function used by DARegisterDiskDisappearedCallback().
disk
A disk object.
context
The 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 );
disk
A disk object.
context
The 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 );
disk
The disk object.
dissenter
A dissenter object on failure or NULL on success.
context
The 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 );
disk
A disk object.
context
The 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 );
disk
The disk object.
dissenter
A dissenter object on failure or NULL on success.
context
The user-defined context parameter given to the mount function.
DADiskPeekCallback |
Type of the callback function used by DARegisterDiskPeekCallback().
disk
A disk object.
context
The 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 );
disk
The disk object.
dissenter
A dissenter object on failure or NULL on success.
context
The 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 );
disk
A disk object.
context
The 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 );
disk
The disk object.
dissenter
A dissenter object on failure or NULL on success.
context
The 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 };
kDADiskClaimOptionDefault
Default options.
DADiskEjectOptions |
Options for DADiskEject().
enum { kDADiskEjectOptionDefault = 0x00000000 };
kDADiskEjectOptionDefault
Default options.
DADiskMountOptions |
Options for DADiskMount().
enum { kDADiskMountOptionDefault = 0x00000000, kDADiskMountOptionWhole = 0x00000001 };
kDADiskMountOptionDefault
Default options.
kDADiskMountOptionWhole
Mount 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 };
kDADiskOptionDefault
Default options.
kDADiskOptionEjectUponLogout
Eject the disk upon logout.
kDADiskOptionMountAutomatic
Mount the disk upon appearance.
kDADiskOptionMountAutomaticNoDefer
Mount the disk upon appearance, even if no login.
kDADiskOptionPrivate
Hides the disk from callbacks.
DADiskRenameOptions |
Options for DADiskRename().
enum { kDADiskRenameOptionDefault = 0x00000000 };
kDADiskRenameOptionDefault
Default options.
DADiskUnmountOptions |
Options for DADiskUnmount().
enum { kDADiskUnmountOptionDefault = 0x00000000, kDADiskUnmountOptionForce = 0x00080000, kDADiskUnmountOptionWhole = 0x00000001 };
kDADiskUnmountOptionDefault
Default options.
kDADiskUnmountOptionForce
Unmount the volume even if files are still active.
kDADiskUnmountOptionWhole
Unmount the volumes tied to the whole disk object.
Last Updated: 2009-10-26