ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference

 


IOMedia.h

Include Path:

<IOKit/storage/IOMedia.h>

Path:

/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/storage/IOMedia.h

Includes:

Overview

This header contains the IOMedia class definition. The IOMedia class is a random-access disk device abstraction that provides a consistent interface for real and virtual disk devices, subdivisions of disks (such as partitions), and supersets of disks (such as RAID volumes).

For more information on the IOMedia class and its subclasses, see Writing Drivers for Mass Storage Devices.



Classes

IOMedia

A random-access disk device abstraction.



Enumerations


IOMediaAttributeMask


enum { 
    kIOMediaAttributeEjectableMask = 0x00000001, 
    kIOMediaAttributeRemovableMask = 0x00000002, 
    kIOMediaAttributeReservedMask = 0xFFFFFFFC 
};  
Constants
kIOMediaAttributeEjectableMask

Indicates whether the media is ejectable from the drive mechanism under software control. Implies kIOMediaAttributeRemovableMask.

kIOMediaAttributeRemovableMask

Indicates whether the media is removable from the drive mechanism.

Discussion

The IOMediaAttributeMask bit mask describes various attributes of the media object, such as its ejectability and its removability.

#defines


kIOMediaClass


The name of the IOMedia class.

#define kIOMediaClass "IOMedia" 


kIOMediaContentHintKey


A property of IOMedia objects.

#define kIOMediaContentHintKey "Content Hint" 
Discussion

The kIOMediaContentHintKey property has an OSString value and contains a hint of the media's contents. The hint is set at the time of the object's creation, should the creator have a clue as to what it may contain. The hint string does not change for the lifetime of the object and is formed in the likeness of Apple's "Apple_HFS" strings or in the likeness of a UUID.


kIOMediaContentKey


A property of IOMedia objects.

#define kIOMediaContentKey "Content" 
Discussion

The kIOMediaContentKey property has an OSString value and contains a description of the media's contents. The description is the same as the hint at the time of the object's creation, but it is possible that the description has been overridden by a client (which has probed the media and identified the content correctly) of the media object. It is more accurate than the hint for this reason. The string is formed in the likeness of Apple's "Apple_HFS" strings or in the likeness of a UUID.


kIOMediaContentMaskKey


A property of IOMedia clients.

#define kIOMediaContentMaskKey "Content Mask" 
Discussion

The kIOMediaContentMaskKey property has an OSString value and must exist in all IOMedia clients that drive new content (that is, produce new media objects). When the client matches against the provider media, the value of the client's kIOMediaContentMaskKey property is used to replace the provider's kIOMediaContentKey property.


kIOMediaEjectableKey


A property of IOMedia objects.

#define kIOMediaEjectableKey "Ejectable" 
Discussion

The kIOMediaEjectableKey property has an OSBoolean value and describes whether the media is ejectable from the drive mechanism under software control. Implies IOMediaRemovable is also true.


kIOMediaIconKey


A property of any object in the media stack.

#define kIOMediaIconKey "IOMediaIcon" 
Discussion

kIOMediaIconKey is a property of any object in the media stack that wishes to override the default icon shown for the media objects in the stack. It is usually defined in a provider object below the media object. It has an OSDictionary value, with properties identical to the kIOIconKey definition, that is, kCFBundleIdentifierKey and kIOBundleResourceFileKey.


kIOMediaLeafKey


A property of IOMedia objects.

#define kIOMediaLeafKey "Leaf" 
Discussion

The kIOMediaLeafKey property has an OSBoolean value and describes whether the media is a leaf, that is, it is the deepest media object in this branch of the I/O Registry.


kIOMediaOpenKey


A property of IOMedia objects.

#define kIOMediaOpenKey "Open" 
Discussion

The kIOMediaOpenKey property has an OSBoolean value and describes whether a client presently has an open on this media.


kIOMediaPreferredBlockSizeKey


A property of IOMedia objects.

#define kIOMediaPreferredBlockSizeKey "Preferred Block Size" 
Discussion

The kIOMediaPreferredBlockSizeKey property has an OSNumber value and describes the media's natural block size in bytes. This information is useful to clients that want to optimize access to the media.


kIOMediaRemovableKey


A property of IOMedia objects.

#define kIOMediaRemovableKey "Removable" 
Discussion

The kIOMediaRemovableKey property has an OSBoolean value and describes whether the media is removable from the drive mechanism.


kIOMediaSizeKey


A property of IOMedia objects.

#define kIOMediaSizeKey "Size" 
Discussion

The kIOMediaSizeKey property has an OSNumber value and describes the total length of the media in bytes.


kIOMediaUUIDKey


A property of IOMedia objects.

#define kIOMediaUUIDKey "UUID" 
Discussion

The kIOMediaUUIDKey property has an OSString value and contains a persistent Universal Unique Identifier for the media if such an identifier is available.


kIOMediaWholeKey


A property of IOMedia objects.

#define kIOMediaWholeKey "Whole" 
Discussion

The kIOMediaWholeKey property has an OSBoolean value and describes whether the media is whole, that is, it represents the whole disk (the physical disk, or a virtual replica thereof).


kIOMediaWritableKey


A property of IOMedia objects.

#define kIOMediaWritableKey "Writable" 
Discussion

The kIOMediaWritableKey property has an OSBoolean value and describes whether the media is writable.


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: 2009-02-23