Mac Developer Library

Developer

DRCoreErrors.h Reference

Options
Deployment Target:

On This Page

DRCoreErrors.h Reference

Disc Recording error codes and descriptions.

Disc Recording provides functions to map OS errors it defines and sense information returned from device command errors to localized string representations.

Included Headers

  • <CoreServices/CoreServices.h>

  • <AvailabilityMacros.h>

Functions

  • Maps the Additional Sense Code (ASC) and Additional Sense Key Qualifier (ASCQ) to a localized string.

    Declaration

    CFStringRef DRCopyLocalizedStringForAdditionalSense( UInt8 ASC, UInt8 ASCQ);

    Parameters

    ASC

    The Additional Sense Code generated by a device conforming the SCSI standard.

    ASCQ

    The Additional Sense Code Qualifier generated by a device conforming to the SCSI standard.

    Return Value

    A value of type CFStringRef containing the localized string. This reference is implicitly retained by the caller.

    Discussion

    This function takes an ASC/ASCQ pair and finds the correct localized string corresponding to that pair. The function attempts to find the exact pair, followed by one of the range ASC codes. If neither of those can be found, it will determine if the pair is reserved or is a vendor specific pair and will return a string indicating that. If a localized string cannot be found, it will return the ASC and ASCQ codes as a string.

  • Maps an operating system error code to a localized string.

    Declaration

    CFStringRef DRCopyLocalizedStringForDiscRecordingError( OSStatus osError);

    Parameters

    osError

    The OS error code.

    Return Value

    A value of type CFStringRef which contains the localized string. This reference is implicitly retained by the caller.

    Discussion

    If a localized string cannot be found, this function returns the error code as a string.

  • Maps a SCSI sense code to a localized string.

    Declaration

    CFStringRef DRCopyLocalizedStringForSenseCode( UInt8 senseCode);

    Parameters

    senseCode

    A sense code generated by a device conforming to the SCSI standard.

    Return Value

    A value of type CFStringRef containing the localized string. This reference is implicitly retained by the caller.

    Discussion

    This function takes a sense code and finds the corresponding localized string. If a localized string cannot be found, it returns the sense code as a string.

Constants

