DRCoreErrors.h Reference

Declared in
DRCoreErrors.h

Overview

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

See the Overview section above for header-level documentation.

DRCopyLocalizedStringForAdditionalSense

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

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.

Availability
  • Available in OS X v10.2 and later.
Declared In
DRCoreErrors.h

DRCopyLocalizedStringForDiscRecordingError

Maps an operating system error code to a localized string.

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.

Availability
  • Available in OS X v10.2 and later.
Declared In
DRCoreErrors.h

DRCopyLocalizedStringForSenseCode

Maps a SCSI sense code to a localized string.

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.

Availability
  • Available in OS X v10.2 and later.
Declared In
DRCoreErrors.h

Constants

See the Overview section above for header-level documentation.

Global Constants

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.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

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.

Available in OS X v10.4 and later.

Declared in DRCoreErrors.h.

kDRErrorStatusErrorKey

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

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

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.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

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.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

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.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

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.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

DiscRecording Errors

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.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRDeviceAccessErr

Device is not accessible, hardware is disconnected, etc.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRDeviceBusyErr

Device is in use by another process

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRDeviceCommunicationErr

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

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRDeviceInvalidErr

Attempt was made to use an invalid DRDeviceRef.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRDeviceNotReadyErr

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

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRDeviceNotSupportedErr

Device is not supported for the requested burn operation.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRMediaBusyErr

Disc is busy, usually indicating the volume is unmountable.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRMediaNotPresentErr

Disc isn't present, and needs to be.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRMediaNotWritableErr

Disc isn't writable, and needs to be.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRMediaNotSupportedErr

Disc isn't supported for the requested burn operation.

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRMediaNotBlankErr

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

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRMediaNotErasableErr

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

Available in OS X v10.3 and later.

Declared in DRCoreErrors.h.

kDRMediaInvalidErr

Requested operation attempted on invalid media.

Available in OS X v10.5 and later.

Declared in DRCoreErrors.h.

kDRBurnUnderrunErr

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

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRBurnNotAllowedErr

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

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRDataProductionErr

Error while producing data for the burn

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRVerificationFailedErr

Data verification failed

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRTooManyTracksForDVDErr

DVD discs can contain only one track

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRBadLayoutErr

Too many tracks or sessions

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRUserCanceledErr

User canceled the burn

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRFunctionNotSupportedErr

Track producer cannot perform requested function

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRSpeedTestAlreadyRunningErr

Speed test is already running on requested track

Available in OS X v10.5 and later.

Declared in DRCoreErrors.h.

kDRInvalidIndexPointsErr

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

Available in OS X v10.5 and later.

Declared in DRCoreErrors.h.

kDRDoubleLayerL0DataZoneBlocksParamErr

Layer 0 transition point is invalid

Available in OS X v10.5 and later.

Declared in DRCoreErrors.h.

kDRDoubleLayerL0AlreadySpecifiedErr

Layer 0 transition point is already specified for this media

Available in OS X v10.5 and later.

Declared in DRCoreErrors.h.

kDRAudioFileNotSupportedErr

The audio file producer does not support the requested file.

Available in OS X v10.5 and later.

Declared in DRCoreErrors.h.

kDRBurnPowerCalibrationErr

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

Available in OS X v10.5 and later.

Declared in DRCoreErrors.h.

kDRBurnMediaWriteFailureErr

The burn failed because of a medium write error.

Available in OS X v10.5 and later.

Declared in DRCoreErrors.h.

kDRTrackReusedErr

One or more tracks were included multiple times in the burn

Available in OS X v10.4 and later.

Declared in DRCoreErrors.h.

kDRFileModifiedDuringBurnErr

File changed during flatten or burn

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRFileLocationConflictErr

Conflicting locations specified for two files

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRTooManyNameConflictsErr

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

Available in OS X v10.2 and later.

Declared in DRCoreErrors.h.

kDRFilesystemsNotSupportedErr

The selected filesystems are not valid for use on this media

Available in OS X v10.5 and later.

Declared in DRCoreErrors.h.

kDRDeviceCantWriteCDTextErr

Device does not support writing CD-Text

Available in OS X v10.4 and later.

Declared in DRCoreErrors.h.

kDRDeviceBurnStrategyNotAvailableErr

Device does not support the required burn strategy for this burn

Available in OS X v10.3 and later.

Declared in DRCoreErrors.h.

kDRDeviceCantWriteIndexPointsErr

Device does not support writing index points

Available in OS X v10.3 and later.

Declared in DRCoreErrors.h.

kDRDeviceCantWriteISRCErr

Device does not support writing ISRC

Available in OS X v10.3 and later.

Declared in DRCoreErrors.h.

kDRDeviceCantWriteSCMSErr

Device does not support writing SCMS

Available in OS X v10.3 and later.

Declared in DRCoreErrors.h.

kDRDevicePreGapLengthNotValidErr

Device does not support the required pregap length for the track

Available in OS X v10.4 and later.

Declared in DRCoreErrors.h.

Discussion

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