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

Provides a way for recording all or a portion of DiscArchive content on a single disc. More...

#include <PrimoBurnerAPI.h>

Inherits Reference.

Public Member Functions

virtual DiscLayoutCallbackcallback () const =0
 Gets the current callback set in DiscArchive. More...
 
virtual bool_t close ()=0
 Finalizes the write operations. More...
 
virtual DataFilecontent () const =0
 Gets the layout that will be written on the target disc. More...
 
virtual DataFilecontentOnDisc () const =0
 Gets the description of the layout already present on the target disc before the current layout is written to it. More...
 
virtual Devicedevice (void) const =0
 Gets the Device object which should be used for burning. More...
 
virtual const ErrorInfoerror () const =0
 Gets error information about the last operation. More...
 
virtual DataFilefooter () const =0
 Gets the footer layout to be recorded after the content layout is written on disc. More...
 
virtual int32_t imageSize () const =0
 Gets the number of blocks needed on the target disc to write the content and the footer. More...
 
virtual int32_t mediaFreeSpace () const =0
 Gets the available space in blocks on the target disc before calling any of the write methods. More...
 
virtual bool_t open ()=0
 Prepares the DiscLayout object for recording the selected content and footer to the target disc. More...
 
virtual int32_t sessionStartAddress () const =0
 Sets the address at which content recording will begin on the target disc. More...
 
virtual void setCallback (DiscLayoutCallback *callback)=0
 Sets a callback object to receive notifications from DiscArchive. More...
 
virtual void setDevice (Device *device)=0
 Sets a Device object which should be used for burning. More...
 
virtual void setFooter (DataFile *footer)=0
 Sets the footer layout to be recorded after the content layout is written on disc. More...
 
virtual void setSessionStartAddress (int32_t address)=0
 Sets the address at which content recording will begin on the target disc. More...
 
virtual void setVolumeLabel (const char_t *volumeLabel)=0
 Sets the image volume label. More...
 
virtual const char_t * volumeLabel () const =0
 Gets the volume label of the data image. More...
 
virtual bool_t writeContent ()=0
 Writes the selected content on the target disc. More...
 
virtual bool_t writeFileSystem (bool_t dismountVolume=0)=0
 Writes the file system describing the content of the disc. More...
 
virtual bool_t writeFooter ()=0
 Writes the footer on the target disc. 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...
 

Detailed Description

Provides a way for recording all or a portion of DiscArchive content on a single disc.

Remarks
A DiscLayout object may be obtained only by calling DiscArchive::prepareLayout(). Once obtained the DiscLayout is responsible for writing its content and footer on the target disc, as well as the file system that describes the recorded content and footer.

See the example in DiscArchive for a simple demonstration of how to use DiscArchive and DiscLayout together.

Member Function Documentation

virtual DiscLayoutCallback* callback ( ) const
pure virtual

Gets the current callback set in DiscArchive.

Returns
The callback previously set by setCallback or NULL if no callback is set.
See Also
setCallback
virtual bool_t close ( )
pure virtual

Finalizes the write operations.

Remarks
This method must be called after writeFileSystem() to complete the write sequence.
Returns
TRUE if the operation is successful, FALSE otherwise.
See Also
writeFileSystem
open
virtual DataFile* content ( ) const
pure virtual

Gets the layout that will be written on the target disc.

Returns
A pointer to a DataFile that describes the content layout to be written.
See Also
DiscArchive::content
virtual DataFile* contentOnDisc ( ) const
pure virtual

Gets the description of the layout already present on the target disc before the current layout is written to it.

Returns
A pointer to a DataFile that describes the existing layout on the disc.
virtual Device* device ( void  ) const
pure virtual

Gets the Device object which should be used for burning.

Returns
A pointer to a Device object or NULL if no device is set.
See Also
setDevice
virtual const ErrorInfo* error ( ) const
pure virtual

Gets error information about the last operation.

Returns
A pointer to an ErrorInfo object.
virtual DataFile* footer ( ) const
pure virtual

Gets the footer layout to be recorded after the content layout is written on disc.

Remarks
When a DiscLayout object is created using DiscArchive.prepareLayout(), its footer is a copy of the footer defined originally for the DiscArchive object. It is possible to set a different footer for each DiscLayout object.
Returns
A pointer to a DataFile object that describes the footer layout.
See Also
footer
virtual int32_t imageSize ( ) const
pure virtual

Gets the number of blocks needed on the target disc to write the content and the footer.

Remarks
This method should be used after the DiscLayout::open(), otherwise it will return 0.
Returns
The number of blocks needed to write the content and the footer
0 if the DiscLayout is not opened.
See Also
open
virtual int32_t mediaFreeSpace ( ) const
pure virtual

Gets the available space in blocks on the target disc before calling any of the write methods.

Remarks
This method should be used after the DiscLayout::open(), otherwise it will return 0.
Returns
The number of available blocks on the target disc.
0 if the DiscLayout is not opened.
See Also
open
virtual bool_t open ( )
pure virtual

Prepares the DiscLayout object for recording the selected content and footer to the target disc.

Remarks
This method must be called before writeContent(), writeFooter() and writeFileSystem().
Returns
TRUE The operation is succeeded.
FALSE The operation failed. Check the error() method.
See Also
writeContent
writeFooter
writeFileSystem
close
virtual int32_t sessionStartAddress ( ) const
pure virtual

Sets the address at which content recording will begin on the target disc.

Returns
LBA
virtual void setCallback ( DiscLayoutCallback callback)
pure virtual

Sets a callback object to receive notifications from DiscArchive.

Parameters
callbackA pointer to an object that implements the DiscArchiveCallback interface.
See Also
callback
virtual void setDevice ( Device device)
pure virtual

Sets a Device object which should be used for burning.

Parameters
deviceA pointer to a Device object. The device is retained by AudioCD.
See Also
device
virtual void setFooter ( DataFile footer)
pure virtual

Sets the footer layout to be recorded after the content layout is written on disc.

Parameters
footerA pointer to a DataFile object that describes the footer layout. The DataFile object is retained by DiscLayout.
Remarks
When a DiscLayout object is created using DiscArchive.prepareLayout(), its footer is a copy of the footer defined originally for the DiscArchive object. It is possible to set a different footer for each DiscLayout object.
See Also
footer
virtual void setSessionStartAddress ( int32_t  address)
pure virtual

Sets the address at which content recording will begin on the target disc.

Parameters
addressLBA
Remarks
The session start address may be changed if necessary but this should be done before calling the open() method.
virtual void setVolumeLabel ( const char_t *  volumeLabel)
pure virtual

Sets the image volume label.

Parameters
volumeLabelThe maximum length allowed for the volume label is 32 characters. Only capital letters from A to Z, digits from 0 to 9, and the special characters _ (underscore) are allowed.
virtual const char_t* volumeLabel ( ) const
pure virtual

Gets the volume label of the data image.

Returns
A null-terminated string
virtual bool_t writeContent ( )
pure virtual

Writes the selected content on the target disc.

Returns
TRUE if the operation is successful, FALSE otherwise.
See Also
content
virtual bool_t writeFileSystem ( bool_t  dismountVolume = 0)
pure virtual

Writes the file system describing the content of the disc.

Parameters
dismountVolumeIndicates whether to dismount the volume after the burning. The default value is FALSE.
Remarks
The file system is automatically determined based on the written content and footer as well as any previously loaded data (from previous recording sessions). This method must be called after the content and the footer are written (writeContent() and writeFooter()).
Returns
TRUE if the operation is successful, FALSE otherwise.
See Also
content
footer
writeContent
writeFooter
virtual bool_t writeFooter ( )
pure virtual

Writes the footer on the target disc.

If no footer is set for the current layout this method has no effect.

Returns
TRUE The operation is successful, FALSE otherwise.
    @see footer
    @see setFooter