PrimoBurner(tm) for C++  4.6
CD, DVD and Blu-ray Software Development Kit
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
DeviceCallback Class Reference

The DeviceCallback interface lets you receive progress notifications for long read operations like cue sheet reading, progress notifications for erase and format operations and progress notifications for lead-in/lead-out recording. More...

#include <PrimoBurnerAPI.h>

Inherits Reference.

Public Member Functions

virtual bool_t onContinueReading ()
 The onContinueReading method is called by a Device instance to check if a long read operation should continue. More...
 
virtual void onEraseProgress (double progress)
 The onEraseProgress method is called by an Device instance to report the progress of a blanking operation started with the Device::eraseEx method. More...
 
virtual void onFormatProgress (double progress)
 The onFormatProgress method is called by an Device instance to report the progress of a format operation started with the Device::format method. More...
 
virtual void onRead (int32_t startLba, int32_t endLba, int32_t currentLba, uint32_t blocks)
 The onRead method is called to report the progress of a long read operation. More...
 
virtual void onWriteLeadIn (uint32_t blocks, uint32_t allBlocks)
 The onWriteLeadIn method is called to report the progress during the recording of the lead in area of a CD session when RAW CD writing is used. More...
 
virtual void onWriteLeadOut (uint32_t blocks, uint32_t allBlocks)
 The onWriteLeadOut method is called to report the progress during the recording of the lead out area of a CD session when RAW CD writing is used. More...
 
int32_t release () const
 Simple implementation of primo::Reference::release. More...
 
int32_t retain () const
 Simple implementation of primo::Reference::retain. More...
 
int32_t retainCount () const
 Simple implementation of primo::Reference::retainCount. More...
 

Detailed Description

The DeviceCallback interface lets you receive progress notifications for long read operations like cue sheet reading, progress notifications for erase and format operations and progress notifications for lead-in/lead-out recording.

Member Function Documentation

virtual bool_t onContinueReading ( )
virtual

The onContinueReading method is called by a Device instance to check if a long read operation should continue.

Returns
1 The reading should continue.
0 The reading should be aborted.
virtual void onEraseProgress ( double  progress)
virtual

The onEraseProgress method is called by an Device instance to report the progress of a blanking operation started with the Device::eraseEx method.

The onEraseProgress method is called from a thread different from the thread the Device::eraseEx method has been called.

Parameters
progressA percentage value showing the progress of the current blanking operation.

IMPORTANT: Some devices do not report the blanking progress properly. For those devices this method is called twice - once with progress = 0.0% in the beginning and once with dProgress = 100.0% at the end of the blanking operation.

virtual void onFormatProgress ( double  progress)
virtual

The onFormatProgress method is called by an Device instance to report the progress of a format operation started with the Device::format method.

The onFormatProgress method is called on a thread different than the one on which Device::format has been called.

Parameters
progressA percentage value showing the progress of the current format operation.
virtual void onRead ( int32_t  startLba,
int32_t  endLba,
int32_t  currentLba,
uint32_t  blocks 
)
virtual

The onRead method is called to report the progress of a long read operation.

Parameters
startLbaThe logical block address from which the reading started.
endLbaThe logical block address of the last block that will be read.
currentLbaThe logical block address after the last read cycle.
blocksNumber of blocks read with the last read cycle.
virtual void onWriteLeadIn ( uint32_t  blocks,
uint32_t  allBlocks 
)
virtual

The onWriteLeadIn method is called to report the progress during the recording of the lead in area of a CD session when RAW CD writing is used.

NOTE: The lead-in area is written directly by PrimoBurner only when all of the following conditions are met:

  1. The medium is a CD.
  2. The write method is RawDao, RawDao2352 or FullRawDao.
  3. The burner device supports RAW CD writing (CDFeatures::canWriteRawDao() is TRUE). In all other cases this notification is not raised.
Parameters
blocksThe number of blocks that have been written.
allBlocksThe total number of blocks that will be written.
virtual void onWriteLeadOut ( uint32_t  blocks,
uint32_t  allBlocks 
)
virtual

The onWriteLeadOut method is called to report the progress during the recording of the lead out area of a CD session when RAW CD writing is used.

NOTE: The lead-out area is written directly by PrimoBurner only when all of the following conditions are met:

  1. The medium is a CD.
  2. The write method is RawDao, RawDao2352 or FullRawDao.
  3. The burner device supports RAW CD writing (CDFeatures::canWriteRawDao() is TRUE). In all other cases this notification is not raised.
Parameters
blocksThe number of blocks that have been written.
allBlocksThe total number of blocks that will be written.
int32_t release ( ) const
virtual

Simple implementation of primo::Reference::release.

Returns
The updated reference count.

Implements Reference.

int32_t retain ( ) const
virtual

Simple implementation of primo::Reference::retain.

Returns
The updated reference count.

Implements Reference.

int32_t retainCount ( ) const
virtual

Simple implementation of primo::Reference::retainCount.

Returns
The current reference count.

Implements Reference.