Mac Developer Library

Developer

DRBurnSession.h Reference

Options
Deployment Target:

On This Page

DRBurnSession.h Reference

Burn configuration and progress user interface for Carbon applications

Included Headers

  • <DiscRecording/DiscRecording.h>

  • <Carbon/Carbon.h>

  • <AvailabilityMacros.h>

Functions

  • Presents the progress interface as a non-modal dialog.

    Declaration

    extern void DRBurnSessionBeginProgressDialog( DRBurnSessionRef burnSession, CFTypeRef layout, DRBurnSessionProgressDialogOptions *options, DRBurnSessionProgressCallbacks *progressCallbacks)AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;

    Parameters

    burnSession

    The burn session object

    layout

    The track layout to be used for the burn.

    options

    A pointer to a structure of type DRBurnSessionSetupDialogOptions .

    progressCallbacks

    A pointer to a structure of type DRBurnSessionProgressCallbacks . This pointer may be NULL if no custom behavior is desired.

    Discussion

    This function present the user with a non-modal dialog that shows the burn progress.

  • Creates a new burn session.

    Declaration

    extern DRBurnSessionRef DRBurnSessionCreate( void)AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;

    Return Value

    A reference to a new DRBurnSession.

  • Returns the burn object for this session.

    Declaration

    extern DRBurnRef DRBurnSessionGetBurn( DRBurnSessionRef burnSession)AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;

    Parameters

    burnSession

    The burn session. If this parameter is not a valid DRBurnSessionRef , the behavior is undefined.

    Return Value

    A reference to the burn object for the session. If the setup dialog has not been run or a burn object has not been set with DRBurnSessionSetBurn , this function returns NULL.

  • Returns the type identifier of all DRBurnSession instances.

    Declaration

    extern CFTypeID DRBurnSessionGetTypeID( void)AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;

    Return Value

    A Core Foundation type ID.

  • Sets the burn object for this session.

    Declaration

    extern void DRBurnSessionSetBurn( DRBurnSessionRef burnSession, DRBurnRef burn)AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;

    Parameters

    burnSession

    The burn session. If this parameter is not a valid DRBurnSessionRef , the behavior is undefined.

    burn

    The burn to use for the session. If this parameter is not a valid DRBurnRef , the behavior is undefined.

  • Presents the setup interface as a modal dialog.

    Declaration

    extern SInt8 DRBurnSessionSetupDialog( DRBurnSessionRef burnSession, DRBurnSessionSetupDialogOptions *options, DRBurnSessionSetupCallbacks *setupCallbacks)AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;

    Parameters

    burnSession

    The burn session object

    options

    A pointer to a structure of type DRBurnSessionSetupDialogOptions . This pointer may be NULL if no custom configuration is required.

    setupCallbacks

    A pointer to a structure of type DRBurnSessionSetupCallbacks . This pointer may be NULL if no custom behavior is desired.

    Return Value

    Returns one of the constants defined by Burn Session Dialog Result Codes .

    Discussion

    This function present the user with a modal dialog that allows them to configure a burn to their custom settings. These include: the device to use, whether or not to eject the media when finished, the burn speed and others. The function does not return until the user dismissed the dialog.

