Mac Developer Library

Developer

IOMedia.h Reference

Options
Deployment Target:

On This Page

IOMedia.h Reference

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.

  • Declaration

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

    • kIOMediaContentHintKey

      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

      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

      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

      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

      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

      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

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

    • kIOMediaPreferredBlockSizeKey

      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

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

    • kIOMediaSizeKey

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

    • kIOMediaUUIDKey

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

    • kIOMediaWholeKey

      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

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

  • Declaration

    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.