PrimoBurner(tm) for C++
4.2
CD, DVD and Blu-ray Software Development Kit
|
DiscArchive object provides a way for constructing large file trees and scheduling them for burning over multiple discs. More...
#include <PrimoBurner.h>
Inherits Reference.
Public Member Functions | |
virtual DiscArchiveCallback * | callback () const =0 |
Gets the current callback set in DiscArchive. | |
virtual bool_t | commitLayout (DiscLayout *layout)=0 |
If the recording of the selected layout is successful, call this method to inform DiscArchive that the layout content should not be selected again in when calling DiscArchive::prepareLayout(). | |
virtual DataFile * | content () const =0 |
Gets the layout defined for burning. | |
virtual const ErrorInfo * | error () const =0 |
Gets error information about the last operation. | |
virtual DataFile * | footer () const =0 |
Gets the footer content to be included on each disc being produced with the current archive. | |
virtual DiscArchiveFooterPolicy * | footerPolicy () const =0 |
Gets the policy object that manages footer size. | |
virtual bool_t | hasNextDisc () const =0 |
Check the value of this property to see if there are more files/folders that need to be recorded on a disc. | |
virtual bool_t | prepareArchive ()=0 |
Initializes the archiving process and prepares the content for burning. | |
virtual DiscLayout * | prepareLayout (Device *device, bool_t keepExistingContent)=0 |
Creates a layout for the next disc to be recorded. | |
virtual bool_t | rollbackLayout (DiscLayout *layout)=0 |
Call this method to return the layout content to the archive so that it can be selected again when a call to DiscArchive::prepareLayout method is made. | |
virtual void | setCallback (DiscArchiveCallback *callback)=0 |
Sets a callback object to receive notifications from DiscArchive. | |
virtual void | setContent (DataFile *src)=0 |
Sets the layout defined for burning. | |
virtual void | setFooter (DataFile *src)=0 |
Sets the footer content to be included on each disc being produced with the current archive. | |
virtual void | setFooterPolicy (DiscArchiveFooterPolicy *callback)=0 |
Sets a policy object for managing footer size. |
DiscArchive object provides a way for constructing large file trees and scheduling them for burning over multiple discs.
The following example is a simple demonstration of how DiscArchive and DiscLayout may be used.
... // fetch desired device from a device enumerator (DeviceEnum) Device* device = deviceEnum.createDevice(deviceIndex, TRUE); ... DataFile* content = Library::createDateFile(); DataFile* footer = Library::createDateFile(); //call code that constructs the desired content and footer. ... // Create a new DiscArchive object DiscArchive* archive = Library::createDiscArchive(); // Set archive content and footer archive->setContent(content); archive->setFooter(footer); // initialize archive process archive->prepareArchive(); // while there is content to be written while(archive.hasNextDisc()) { // refresh device device->Refresh(); // fetch new layout to burn DiscLayout* discLayout = archive->prepareLayout(device, FALSE); // prepare layout for recording discLayout->open(); discLayout->writeContent(); discLayout->writeFooter(); discLayout->writeFileSystem(); // finalize layout recording discLayout.close(); // commit layout as recorded archive->commitLayout(discLayout); } archive->release(); ...
virtual DiscArchiveCallback* callback | ( | ) | const [pure virtual] |
Gets the current callback set in DiscArchive.
virtual bool_t commitLayout | ( | DiscLayout * | layout | ) | [pure virtual] |
If the recording of the selected layout is successful, call this method to inform DiscArchive that the layout content should not be selected again in when calling DiscArchive::prepareLayout().
layout | [in] A DiscLayout object previously returned by a call to DiscArchive::prepareLayout(). |
Gets the layout defined for burning.
Gets error information about the last operation.
virtual DiscArchiveFooterPolicy* footerPolicy | ( | ) | const [pure virtual] |
Gets the policy object that manages footer size.
virtual bool_t hasNextDisc | ( | ) | const [pure virtual] |
Check the value of this property to see if there are more files/folders that need to be recorded on a disc.
virtual bool_t prepareArchive | ( | ) | [pure virtual] |
Initializes the archiving process and prepares the content for burning.
Must be called before DiscArchive::prepareLayout()
virtual DiscLayout* prepareLayout | ( | Device * | device, |
bool_t | keepExistingContent | ||
) | [pure virtual] |
Creates a layout for the next disc to be recorded.
The files and the folders in the layout are selected from the remaining unrecorded content (including the footer).
device | A pointer to the device to use for recording the layout. The device should already contain a valid disc in it. |
keepExistingContent | If TRUE the created layout will contain the previously recorded data on the target disc (device parameter) in addition to the new content. |
virtual bool_t rollbackLayout | ( | DiscLayout * | layout | ) | [pure virtual] |
Call this method to return the layout content to the archive so that it can be selected again when a call to DiscArchive::prepareLayout method is made.
layout | A DiscLayout object previously returned by a call to DiscArchive::prepareLayout(). |
virtual void setCallback | ( | DiscArchiveCallback * | callback | ) | [pure virtual] |
Sets a callback object to receive notifications from DiscArchive.
callback | A pointer to an object that implements the DiscArchiveCallback interface. |
virtual void setContent | ( | DataFile * | src | ) | [pure virtual] |
virtual void setFooterPolicy | ( | DiscArchiveFooterPolicy * | callback | ) | [pure virtual] |
Sets a policy object for managing footer size.
callback | A pointer to an object that implements the DiscArchiveFooterPolicy interface. |