Callbacks

  • Callback notifying the application the burn has finished.

    Declaration

    typedef Boolean ( *DRBurnSessionBurnCompleteProcPtr )( DRBurnSessionRef burnSession, DRBurnRef burn);

    Parameters

    burnSession

    The burn session object.

    burn

    The burn instance that just finished.

    Return Value

    A Boolean value controlling the display of the burn session's error dialog.

    Discussion

    This callback is called when the burn operation completes, either successfully or with an error. This function can be used by the application to present it's own custom end-of-burn handling. Return a false return value to prevent the burn session from presenting it's own notification.

  • Callback used for checking the suitability of a device.

    Declaration

    typedef Boolean ( *DRBurnSessionDeviceCheckProcPtr )( DRBurnSessionRef burnSession, DRDeviceRef device);

    Parameters

    burnSession

    The burn session object.

    device

    The device to examine.

    Return Value

    A Boolean value indicating the suitability of the device.

    Discussion

    This callback is called whenever a new device appears. It's purpose is to allow the application to filter out devices which do not support the operation to be performed. for example, a device may filter our CD-R/Ws if it is a DVD creation appliacation.

  • Callback used to notify the application of a new device selected.

    Declaration

    typedef void ( *DRBurnSessionDeviceSelectionNotificationProcPtr )( DRBurnSessionRef burnSession, DRDeviceRef device);

    Parameters

    burnSession

    The burn session object.

    device

    The newly selected device.

  • Callback used for checking the suitability of media in a device.

    Declaration

    typedef Boolean ( *DRBurnSessionMediaCheckProcPtr )( DRBurnSessionRef burnSession, DRDeviceRef device, CFStringRef *prompt);

    Parameters

    burnSession

    The burn session object.

    device

    The device containing the media to examine.

    prompt

    A pointer to a CFStringRef. An application may return a custom message to display in the setup dialog.

    Return Value

    A Boolean value indicating the suitability of the media.

    Discussion

    This callback is called whenever the state of the media has changed. It's purpose is to allow the application to determine if the media is suitable for the operation to be performed. For example, the application an check to see if there is enough space on the media for the data to be written.

  • Callback notifying the application the burn progress is about to begin.

    Declaration

    typedef void ( *DRBurnSessionProgressBeginNotificationProcPtr )( DRBurnSessionRef burnSession);

    Parameters

    burnSession

    The burn session object.

    Discussion

    This callback is called when the burn progress is about to be displayed. This allows the application to do things such as disable the quit menu item, or the close menu for a document window.

  • Callback notifying the application the burn progress has finished.

    Declaration

    typedef void ( *DRBurnSessionProgressFinishNotificationProcPtr )( DRBurnSessionRef burnSession);

    Parameters

    burnSession

    The burn session object.

    Discussion

    This callback is called when the burn progress has been removed from view. This allows the application to do things such as re-enable the quit menu item, or the close menu for a document window.

Data Types

See the Overview for header-level documentation.

  • Specifies progress dialog configuration options.

    Declaration

    typedef UInt32 DRBurnSessionProgressDialogOptionFlags;

    Import Statement

  • Declaration

    typedef struct __DRBurnSession* DRBurnSessionRef;

    Discussion

    This is the type of a reference to DRBurnSession instances.

    Import Statement

  • Specifies setup dialog configuration options.

    Declaration

    typedef UInt32 DRBurnSessionSetupDialogOptionFlags;

    Import Statement

  • Callback functions passed to the progress dialog.

    Declaration

    struct DRBurnSessionProgressCallbacks { UInt32 version; DRBurnSessionProgressBeginNotificationProcPtr progressWillBegin; DRBurnSessionProgressFinishNotificationProcPtr progressDidFinish; DRBurnSessionBurnCompleteProcPtr burnDidFinish; };

    Fields

    version

    Identifies the version of this structure.

    progressWillBegin

    Pointer to a DRBurnSessionProgressBeginNotificationProcPtr. The value of this field may be NULL.

    progressDidFinish

    Pointer to a DRBurnSessionProgressFinishNotificationProcPtr. The value of this field may be NULL.

    burnDidFinish

    Pointer to a DRBurnSessionBurnCompleteProcPtr. The value of this field may be NULL.

  • Options passed into the progress dialog to configure it.

    Declaration

    struct DRBurnSessionProgressDialogOptions { UInt32 version; DRBurnSessionProgressDialogOptionFlags dialogOptionFlags; /* option flags for affecting the dialog's behavior */ CFStringRef description; /* optional description of the burn */ };

    Fields

    version

    Identifies the version of this structure.

    dialogOptionFlags

    One of several constants defined by the DRBurnSessionProgressDialogOptionFlags data type as described in Burn Progress Dialog Option Flags .

    description

    A CFStringRef that defines a custom description to be used for the dialog. If you do not provide this string (passing NULL), the normal description is used.

  • Callback functions passed to the setup dialog.

    Declaration

    struct DRBurnSessionSetupCallbacks { UInt32 version; DRBurnSessionDeviceCheckProcPtr deviceShouldBeTarget; DRBurnSessionMediaCheckProcPtr containsSuitableMedia; DRBurnSessionDeviceSelectionNotificationProcPtr deviceSelectionChanged; };

    Fields

    version

    Identifies the version of this structure.

    deviceShouldBeTarget

    Pointer to a DRBurnSessionDeviceCheckProcPtr. The value of this field may be NULL.

    containsSuitableMedia

    Pointer to a DRBurnSessionMediaCheckProcPtr. The value of this field may be NULL.

    deviceSelectionChanged

    Pointer to a DRBurnSessionDeviceSelectionNotificationProcPtr. The value of this field may be NULL.

  • Options passed into the setup dialog to configure it.

    Declaration

    struct DRBurnSessionSetupDialogOptions { UInt32 version; DRBurnSessionSetupDialogOptionFlags dialogOptionFlags; /* option flags for affecting the dialog's behavior */ CFStringRef defaultButtonTitle; /* title of default button */ };

    Fields

    version

    Identifies the version of this structure.

    dialogOptionFlags

    One of several constants defined by the DRBurnSessionSetupDialogOptionFlags data type as described in Burn Setup Dialog Option Flags .

    defaultButtonTitle

    A CFStringRef that defines a custom title to be used for the dialog's default button. If you do not provide this string (passing NULL), the normal button title is used.

