ADC Home > Reference Library > Reference > Audio > Carbon > Disc Recording UI Framework Reference
|
DREraseSession.h |
Includes: | <AvailabilityMacros.h> |
Erase configuration and progress user interface for Carbon applications
DREraseSessionBeginProgressDialog |
Presents the progress interface as a non-modal dialog.
extern void DREraseSessionBeginProgressDialog( DREraseSessionRef eraseSession, DREraseSessionProgressDialogOptions *options, DREraseSessionProgressCallbacks *progressCallbacks);
eraseSession
options
progressCallbacks
This function present the user with a non-modal dialog that shows the erase progress.
DREraseSessionCreate |
Creates a new erase session.
extern DREraseSessionRef DREraseSessionCreate( void);
A reference to a new DREraseSession.
DREraseSessionGetErase |
Returns the erase object for this session.
extern DREraseRef DREraseSessionGetErase( DREraseSessionRef eraseSession);
eraseSession
A reference to the erase object for the session. If the setup dialog has not been run or a burn object has not been set with DREraseSessionSetErase , this function returns NULL.
DREraseSessionGetTypeID |
Returns the type identifier of all DREraseSession instances.
extern CFTypeID DREraseSessionGetTypeID( void);
A Core Foundation type ID.
DREraseSessionSetErase |
Sets the erase object for this session.
extern void DREraseSessionSetErase( DREraseSessionRef eraseSession, DREraseRef erase);
eraseSession
erase
DREraseSessionSetupDialog |
Presents the setup interface as a modal dialog.
extern SInt8 DREraseSessionSetupDialog( DREraseSessionRef eraseSession, DREraseSessionSetupDialogOptions *options, DREraseSessionSetupCallbacks *setupCallbacks);
eraseSession
options
setupCallbacks
Returns one of the constants defined by Erase Session Dialog Result Codes .
This function present the user with a modal dialog that allows them to configure an erase to their custom settings. These include: the device to use and the type of erase to perform. and others. The function does not return until the user dismissed the dialog.
DREraseSessionDeviceCheckProcPtr |
Callback used for checking the suitability of a device.
typedef Boolean ( *DREraseSessionDeviceCheckProcPtr )( DREraseSessionRef eraseSession, DRDeviceRef device);
eraseSession
- The erase session object.
device
- The device to examine.
A Boolean value indicating the suitability of the device.
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.
DREraseSessionDeviceSelectionNotificationProcPtr |
Callback used to notify the application of a new device selected.
typedef void ( *DREraseSessionDeviceSelectionNotificationProcPtr )( DREraseSessionRef eraseSession, DRDeviceRef selectedDevice);
eraseSession
- The erase session object.
selectedDevice
- The newly selected device.
DREraseSessionEraseCompleteProcPtr |
Callback notifying the application the erase has finished.
typedef Boolean ( *DREraseSessionEraseCompleteProcPtr )( DREraseSessionRef eraseSession, DREraseRef erase);
eraseSession
- The erase session object.
erase
- The erase instance that just finished.
A Boolean value controlling the display of the erase session's error dialog.
This callback is called when the erase operation completes, either successfully or with an error. This function can be used by the application to present it's own custom end-of-erase handling. If the application wants to present it's own end-of-erase notification, it can do so from this callback. If it does, it can return a false return value to prevent the erase session from presenting it's own notification.
DREraseSessionMediaCheckProcPtr |
Callback used for checking the suitability of media in a device.
typedef Boolean ( *DREraseSessionMediaCheckProcPtr )( DREraseSessionRef eraseSession, DRDeviceRef device, CFStringRef *prompt);
eraseSession
- The erase 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.
A Boolean value indicating the suitability of the media.
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.
DREraseSessionProgressBeginNotificationProcPtr |
Callback notifying the application the erase progress is about to begin.
typedef void ( *DREraseSessionProgressBeginNotificationProcPtr )( DREraseSessionRef eraseSession);
eraseSession
- The erase session object.
This callback is called when the erase 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.
DREraseSessionProgressDialogOptionFlags |
Specifies progress dialog configuration options.
typedef UInt32 DREraseSessionProgressDialogOptionFlags;
DREraseSessionProgressFinishNotificationProcPtr |
Callback notifying the application the erase progress has finished.
typedef void ( *DREraseSessionProgressFinishNotificationProcPtr )( DREraseSessionRef eraseSession);
eraseSession
- The erase session object.
This callback is called when the erase 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.
DREraseSessionRef |
typedef struct __DREraseSession* DREraseSessionRef;
This is the type of a reference to DREraseSession instances.
DREraseSessionSetupDialogOptionFlags |
Specifies setup dialog configuration options.
typedef UInt32 DREraseSessionSetupDialogOptionFlags;
DREraseSessionProgressCallbacks |
Callback functions passed to the progress dialog.
struct DREraseSessionProgressCallbacks { UInt32 version; DREraseSessionProgressBeginNotificationProcPtr progressWillBegin; DREraseSessionProgressFinishNotificationProcPtr progressDidFinish; DREraseSessionEraseCompleteProcPtr eraseDidFinish; };
version
- Identifies the version of this structure.
progressWillBegin
- Pointer to a DREraseSessionProgressBeginNotificationProcPtr. The value of this field may be NULL.
progressDidFinish
- Pointer to a DREraseSessionProgressFinishNotificationProcPtr. The value of this field may be NULL.
eraseDidFinish
- Pointer to a DREraseSessionEraseCompleteProcPtr. The value of this field may be NULL.
DREraseSessionProgressDialogOptions |
Options passed into the progress dialog to configure it.
struct DREraseSessionProgressDialogOptions { UInt32 version; DREraseSessionProgressDialogOptionFlags dialogOptionFlags; /* option flags for affecting the dialog's behavior */ CFStringRef description; /* optional description of the erase */ };
version
- Identifies the version of this structure.
dialogOptionFlags
- One of several constants defined by the DREraseSessionProgressDialogOptionFlags data type as described in Erase 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.
DREraseSessionSetupCallbacks |
Callback functions passed to the setup dialog.
struct DREraseSessionSetupCallbacks { UInt32 version; DREraseSessionDeviceCheckProcPtr deviceShouldBeTarget; DREraseSessionMediaCheckProcPtr containsSuitableMedia; DREraseSessionDeviceSelectionNotificationProcPtr deviceSelectionChanged; };
version
- Identifies the version of this structure.
deviceShouldBeTarget
- Pointer to a DREraseSessionDeviceCheckProcPtr. The value of this field may be NULL.
containsSuitableMedia
- Pointer to a DREraseSessionMediaCheckProcPtr. The value of this field may be NULL.
deviceSelectionChanged
- Pointer to a DREraseSessionDeviceSelectionNotificationProcPtr. The value of this field may be NULL.
DREraseSessionSetupDialogOptions |
Options passed into the setup dialog to configure it.
struct DREraseSessionSetupDialogOptions { UInt32 version; DREraseSessionSetupDialogOptionFlags dialogOptionFlags; /* option flags for affecting the dialog's behavior */ };
version
- Identifies the version of this structure.
dialogOptionFlags
- One of several constants defined by the DREraseSessionSetupDialogOptionFlags data type as described in Erase Setup Dialog Option Flags .
DREraseSessionProgressDialogOptions struct version |
enum { kEraseSessionProgressDialogOptionsCurrentVersion = 1 };
DREraseSessionSetupCallbacks struct version |
enum { kDREraseSessionSetupCallbacksCurrentVersion = 1 };
DREraseSessionSetupDialogOptions struct version |
enum { kEraseSessionSetupDialogOptionsCurrentVersion = 1 };
Erase Progress Dialog Option Flags |
enum { kEraseSessionProgressDialogDefaultOptions = 0x00000000 /* use defaults for all the options */ };
kEraseSessionProgressDialogDefaultOptions
- Use defaults for all the options
Flags used to configure the erase progress dialog behavior
Erase Session Dialog Result Codes |
enum { kDREraseSessionOK = 1, kDREraseSessionCancel = 0 };
kDREraseSessionOK
- Value returned by the setup dialog when the user has confirmed the erase setup.
kDREraseSessionCancel
- Value returned by the setup dialog when the user has canceled the erase setup.
Return codes for the erase session setup dialog.
Erase Setup Dialog Option Flags |
enum { kEraseSessionSetupDialogDefaultOptions = 0x00000000, /* use defaults for all the options */ kEraseSessionSetupDialogDontHandleReservations = 0x00000001, /* Don't handle media reservations. Application handles them itself */ };
kEraseSessionSetupDialogDefaultOptions
- Use defaults for all the options
kEraseSessionSetupDialogDontHandleReservations
- Session does not handle media reservations. Application handles them itself
Flags used to configure the erase setup dialog behavior
kDREraseProgressSetupCallbacksCurrentVersion struct version |
enum { kDREraseProgressSetupCallbacksCurrentVersion = 1 };
|