See the Overview section above for header-level documentation.

  • Declaration

    extern const CFStringRef kDRErrorStatusAdditionalSenseStringKey; extern const CFStringRef kDRErrorStatusErrorInfoStringKey; extern const CFStringRef kDRErrorStatusErrorKey; extern const CFStringRef kDRErrorStatusErrorStringKey; extern const CFStringRef kDRErrorStatusKey; extern const CFStringRef kDRErrorStatusSenseCodeStringKey; extern const CFStringRef kDRErrorStatusSenseKey;

    Constants

    • kDRErrorStatusAdditionalSenseStringKey

      A key for the DRErrorStatus dictionary. The value of this key is a CFString object containing the localized string describing the additonal sense from the sense data for the failure. This value is optional and will not be present if the kDRErrorStatusSenseKey key is not present or if a suitable string does not exist to describe the failure.

    • kDRErrorStatusErrorInfoStringKey

      A key for the DRErrorStatus dictionary. The value of this key is a CFString object containing a string providing additional information for the error. This value is optional and may not be present if a suitable string does not exist to describe the failure.

    • kDRErrorStatusErrorKey

      A key for the DRErrorStatus dictionary. The value of this key is a CFNumber object containing the OSStatus value corresponding to the failure.

    • kDRErrorStatusErrorStringKey

      A key for the DRErrorStatus dictionary. The value of this key is a CFString object containing the localized string describing the kDRErrorStatusErrorKey key. This value is optional and may not be present if a suitable string does not exist to describe the failure.

    • kDRErrorStatusKey

      A key for the DRErrorStatus dictionary, returned by any of the DRxxxCopyStatus calls or kDRxxxStatusChangedNotifications, to describe a failure. The value of this key is a CFDictionary object containing error code and device sense information.

    • kDRErrorStatusSenseCodeStringKey

      A key for the DRErrorStatus dictionary. The value of this key is a CFString object containing the localized string describing the sense key from the sense data for the failure. This value is optional and will not be present if the kDRErrorStatusSenseKey key is not present or if a suitable string does not exist to describe the failure.

    • kDRErrorStatusSenseKey

      A key for the DRErrorStatus dictionary. The value of this key is a CFData object containing the device sense data describing the failure. This value is optional and may not be present if the failure was not device-related, or if the device failed in a way which did not provide meaningful sense data.

  • Declaration

    enum { kDRFirstErr = 0x80020000, kDRInternalErr = kDRFirstErr, /* device errors */ kDRDeviceAccessErr = 0x80020020, kDRDeviceBusyErr = 0x80020021, kDRDeviceCommunicationErr = 0x80020022, kDRDeviceInvalidErr = 0x80020023, kDRDeviceNotReadyErr = 0x80020024, kDRDeviceNotSupportedErr = 0x80020025, /* media errors */ kDRMediaBusyErr = 0x80020040, kDRMediaNotPresentErr = 0x80020041, kDRMediaNotWritableErr = 0x80020042, kDRMediaNotSupportedErr = 0x80020043, kDRMediaNotBlankErr = 0x80020044, kDRMediaNotErasableErr = 0x80020045, kDRMediaInvalidErr = 0x80020046, /* burn errors */ kDRBurnUnderrunErr = 0x80020060, kDRBurnNotAllowedErr = 0x80020061, kDRDataProductionErr = 0x80020062, kDRVerificationFailedErr = 0x80020063, kDRTooManyTracksForDVDErr = 0x80020064, kDRBadLayoutErr = 0x80020065, kDRUserCanceledErr = 0x80020066, kDRFunctionNotSupportedErr = 0x80020067, kDRSpeedTestAlreadyRunningErr = 0x80020068, kDRInvalidIndexPointsErr = 0x80020069, kDRDoubleLayerL0DataZoneBlocksParamErr = 0x8002006A, kDRDoubleLayerL0AlreadySpecifiedErr = 0x8002006B, kDRAudioFileNotSupportedErr = 0x8002006C, kDRBurnPowerCalibrationErr = 0x8002006D, kDRBurnMediaWriteFailureErr = 0x8002006E, kDRTrackReusedErr = 0x8002006F, /* content errors */ kDRFileModifiedDuringBurnErr = 0x80020100, kDRFileLocationConflictErr = 0x80020101, kDRTooManyNameConflictsErr = 0x80020102, kDRFilesystemsNotSupportedErr = 0x80020103, /* drive feature errors */ kDRDeviceBurnStrategyNotAvailableErr = 0x80020200, kDRDeviceCantWriteCDTextErr = 0x80020201, kDRDeviceCantWriteIndexPointsErr = 0x80020202, kDRDeviceCantWriteISRCErr = 0x80020203, kDRDeviceCantWriteSCMSErr = 0x80020204, kDRDevicePreGapLengthNotValidErr = 0x80020205 };

    Constants

    • kDRInternalErr

      Internal Disc Recording error.

    • kDRDeviceAccessErr

      Device is not accessible, hardware is disconnected, etc.

    • kDRDeviceBusyErr

      Device is in use by another process

    • kDRDeviceCommunicationErr

      Device failed to respond properly, unable to recover or retry.

    • kDRDeviceInvalidErr

      Attempt was made to use an invalid DRDeviceRef.

    • kDRDeviceNotReadyErr

      Device is unable to respond now, please try again later.

    • kDRDeviceNotSupportedErr

      Device is not supported for the requested burn operation.

    • kDRMediaBusyErr

      Disc is busy, usually indicating the volume is unmountable.

    • kDRMediaNotPresentErr

      Disc isn't present, and needs to be.

    • kDRMediaNotWritableErr

      Disc isn't writable, and needs to be.

    • kDRMediaNotSupportedErr

      Disc isn't supported for the requested burn operation.

    • kDRMediaNotBlankErr

      Disc isn't blank, and the requested operation needs it to be.

    • kDRMediaNotErasableErr

      Disc isn't erasable, and the requested operation needs it to be.

    • kDRMediaInvalidErr

      Requested operation attempted on invalid media.

    • kDRBurnUnderrunErr

      The burn failed because the device drained its buffer without burn underrun protection.

    • kDRBurnNotAllowedErr

      User is not allowed to burn to this device on this system.

    • kDRDataProductionErr

      Error while producing data for the burn

    • kDRVerificationFailedErr

      Data verification failed

    • kDRTooManyTracksForDVDErr

      DVD discs can contain only one track

    • kDRBadLayoutErr

      Too many tracks or sessions

    • kDRUserCanceledErr

      User canceled the burn

    • kDRFunctionNotSupportedErr

      Track producer cannot perform requested function

    • kDRSpeedTestAlreadyRunningErr

      Speed test is already running on requested track

    • kDRInvalidIndexPointsErr

      Index points were invalid (overlap, out-of-range, etc)

    • kDRDoubleLayerL0DataZoneBlocksParamErr

      Layer 0 transition point is invalid

    • kDRDoubleLayerL0AlreadySpecifiedErr

      Layer 0 transition point is already specified for this media

    • kDRAudioFileNotSupportedErr

      The audio file producer does not support the requested file.

    • kDRBurnPowerCalibrationErr

      The device failed to calibrate the laser power level for this media.

    • kDRBurnMediaWriteFailureErr

      The burn failed because of a medium write error.

    • kDRTrackReusedErr

      One or more tracks were included multiple times in the burn

    • kDRFileModifiedDuringBurnErr

      File changed during flatten or burn

    • kDRFileLocationConflictErr

      Conflicting locations specified for two files

    • kDRTooManyNameConflictsErr

      Too many filename conflicts to resolve (10,000,000 or more)

    • kDRFilesystemsNotSupportedErr

      The selected filesystems are not valid for use on this media

    • kDRDeviceCantWriteCDTextErr

      Device does not support writing CD-Text

    • kDRDeviceBurnStrategyNotAvailableErr

      Device does not support the required burn strategy for this burn

    • kDRDeviceCantWriteIndexPointsErr

      Device does not support writing index points

    • kDRDeviceCantWriteISRCErr

      Device does not support writing ISRC

    • kDRDeviceCantWriteSCMSErr

      Device does not support writing SCMS

    • kDRDevicePreGapLengthNotValidErr

      Device does not support the required pregap length for the track

    Discussion

    Errors returned from the Disc Recording framework. All errors returned by the Disc Recording framework will fall into the range of 0x80020000 -> 0x8002FFFF.