|
Mac Dev Center
Mac OS X Reference Library Drivers, Kernel, & Hardware: User-Space Device Access Disc Recording UI Framework Reference
|
DREraseSession.h |
| Includes: | <AvailabilityMacros.h> |
Erase configuration and progress user interface for Carbon applications
Presents the progress interface as a non-modal dialog.
Creates a new erase session.
Returns the erase object for this session.
Returns the type identifier of all DREraseSession instances.
Sets the erase object for this session.
Presents the setup interface as a modal dialog.
DREraseSessionBeginProgressDialog |
Presents the progress interface as a non-modal dialog.
extern void DREraseSessionBeginProgressDialog( DREraseSessionRef eraseSession, DREraseSessionProgressDialogOptions *options, DREraseSessionProgressCallbacks *progressCallbacks);
eraseSessionThe erase session object
optionsA pointer to a structure of type DREraseSessionSetupDialogOptions .
progressCallbacksA pointer to a structure of type DREraseSessionProgressCallbacks . This pointer may be NULL if no custom behavior is desired.
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);
eraseSessionThe erase session. If this parameter is not a valid DREraseSessionRef , the behavior is undefined.
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);
eraseSessionThe erase session. If this parameter is not a valid DREraseSessionRef , the behavior is undefined.
eraseThe erase to use for the session. If this parameter is not a valid DREraseRef , the behavior is undefined.
DREraseSessionSetupDialog |
Presents the setup interface as a modal dialog.
extern SInt8 DREraseSessionSetupDialog( DREraseSessionRef eraseSession, DREraseSessionSetupDialogOptions *options, DREraseSessionSetupCallbacks *setupCallbacks);
eraseSessionThe erase session object
optionsA pointer to a structure of type DREraseSessionSetupDialogOptions . This pointer may be NULL if no custom configuration is required.
setupCallbacksA pointer to a structure of type DREraseSessionSetupCallbacks . This pointer may be NULL if no custom behavior is desired.
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.
Callback used for checking the suitability of a device.
Callback used to notify the application of a new device selected.
Callback notifying the application the erase has finished.
Callback used for checking the suitability of media in a device.
Callback notifying the application the erase progress is about to begin.
Specifies progress dialog configuration options.
Callback notifying the application the erase progress has finished.
Specifies setup dialog configuration options.
DREraseSessionDeviceCheckProcPtr |
Callback used for checking the suitability of a device.
typedef Boolean ( *DREraseSessionDeviceCheckProcPtr )( DREraseSessionRef eraseSession, DRDeviceRef device);
eraseSessionThe erase session object.
deviceThe 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);
eraseSessionThe erase session object.
selectedDeviceThe newly selected device.
DREraseSessionEraseCompleteProcPtr |
Callback notifying the application the erase has finished.
typedef Boolean ( *DREraseSessionEraseCompleteProcPtr )( DREraseSessionRef eraseSession, DREraseRef erase);
eraseSessionThe erase session object.
eraseThe 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);
eraseSessionThe erase session object.
deviceThe device containing the media to examine.
promptA 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);
eraseSessionThe 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);
eraseSessionThe 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;
Callback functions passed to the progress dialog.
Options passed into the progress dialog to configure it.
Callback functions passed to the setup dialog.
Options passed into the setup dialog to configure it.
DREraseSessionProgressCallbacks |
Callback functions passed to the progress dialog.
struct DREraseSessionProgressCallbacks { UInt32 version; DREraseSessionProgressBeginNotificationProcPtr progressWillBegin; DREraseSessionProgressFinishNotificationProcPtr progressDidFinish; DREraseSessionEraseCompleteProcPtr eraseDidFinish; };
versionIdentifies the version of this structure.
progressWillBeginPointer to a DREraseSessionProgressBeginNotificationProcPtr. The value of this field may be NULL.
progressDidFinishPointer to a DREraseSessionProgressFinishNotificationProcPtr. The value of this field may be NULL.
eraseDidFinishPointer 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 */ };
versionIdentifies the version of this structure.
dialogOptionFlagsOne of several constants defined by the DREraseSessionProgressDialogOptionFlags data type as described in Erase Progress Dialog Option Flags .
descriptionA 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; };
versionIdentifies the version of this structure.
deviceShouldBeTargetPointer to a DREraseSessionDeviceCheckProcPtr. The value of this field may be NULL.
containsSuitableMediaPointer to a DREraseSessionMediaCheckProcPtr. The value of this field may be NULL.
deviceSelectionChangedPointer 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 */ };
versionIdentifies the version of this structure.
dialogOptionFlagsOne 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 */ };
kEraseSessionProgressDialogDefaultOptionsUse defaults for all the options
Flags used to configure the erase progress dialog behavior
Erase Session Dialog Result Codes |
enum { kDREraseSessionOK = 1, kDREraseSessionCancel = 0 };
kDREraseSessionOKValue returned by the setup dialog when the user has confirmed the erase setup.
kDREraseSessionCancelValue 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 */ };
kEraseSessionSetupDialogDefaultOptionsUse defaults for all the options
kEraseSessionSetupDialogDontHandleReservationsSession does not handle media reservations. Application handles them itself
Flags used to configure the erase setup dialog behavior
kDREraseProgressSetupCallbacksCurrentVersion struct version |
enum { kDREraseProgressSetupCallbacksCurrentVersion = 1 };
Last Updated: 2009-08-13