DADisk.h

Includes:
<CoreFoundation/CoreFoundation.h>
<IOKit/IOKitLib.h>
<DiskArbitration/DASession.h>

Overview

Use the links in the table of contents to the left to access the documentation.



Functions

DADiskCopyDescription

Obtains the Disk Arbitration description of the specified disk.

DADiskCopyIOMedia

Obtains the I/O Kit media object for the specified disk.

DADiskCopyWholeDisk

Obtain the associated whole disk object for the specified disk.

DADiskCreateFromBSDName

Creates a new disk object.

DADiskCreateFromIOMedia

Creates a new disk object.

DADiskGetBSDName

Obtains the BSD device name for the specified disk.

DADiskGetTypeID

Returns the type identifier of all DADisk instances.


DADiskCopyDescription


Obtains the Disk Arbitration description of the specified disk.

Parameters
disk

The DADisk for which to obtain the Disk Arbitration description.

Return Value

The disk's Disk Arbitration description.

Discussion

This function will contact Disk Arbitration to acquire the latest description of the specified disk, unless this function is called on a disk object passed within the context of a registered callback, in which case the description is current as of that callback event.

The caller of this function receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CFRelease().


DADiskCopyIOMedia


Obtains the I/O Kit media object for the specified disk.

extern io_service_t DADiskCopyIOMedia(
    DADiskRef disk );  
Parameters
disk

The DADisk for which to obtain the I/O Kit media object.

Return Value

The disk's I/O Kit media object.

Discussion

The caller of this function receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with IOObjectRelease().


DADiskCopyWholeDisk


Obtain the associated whole disk object for the specified disk.

Parameters
disk

The disk object.

Return Value

The disk's associated whole disk object.

Discussion

The caller of this function receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CFRelease().


DADiskCreateFromBSDName


Creates a new disk object.

extern DADiskRef DADiskCreateFromBSDName(
    CFAllocatorRef allocator,
    DASessionRef session,
    const char * name );  
Parameters
allocator

The allocator object to be used to allocate memory.

session

The DASession in which to contact Disk Arbitration.

name

The BSD device name.

Return Value

A reference to a new DADisk.

Discussion

The caller of this function receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CFRelease().


DADiskCreateFromIOMedia


Creates a new disk object.

extern DADiskRef DADiskCreateFromIOMedia(
    CFAllocatorRef allocator,
    DASessionRef session,
    io_service_t media );  
Parameters
allocator

The allocator object to be used to allocate memory.

session

The DASession in which to contact Disk Arbitration.

media

The I/O Kit media object.

Return Value

A reference to a new DADisk.

Discussion

The caller of this function receives a reference to the returned object. The caller also implicitly retains the object and is responsible for releasing it with CFRelease().


DADiskGetBSDName


Obtains the BSD device name for the specified disk.

extern const char * DADiskGetBSDName( DADiskRef disk );  
Parameters
disk

The DADisk for which to obtain the BSD device name.

Return Value

The disk's BSD device name.

Discussion

The BSD device name can be used with opendev() to open the BSD device.


DADiskGetTypeID


Returns the type identifier of all DADisk instances.

extern CFTypeID DADiskGetTypeID(
    void );  

Constants

kDADiskDescriptionBusNameKey

Key whose value tells the name of the bus to which the underlying hardware device is attached.

kDADiskDescriptionBusPathKey

Key whose value tells the I/O Registry path of the bus to which the underlying hardware device is attached.

kDADiskDescriptionDeviceGUIDKey

Key whose value tells the GUID of the partition associated with a volume.

kDADiskDescriptionDeviceInternalKey

Key whose value tells whether the volume is an internal disk.

kDADiskDescriptionDeviceModelKey

Key whose value tells the model information for the underlying media.

kDADiskDescriptionDevicePathKey

Key whose value tells the I/O Registry path of the underlying hardware device.

kDADiskDescriptionDeviceProtocolKey

Key whose value tells the bus protocol used by the underlying device.

kDADiskDescriptionDeviceRevisionKey

Key whose value tells the revision of the underlying hardware device.

kDADiskDescriptionDeviceUnitKey

Key whose value tells the device ID of the underlying hardware device.

kDADiskDescriptionDeviceVendorKey

Key whose value tells the vendor ID of the underlying hardware device.

kDADiskDescriptionMediaBlockSizeKey

Key whose value tells the block size of the underlying media.

kDADiskDescriptionMediaBSDMajorKey

Key whose value tells the major number of the underlying block device.

kDADiskDescriptionMediaBSDMinorKey

Key whose value tells the minor number of the underlying block device.

kDADiskDescriptionMediaBSDNameKey

Key whose value tells the name of the underlying block device.

kDADiskDescriptionMediaBSDUnitKey

Key whose value tells the unit number of the underlying block device.

