ADC Home > Reference Library > Reference > Darwin > Disk Arbitration Framework Reference

 


DADisk.h

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

Overview



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.

extern CFDictionaryRef DADiskCopyDescription(
    DADiskRef 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.

extern DADiskRef DADiskCopyWholeDisk(
    DADiskRef 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 );  

Typedefs


DADiskRef


typedef struct __DADisk * DADiskRef;  
Discussion

Type of a reference to DADisk instances.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-03-11