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

Copies CD and DVD discs. More...

#include <PrimoBurnerAPI.h>

Inherits Reference.

Public Member Functions

virtual bool_t copyBD (Device *destinationDevice, Device *sourceDevice, bool_t useTemporaryFiles=1)=0
 Copies a Blu-ray disc from one device to a blank Blu-ray disc in another device. More...
 
virtual bool_t copyCD (Device *destinationDevice, Device *sourceDevice, bool_t useTemporaryFiles=1, CDCopyReadMethod::Enum readMethod=CDCopyReadMethod::FullRaw, CDCopyWriteMethod::Enum writeMethod=CDCopyWriteMethod::FullRaw)=0
 Copies a CD from one device to a blank CD in another device. More...
 
virtual bool_t copyDVD (Device *destinationDevice, Device *sourceDevice, bool_t useTemporaryFiles=1)=0
 Copies a DVD from one device to a blank DVD in another device. More...
 
virtual bool_t createImageFromBD (const char_t *imageFile, Device *sourceDevice)=0
 Creates a disc image from a Blu-ray disc. More...
 
virtual bool_t createImageFromCD (const char_t *imageFile, Device *sourceDevice, CDCopyReadMethod::Enum readMethod=CDCopyReadMethod::FullRaw)=0
 Creates an image from a CD. More...
 
virtual bool_t createImageFromDVD (const char_t *imageFile, Device *sourceDevice)=0
 Creates an image from a DVD. More...
 
virtual const ErrorInfoerror () const =0
 Gets error information about the last operation. More...
 
virtual DeviceerrorDevice () const =0
 Gets the device on which the error occurred. More...
 
virtual void setCallback (DiscCopyCallback *callback)=0
 Sets a callback object for progress reporting. More...
 
virtual void setDeleteImageAfterBurn (bool_t deleteSourceImage)=0
 Instructs DiscCopy to delete the source image files after the image is burned on the target disc. More...
 
virtual void setSimulateBurn (bool_t simulate)=0
 Indicates that simulation should be performed instead of real recording. More...
 
virtual bool_t writeImageToBD (Device *destinationDevice, const char_t *imageFile)=0
 Writes a disc image to a blank Blu-ray disc. More...
 
virtual bool_t writeImageToCD (Device *destinationDevice, const char_t *imageFile, CDCopyWriteMethod::Enum writeMethod=CDCopyWriteMethod::FullRaw)=0
 Writes image to blank CD. More...
 
virtual bool_t writeImageToDVD (Device *destinationDevice, const char_t *imageFile)=0
 Writes image to a blank DVD. More...
 
- Public Member Functions inherited from Reference
virtual int32_t release () const =0
 Releases the instance. More...
 
virtual int32_t retain () const =0
 Retains the instance. More...
 
virtual int32_t retainCount () const =0
 Returns the current reference count. More...
 

Protected Member Functions

 ~DiscCopy ()
 This object can be destroyed only by the PrimoBurner library.
 

Detailed Description

Copies CD and DVD discs.

Note:

When creating a disc image the source medium content is read as binary data and stored in an image description file and one or more binary files.

When burning an image to a disc the image description file tells how the content/s of the binary file/s should be written on the target medium, so that it becomes a replica of the source medium. For this reason not all media types could be copied on any other media type.

See DiscCopy::writeImageToCD and DiscCopy::writeImageToDVD methods for more information.

Member Function Documentation

virtual bool_t copyBD ( Device destinationDevice,
Device sourceDevice,
bool_t  useTemporaryFiles = 1 
)
pure virtual

Copies a Blu-ray disc from one device to a blank Blu-ray disc in another device.