Constants

See the Overview for header-level documentation.

  • Declaration

    enum { kBurnSessionProgressDialogDefaultOptions = 0x00000000 , /* use defaults for all the options */ kBurnSessionProgressDialogDisplayVerboseProgress = 0x00000001 /* Report all status changes in detail */ };

    Constants

    • kBurnSessionProgressDialogDefaultOptions

      Use defaults for all the options

    • kBurnSessionProgressDialogDisplayVerboseProgress

      Report all status changes in detail

    Discussion

    Flags used to configure the burn progress dialog behavior

  • Declaration

    enum { kDRBurnSessionOK = 1, kDRBurnSessionCancel = 0, };

    Constants

    • kDRBurnSessionOK

      Value returned by the setup dialog when the user has confirmed the burn setup.

    • kDRBurnSessionCancel

      Value returned by the setup dialog when the user has canceled the burn setup.

    Discussion

    Return codes for the burn session setup dialog.

  • Declaration

    enum { kBurnSessionSetupDialogDefaultOptions = 0x00000000 , /* use defaults for all the options */ kBurnSessionSetupDialogForceClosedDiscs = 0x00000001 , /* Force discs to be closed (not appendable ) */ kBurnSessionSetupDialogDontHandleReservations = 0x00000002 , /* Don't handle media reservations. Application handles them itself */ kBurnSessionSetupDialogAllowTestBurns = 0x80000004 /* Allow the user to perform a test burn */ };

    Constants

    • kBurnSessionSetupDialogDefaultOptions

      Use defaults for all the options

    • kBurnSessionSetupDialogForceClosedDiscs

      Force discs to be closed (not appendable)

    • kBurnSessionSetupDialogDontHandleReservations

      Burn session does not handle media reservations. Application handles them itself

    • kBurnSessionSetupDialogAllowTestBurns

      Allow the user to perform a test burn

    Discussion

    Flags used to configure the burn setup dialog behavior

  • Declaration

    enum { kBurnSessionProgressDialogOptionsCurrentVersion = 1 };

  • Declaration

    enum { kDRBurnSessionSetupCallbacksCurrentVersion = 1 };

  • Declaration

    enum { kBurnSessionSetupDialogOptionsCurrentVersion = 1 };

  • Declaration

    enum { kDRBurnProgressSetupCallbacksCurrentVersion = 1 };