kDADiskDescriptionMediaContentKey

Key whose value tells the media content value from the underlying IOMedia Object (usually the volume format).

kDADiskDescriptionMediaEjectableKey

Key whose value tells whether the media can be ejected.

kDADiskDescriptionMediaIconKey

Key whose value contains a path to the volume's icon.

kDADiskDescriptionMediaKindKey

Key whose value tells the I/O Kit class for the underlying media (usually IOMedia).

kDADiskDescriptionMediaLeafKey

Key whose value tells whether the underlying media object is a leaf node.

kDADiskDescriptionMediaNameKey

Key whose value tells the name of the underlying media. For leaf partitions, usually the volume name.

kDADiskDescriptionMediaPathKey

Key whose value tells the path to the IOMedia object in the I/O Registry.

kDADiskDescriptionMediaRemovableKey

Key whose value tells whether the underlying media is removable.

kDADiskDescriptionMediaSizeKey

Key whose value tells the size of the underlying media.

kDADiskDescriptionMediaTypeKey

Key whose value tells the type of the underlying media.

kDADiskDescriptionMediaUUIDKey

Key whose value tells the unique identifier for the underlying media (if available).

kDADiskDescriptionMediaWholeKey

Key whose value tells whether this media object is a "whole disk" media object.

kDADiskDescriptionMediaWritableKey

Key whose value tells whether the underlying media is writable.

kDADiskDescriptionVolumeKindKey

Key whose value tells the type of volume (volume format).

kDADiskDescriptionVolumeMountableKey

Key whose value tells if a volume is mountable.

kDADiskDescriptionVolumeNameKey

Key whose value tells the volume name.

kDADiskDescriptionVolumeNetworkKey

Key whose value tells whether the volume is a network volume.

kDADiskDescriptionVolumePathKey

Key whose value tells the mount point path.

kDADiskDescriptionVolumeUUIDKey

Key whose value tells the volume UUID.


kDADiskDescriptionBusNameKey


Key whose value tells the name of the bus to which the underlying hardware device is attached.

extern const CFStringRef kDADiskDescriptionBusNameKey;  /* ( CFString     ) */


kDADiskDescriptionBusPathKey


Key whose value tells the I/O Registry path of the bus to which the underlying hardware device is attached.

extern const CFStringRef kDADiskDescriptionBusPathKey;  /* ( CFString     ) */


kDADiskDescriptionDeviceGUIDKey


Key whose value tells the GUID of the partition associated with a volume.

extern const CFStringRef kDADiskDescriptionDeviceGUIDKey;  /* 
    ( CFData       ) */


kDADiskDescriptionDeviceInternalKey


Key whose value tells whether the volume is an internal disk.

extern const CFStringRef kDADiskDescriptionDeviceInternalKey;  /* 
    ( CFBoolean    ) */


kDADiskDescriptionDeviceModelKey


Key whose value tells the model information for the underlying media.

extern const CFStringRef kDADiskDescriptionDeviceModelKey;  /* 
    ( CFString     ) */


kDADiskDescriptionDevicePathKey


Key whose value tells the I/O Registry path of the underlying hardware device.

extern const CFStringRef kDADiskDescriptionDevicePathKey;  /* 
    ( CFString     ) */


kDADiskDescriptionDeviceProtocolKey


Key whose value tells the bus protocol used by the underlying device.

extern const CFStringRef kDADiskDescriptionDeviceProtocolKey;  /* 
    ( CFString     ) */


kDADiskDescriptionDeviceRevisionKey


Key whose value tells the revision of the underlying hardware device.

extern const CFStringRef kDADiskDescriptionDeviceRevisionKey;  /* 
    ( CFString     ) */


kDADiskDescriptionDeviceUnitKey


Key whose value tells the device ID of the underlying hardware device.

extern const CFStringRef kDADiskDescriptionDeviceUnitKey;  /* 
    ( CFNumber     ) */


kDADiskDescriptionDeviceVendorKey


Key whose value tells the vendor ID of the underlying hardware device.

extern const CFStringRef kDADiskDescriptionDeviceVendorKey;  /* 
    ( CFString     ) */


kDADiskDescriptionMediaBlockSizeKey


Key whose value tells the block size of the underlying media.

extern const CFStringRef kDADiskDescriptionMediaBlockSizeKey;  /* 
    ( CFNumber     ) */


kDADiskDescriptionMediaBSDMajorKey


Key whose value tells the major number of the underlying block device.

extern const CFStringRef kDADiskDescriptionMediaBSDMajorKey;  /* 
    ( CFNumber     ) */


kDADiskDescriptionMediaBSDMinorKey


Key whose value tells the minor number of the underlying block device.

extern const CFStringRef kDADiskDescriptionMediaBSDMinorKey;  /* 
    ( CFNumber     ) */