Parameters
destinationDeviceDevice instance that describes the physical device containing the BD medium to write the copy image to.
sourceDeviceDevice instance describing the physical device that contains the BD medium to be copied.
useTemporaryFilesSet this parameter to TRUE to create an image of the source disc and store it in temporary image files before burning it to destination disc (after the burning is complete the temporary image files are deleted). Set it to FALSE to use "On the fly" copying in which case no temporary files will be created but the read and write operations will be simultaneous. The default value for this parameter is TRUE.
Returns
1 Success.
0 Failure. Please see DiscCopy::error.
Remarks
The following restrictions apply:

If the source medium is a BD-RE, the resulting image could be written on any type of blank BD. In this case, an image is made of the entire disc, so it may take some time.

If the source medium is a BD-ROM, the resulting image could be written on any type of blank BD.

If the source medium is a BD-R in Sequential Recording Mode (SRM), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) only.

If the source medium is a BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW) only.

In any other case the method will return 0 and DiscCopy::error method will report DiscCopyError::IncompatibleMedia value

NOTE: A blank BD-R in Sequential Recording Mode (SRM) can be formatted for Pseudo Overwrite (POW) using Device::formatBD with BDFormatType::BDFull and BDFormatSubType::BDRSrmPow as parameters.

See Also
Device
DiscCopyError::Enum
virtual bool_t copyCD ( Device destinationDevice,
Device sourceDevice,
bool_t  useTemporaryFiles = 1,
CDCopyReadMethod::Enum  readMethod = CDCopyReadMethod::FullRaw,
CDCopyWriteMethod::Enum  writeMethod = CDCopyWriteMethod::FullRaw 
)
pure virtual

Copies a CD from one device to a blank CD in another device.

Remarks
The following restrictions apply:

If the source medium is a CD-R, the resulting image could be written on any type of CD blank.

If the source medium is a CD-RW, the resulting image could be written on any type of CD blank.

Remarks
DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy::errorDevice will return the device on which the error occurred).
Parameters
destinationDeviceDevice instance that describes the physical device containing the CD medium to write the copy image to
sourceDeviceDevice instance describing the physical device that contains the CD medium to be copied
useTemporaryFilesSet this parameter to TRUE to create an image of the source disc and store it in temporary image files before burning it to the destination disc (after the burning is complete the temporary image files are deleted). Set it to FALSE to use "On the fly" copying in which case no temporary files will be created but the read and write operations will be simultaneous. The default value for this parameter is TRUE.
readMethodRead method to be used. The default value is CDCopyReadMethod::FullRaw.
writeMethodA CDCopyWriteMethod::Enum constant defining the how the image will be written on the target CD. The default value is CDCopyWriteMethod::FullRaw.
Returns
1 Success.
0 Failure. Please see DiscCopy::error.
See Also
Device
CDCopyReadMethod::Enum
CDCopyWriteMethod::Enum
DiscCopyError::Enum
virtual bool_t copyDVD ( Device destinationDevice,
Device sourceDevice,
bool_t  useTemporaryFiles = 1 
)
pure virtual

Copies a DVD from one device to a blank DVD in another device.

Parameters
destinationDeviceDevice instance that describes the physical device containing the DVD medium to write the copy image to.
sourceDeviceDevice instance describing the physical device that contains the DVD medium to be copied.
useTemporaryFilesSet this parameter to TRUE to create an image of the source disc and store it in temporary image files before burning it to destination disc (after the burning is complete the temporary image files are deleted). Set it to FALSE to use "On the fly" copying in which case no temporary files will be created but the read and write operations will be simultaneous. The default value for this parameter is TRUE.
Returns
1 Success.
0 Failure. Please see DiscCopy::error.
Remarks
The following restrictions apply:

If the source medium is a DVD-RAM, the resulting image could be written on any type of DVD blank.

If the source medium is a DVD+RW, the resulting image could be written on any type of DVD blank. In this case, an image is made of the entire disc (4.37 GB), so it may take some time.

If the source medium is a DVD-ROM, the resulting image could be written on any blank.

If the source medium is a DVD-R, the resulting image could be written on any DVD-R blank, or a DVD-RW blank erased for sequential recording.

