IOMedia.h Reference

Declared in
IOMedia.h

Overview

This header contains the IOMedia class definition.

Included Headers

  • <IOKit/IOTypes.h>

  • <IOKit/storage/IOStorage.h>

Constants

See the Overview section above for header-level documentation.

Miscellaneous Defines

   
#define kIOMediaClass "IOMedia"
#define kIOMediaContentHintKey "Content Hint"
#define kIOMediaContentKey "Content"
#define kIOMediaContentMaskKey "Content Mask"
#define kIOMediaEjectableKey "Ejectable"
#define kIOMediaIconKey "IOMediaIcon"
#define kIOMediaLeafKey "Leaf"
#define kIOMediaOpenKey "Open"
#define kIOMediaPreferredBlockSizeKey "Preferred Block Size"
#define kIOMediaRemovableKey "Removable"
#define kIOMediaSizeKey "Size"
#define kIOMediaUUIDKey "UUID"
#define kIOMediaWholeKey "Whole"
#define kIOMediaWritableKey "Writable"
Constants
kIOMediaClass

The name of the IOMedia class.

Available in OS X v10.0 and later.

Declared in IOMedia.h.

kIOMediaContentHintKey

A property of IOMedia objects.

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.

Available in OS X v10.0 and later.

Declared in IOMedia.h.

kIOMediaContentKey

A property of IOMedia objects.

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.

Available in OS X v10.0 and later.

Declared in IOMedia.h.

kIOMediaContentMaskKey

A property of IOMedia clients.

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.

Available in OS X v10.0 and later.

Declared in IOMedia.h.

kIOMediaEjectableKey

A property of IOMedia objects.

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.

Available in OS X v10.0 and later.

Declared in IOMedia.h.

kIOMediaIconKey

A property of any object in the media stack.

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.

Available in OS X v10.2 and later.

Declared in IOMedia.h.

kIOMediaLeafKey

A property of IOMedia objects.

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.

Available in OS X v10.0 and later.

Declared in IOMedia.h.

kIOMediaOpenKey

A property of IOMedia objects.

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

Available in OS X v10.5 and later.

Declared in IOMedia.h.

kIOMediaPreferredBlockSizeKey

A property of IOMedia objects.

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.

Available in OS X v10.0 and later.

Declared in IOMedia.h.

kIOMediaRemovableKey

A property of IOMedia objects.

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

Available in OS X v10.2 and later.

Declared in IOMedia.h.

kIOMediaSizeKey

A property of IOMedia objects.

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

Available in OS X v10.0 and later.

Declared in IOMedia.h.

kIOMediaUUIDKey

A property of IOMedia objects.

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

Available in OS X v10.4 and later.

Declared in IOMedia.h.

kIOMediaWholeKey

A property of IOMedia objects.

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).

Available in OS X v10.0 and later.

Declared in IOMedia.h.

kIOMediaWritableKey

A property of IOMedia objects.

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

Available in OS X v10.0 and later.

Declared in IOMedia.h.

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.

Available in OS X v10.4 and later.

Declared in IOMedia.h.

kIOMediaAttributeRemovableMask

Indicates whether the media is removable from the drive mechanism.

Available in OS X v10.4 and later.

Declared in IOMedia.h.

Discussion

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