kDADiskDescriptionMediaBSDNameKey


Key whose value tells the name of the underlying block device.

extern const CFStringRef kDADiskDescriptionMediaBSDNameKey;  /* 
    ( CFString     ) */


kDADiskDescriptionMediaBSDUnitKey


Key whose value tells the unit number of the underlying block device.

extern const CFStringRef kDADiskDescriptionMediaBSDUnitKey;  /* 
    ( CFNumber     ) */


kDADiskDescriptionMediaContentKey


Key whose value tells the media content value from the underlying IOMedia Object (usually the volume format).

extern const CFStringRef kDADiskDescriptionMediaContentKey;  /* 
    ( CFString     ) */


kDADiskDescriptionMediaEjectableKey


Key whose value tells whether the media can be ejected.

extern const CFStringRef kDADiskDescriptionMediaEjectableKey;  /* 
    ( CFBoolean    ) */


kDADiskDescriptionMediaIconKey


Key whose value contains a path to the volume's icon.

extern const CFStringRef kDADiskDescriptionMediaIconKey;  /* 
    ( CFDictionary ) */


kDADiskDescriptionMediaKindKey


Key whose value tells the I/O Kit class for the underlying media (usually IOMedia).

extern const CFStringRef kDADiskDescriptionMediaKindKey;  /* 
    ( CFString     ) */


kDADiskDescriptionMediaLeafKey


Key whose value tells whether the underlying media object is a leaf node.

extern const CFStringRef kDADiskDescriptionMediaLeafKey;  /* 
    ( CFBoolean    ) */


kDADiskDescriptionMediaNameKey


Key whose value tells the name of the underlying media. For leaf partitions, usually the volume name.

extern const CFStringRef kDADiskDescriptionMediaNameKey;  /* 
    ( CFString     ) */


kDADiskDescriptionMediaPathKey


Key whose value tells the path to the IOMedia object in the I/O Registry.

extern const CFStringRef kDADiskDescriptionMediaPathKey;  /* 
    ( CFString     ) */


kDADiskDescriptionMediaRemovableKey


Key whose value tells whether the underlying media is removable.

extern const CFStringRef kDADiskDescriptionMediaRemovableKey;  /* 
    ( CFBoolean    ) */


kDADiskDescriptionMediaSizeKey


Key whose value tells the size of the underlying media.

extern const CFStringRef kDADiskDescriptionMediaSizeKey;  /* 
    ( CFNumber     ) */


kDADiskDescriptionMediaTypeKey


Key whose value tells the type of the underlying media.

extern const CFStringRef kDADiskDescriptionMediaTypeKey;  /* 
    ( CFString     ) */


kDADiskDescriptionMediaUUIDKey


Key whose value tells the unique identifier for the underlying media (if available).

extern const CFStringRef kDADiskDescriptionMediaUUIDKey;  /* 
    ( CFUUID       ) */


kDADiskDescriptionMediaWholeKey


Key whose value tells whether this media object is a "whole disk" media object.

extern const CFStringRef kDADiskDescriptionMediaWholeKey;  /* 
    ( CFBoolean    ) */


kDADiskDescriptionMediaWritableKey


Key whose value tells whether the underlying media is writable.

extern const CFStringRef kDADiskDescriptionMediaWritableKey;  /* 
    ( CFBoolean    ) */


kDADiskDescriptionVolumeKindKey


Key whose value tells the type of volume (volume format).

extern const CFStringRef kDADiskDescriptionVolumeKindKey;  /* 
    ( CFString     ) */


kDADiskDescriptionVolumeMountableKey


Key whose value tells if a volume is mountable.

extern const CFStringRef kDADiskDescriptionVolumeMountableKey;  /* 
    ( CFBoolean    ) */


kDADiskDescriptionVolumeNameKey


Key whose value tells the volume name.

extern const CFStringRef kDADiskDescriptionVolumeNameKey;  /* 
    ( CFString     ) */


kDADiskDescriptionVolumeNetworkKey


Key whose value tells whether the volume is a network volume.

extern const CFStringRef kDADiskDescriptionVolumeNetworkKey;  /* 
    ( CFBoolean    ) */


kDADiskDescriptionVolumePathKey


Key whose value tells the mount point path.

extern const CFStringRef kDADiskDescriptionVolumePathKey;  /* 
    ( CFURL        ) */


kDADiskDescriptionVolumeUUIDKey


Key whose value tells the volume UUID.

extern const CFStringRef kDADiskDescriptionVolumeUUIDKey;  /* 
    ( CFUUID       ) */

Typedefs

DADiskRef

DADiskRef


typedef struct __DADisk * DADiskRef;  
Discussion

Type of a reference to DADisk instances.

 

Did this document help you? Yes It's good, but... Not helpful...

 

Last Updated: 2009-10-26