If the source medium is a DVD-R DL, the resulting image could be written on a DVD-R DL blank.

If the source medium is a DVD-RW in sequential recording mode, the resulting image could be written on a DVD-RW blank erased for sequential recording, or a DVD-R blank.

If the source medium is a DVD-RW in Restricted Overwrite mode, the resulting image could be written on a blank of the same (DVD-RW RO) type.

If the source medium is a DVD+R, the resulting image could be written on a DVD+R blank.

If the source medium is a DVD+R DL, the resulting image could be written on a DVD+R DL blank.

In any other case the method will return 0 and DiscCopy::error method will report DiscCopyError::IncompatibleMedia value

DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy::errorDevice will return the device on which the error occurred).

See Also
Device
DiscCopyError::Enum
virtual bool_t createImageFromBD ( const char_t *  imageFile,
Device sourceDevice 
)
pure virtual

Creates a disc image from a Blu-ray disc.

Parameters
imageFileFull path to the image file (including the file name and the extension).
sourceDeviceDevice instance describing the physical device that contains the BD medium to be copied
Returns
1 Success.
0 Failure. Please see DiscCopy::error.
Remarks
Images from BDs with open sessions cannot be created. In those cases the method returns 0 and DiscCopy::error method will return DiscCopyError::SourceDiscLastSessionOpen value.

Exceptions are BD-RE and BD-R SRM POW media where images are always created.

See Also
Device
DiscCopyError::Enum
virtual bool_t createImageFromCD ( const char_t *  imageFile,
Device sourceDevice,
CDCopyReadMethod::Enum  readMethod = CDCopyReadMethod::FullRaw 
)
pure virtual

Creates an image from a CD.

Parameters
imageFileFull path to the image file (including the file name and the extension).
sourceDeviceDevice instance describing the physical device that contains the CD to be copied.
readMethodRead method to be used.
Returns
1 Success.
0 Failure. Please see DiscCopy::error.
See Also
Device
CDCopyReadMethod::Enum
DiscCopyError::Enum
virtual bool_t createImageFromDVD ( const char_t *  imageFile,
Device sourceDevice 
)
pure virtual

Creates an image from a DVD.

Parameters
imageFileFull path to the image file (including the file name and the extension).
sourceDeviceDevice instance describing the physical device that contains the DVD medium to be copied
Returns
1 Success.
0 Failure. Please see DiscCopy::error.
Remarks
Images from DVDs with open sessions/tracks cannot be created. In those cases the method returns 0 and DiscCopy::error method will return DiscCopyError::SourceDiscLastSessionOpen value.

Exceptions are DVD+RW and DVD RAM media where images are always created.

See Also
Device
DiscCopyError::Enum
virtual const ErrorInfo* error ( ) const
pure virtual

Gets error information about the last operation.

Returns
A pointer to an ErrorInfo object.
virtual Device* errorDevice ( ) const
pure virtual

Gets the device on which the error occurred.

Remarks
The client code can inspect whether this is the source or the destination device and can get more error details by calling Device::error().
Returns
A pointer to
virtual void setCallback ( DiscCopyCallback callback)
pure virtual

Sets a callback object for progress reporting.

Parameters
callbackA pointer to an object that implements DiscCopyCallback interface.
virtual void setDeleteImageAfterBurn ( bool_t  deleteSourceImage)
pure virtual

Instructs DiscCopy to delete the source image files after the image is burned on the target disc.

The default behavior is to keep the source image files.

Parameters
deleteSourceImageSpecifies whether to delete the image after it is written to a disc.
Remarks
This setting is ignored during burning simulation (see DiscCopy::setSimulateBurn method).
virtual void setSimulateBurn ( bool_t  simulate)
pure virtual

Indicates that simulation should be performed instead of real recording.

Parameters
simulateIf TRUE the device is instructed to write in simulation mode.
virtual bool_t writeImageToBD ( Device destinationDevice,
const char_t *  imageFile 
)
pure virtual

Writes a disc image to a blank Blu-ray disc.

Parameters
destinationDeviceDevice instance that describes the physical device containing the BD medium to write the image to
imageFileFull path to the image file (including the file name and the extension) of the image file to be written
Returns
1 Success.
0 Failure. Please see DiscCopy::error.
Remarks
The following restrictions apply:

If the source medium is a BD-RE, the resulting image could be written on any type of blank BD. In this case, an image is made of the entire disc, so it may take some time.

If the source medium is a BD-ROM, the resulting image could be written on any type of blank BD.

If the source medium is a BD-R in Sequential Recording Mode (SRM), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) only.

If the source medium is a BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW), the resulting image could be written on blank BD-R in Sequential Recording Mode (SRM) formatted for Pseudo Overwrite (POW) only.

In any other case the method will return 0 and DiscCopy::error method will report DiscCopyError::IncompatibleMedia value

NOTE: A blank BD-R in Sequential Recording Mode (SRM) can be formatted for Pseudo Overwrite (POW) using Device::FormatBD with BDFormatType::BDFull and BDFormatSubType::BDRSrmPow as parameters.

See Also
Device
DiscCopyError::Enum
virtual bool_t writeImageToCD ( Device destinationDevice,
const char_t *  imageFile,
CDCopyWriteMethod::Enum  writeMethod = CDCopyWriteMethod::FullRaw 
)
pure virtual

Writes image to blank CD.

Remarks
The following restrictions apply:

If the source medium is a CD-R, the resulting image could be written on any type of CD blank.

If the source medium is a CD-RW, the resulting image could be written on any type of CD blank.

IMPORTANT NOTE: DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (the DiscCopy::errorDevice will return the device on which the error occurred).

Parameters
destinationDeviceDevice instance that describes the physical device containing the CD medium to write the image to
imageFileFull path to the image file (including the file name and the extension) of the image file to be written
writeMethodA CDCopyWriteMethod::Enum constant defining how the image will be written on the target CD
Returns
1 Success.
0 Failure. Please see DiscCopy::error.
See Also
Device
CDCopyWriteMethod::Enum
DiscCopyError::Enum
virtual bool_t writeImageToDVD ( Device destinationDevice,
const char_t *  imageFile 
)
pure virtual

Writes image to a blank DVD.

Parameters
destinationDeviceDevice instance that describes the physical device containing the DVD medium to write the image to
imageFileFull path to the image file (including the file name and the extension) of the image file to be written
Returns
1 Success.
0 Failure. Please see DiscCopy::error.
Remarks
The following restrictions apply:

If the source medium is a DVD-RAM, the resulting image could be written on any type of DVD blank.

If the source medium is a DVD+RW, the resulting image could be written on any type of DVD blank. In this case, an image is made of the entire disc (4.37 GB), so it may take some time.

If the source medium is a DVD-ROM, the resulting image could be written on any blank.

If the source medium is a DVD-R, the resulting image could be written on any DVD-R blank, or a DVD-RW blank erased for sequential recording.

If the source medium is a DVD-R DL, the resulting image could be written on a DVD-R DL blank.

If the source medium is a DVD-RW in sequential recording mode, the resulting image could be written on a DVD-RW blank erased for sequential recording, or a DVD-R blank.

If the source medium is a DVD-RW in Restricted Overwrite mode, the resulting image could be written on a blank of the same (DVD-RW RO) type.

If the source medium is a DVD+R, the resulting image could be written on a DVD+R blank.

If the source medium is a DVD+R DL, the resulting image could be written on a DVD+R DL blank.

In any other case the method will return 0 and DiscCopy::error method will report DiscCopyError::IncompatibleMedia value

DiscCopy does not verify whether the target medium has enough space to receive the image data. In such a case the burn process will not be rejected and will proceed until the target device throws an error saying it cannot write on the requested address (DiscCopy::errorDevice will return the device on which the error occurred).

See Also
Device
DiscCopyError::Enum