ADC Home > Reference Library > Reference > Darwin > Disk Arbitration Framework Reference
|
DiskArbitration.h |
Includes: | <CoreFoundation/CoreFoundation.h> <DiskArbitration/DADisk.h> <DiskArbitration/DADissenter.h> <DiskArbitration/DASession.h> |
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
options
release
releaseContext
callback
callbackContext
DADiskEject |
Ejects the specified disk object.
extern void DADiskEject( DADiskRef disk, DADiskEjectOptions options, DADiskEjectCallback callback, void *context );
disk
options
callback
context
DADiskGetOptions |
Obtains the options for the specified disk.
extern DADiskOptions DADiskGetOptions( DADiskRef disk );
disk
The options.
DADiskIsClaimed |
Reports whether or not the disk is claimed.
extern Boolean DADiskIsClaimed( DADiskRef disk );
disk
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
path
options
callback
context
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
path
options
callback
context
arguments
DADiskRename |
Renames the volume at the specified disk object.
extern void DADiskRename( DADiskRef disk, CFStringRef name, DADiskRenameOptions options, DADiskRenameCallback callback, void *context );
disk
options
callback
context
DADiskSetOptions |
Sets the options for the specified disk.
extern DAReturn DADiskSetOptions( DADiskRef disk, DADiskOptions options, Boolean value );
disk
options
value
A result code.
DADiskUnclaim |
Unclaims the specified disk object.
extern void DADiskUnclaim( DADiskRef disk );
disk
DADiskUnmount |
Unmounts the volume at the specified disk object.
extern void DADiskUnmount( DADiskRef disk, DADiskUnmountOptions options, DADiskUnmountCallback callback, void *context );
disk
options
callback
context
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
match
callback
context
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
match
watch
callback
context
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
match
callback
context
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
match
callback
context
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
match
callback
context
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
match
order
callback
context
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
match
callback
context
DAUnregisterApprovalCallback |
Unregisters a registered callback function.
extern void DAUnregisterApprovalCallback( DAApprovalSessionRef session, void *callback, void *context );
session
callback
context
DAUnregisterCallback |
Unregisters a registered callback function.
extern void DAUnregisterCallback( DASessionRef session, void *callback, void *context );
session
callback
context
kDADiskDescriptionMatchMediaUnformatted |
extern CFDictionaryRef kDADiskDescriptionMatchMediaUnformatted;
Predefined CFDictionary object containing a set of disk description keys and values appropriate for matching unformatted media using DARegister*Callback().
kDADiskDescriptionMatchMediaWhole |
extern CFDictionaryRef kDADiskDescriptionMatchMediaWhole;
Predefined CFDictionary object containing a set of disk description keys and values appropriate for matching whole media using DARegister*Callback().
kDADiskDescriptionMatchVolumeMountable |
extern CFDictionaryRef kDADiskDescriptionMatchVolumeMountable;
Predefined CFDictionary object containing a set of disk description keys and values appropriate for matching mountable volumes using DARegister*Callback().
kDADiskDescriptionMatchVolumeUnrecognized |
extern CFDictionaryRef kDADiskDescriptionMatchVolumeUnrecognized;
Predefined CFDictionary object containing a set of disk description keys and values appropriate for matching unrecognized volumes using DARegister*Callback().
kDADiskDescriptionWatchVolumeName |
extern CFArrayRef kDADiskDescriptionWatchVolumeName;
Predefined CFArray object containing a set of disk description keys appropriate for watching volume name changes using DARegisterDiskDescriptionChangedCallback().
kDADiskDescriptionWatchVolumePath |
extern CFArrayRef kDADiskDescriptionWatchVolumePath;
Predefined CFArray object containing a set of disk description keys appropriate for watching volume mount changes using DARegisterDiskDescriptionChangedCallback().
DADiskAppearedCallback |
Type of the callback function used by DARegisterDiskAppearedCallback().
typedef void ( *DADiskAppearedCallback )( DADiskRef disk, void *context );
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().
typedef void ( *DADiskDisappearedCallback )( DADiskRef disk, void *context );
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().
typedef void ( *DADiskPeekCallback )( DADiskRef disk, void *context );
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.
DADiskClaimOptions |
Options for DADiskClaim().
enum { kDADiskClaimOptionDefault = 0x00000000 };
DADiskEjectOptions |
Options for DADiskEject().
enum { kDADiskEjectOptionDefault = 0x00000000 };
DADiskMountOptions |
Options for DADiskMount().
enum { kDADiskMountOptionDefault = 0x00000000, kDADiskMountOptionWhole = 0x00000001 };
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 };
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 };
DADiskUnmountOptions |
Options for DADiskUnmount().
enum { kDADiskUnmountOptionDefault = 0x00000000, kDADiskUnmountOptionForce = 0x00080000, kDADiskUnmountOptionWhole = 0x00000001 };
kDADiskUnmountOptionForce
- Unmount the volume even if files are still active.
kDADiskUnmountOptionWhole
- Unmount the volumes tied to the whole disk object.
|