PTBurn SDK
Page 50 of 53
© 2005, Primera Technology, Inc. Primera is a registered trademark and Bravo is a trademark of Primera Technology, Inc. All other trademarks
are the property of their respective companies.
8 Appendix D: Loading/Unloading Override
PTBurn now allows an external program to override disc load/unload functionality. This is
useful if you want to do some external processing of the disc, either before recording or after
recording. This also allows the ability to load discs into the drive so an external program can
read information from the drive (without performing any recording). An example of one use of
this functionality is detailed below:
The user wants to run their own “special” verification procedure on the disc. They want this
procedure to run prior to unloading the disc to the printer and want to be able to control whether
the disc passes or fails based on their verification.
•
User submits a Recording/Printing job with LoadUnloadOverride = YES.
•
Once the disc is loaded, PTBurn will set the following values in the Job specific status
section:
[JobXYZ]
LoadDiscState0 = 1
LoadDiscDrive0 = F
•
This notifies the client that the disc is loaded in drive F: and in a hold state until the client
releases the hold state. The user could do some special procedure on the disc at this point
if they desire.
•
The user releases the hold state by sending the “Process Disc” message. For this example
the message file must be called JobXYZ.ptm and the contents are shown below. The
DiscID is the value of X from the LoadDiscStateX in the status file.
Message=
PROCESS_DISC
DiscID=0
•
Once PTBurn processes the “Process Disc” message the .ptm file is deleted and the Job
specific status section is updated as follows:
[JobXYZ]
LoadDiscState0 = 2
LoadDiscDrive0 = F
•
At this point PTBurn will process the recording portion of the job as it was specified in
the .JRQ file. If no recording is specified in the JRQ file, the PTBurn will skip over the
recording phase.
•
Once completed, PTBurn will enter a hold state with the job status section as follows:
[JobXYZ]
LoadDiscState0 = 3
LoadDiscDrive0 = F
•
At this point, the client can perform his “special” verification procedure on the disc.
•
If the user’s special verification procedure fails, the client can send the “Reject Disc”
message as detailed below. This will cause the hold state to end, and the disc will fail
and be rejected appropriately. The contents of JobXYZ.ptm would be: