import type { NobjcObject } from "objc-js";
import type { _DRBurn } from "./DRBurn.js";
import type { _DRTrack } from "./DRTrack.js";
import type { _NSDictionary } from "../Foundation/NSDictionary.js";
export interface _DRTrackDataProduction {
    /**
     * @method estimateLengthOfTrack: @abstract Estimates the size of the track to be burned. @discussion This message is sent outside of a burn cycle in response to a -estimateLength message sent to the track. @param track The track object for which to estimate the size @result The number of blocks of data that the track will occupy. The estimate should be reasonably accurate, and no smaller than the actual size that will be needed.
     */
    estimateLengthOfTrack$?(track: _DRTrack): number;
    /**
     * @method prepareTrack:forBurn:toMedia: @abstract Prepares the track for burning. @discussion Called before any burning starts. Do any sort of setup that needs to be performed (such as opening files). This method can calculate and update the exact track length that will be burned. Since this method is called before the laser is turned on, this method can perform time consuming tasks. @param track The track object being burned @param burn The burn object controlling the burn @param mediaInfo The media being burned to. This is the same dictionary as returned by @link //apple_ref/occ/instm/DRDevice/status -[DRDevice status] @/link. @result <i>YES</i> to indicate that the burn should proceed and <i>NO</i> to indicate a failure occurred.
     */
    prepareTrack$forBurn$toMedia$?(track: _DRTrack, burn: _DRBurn, mediaInfo: _NSDictionary): boolean;
    /**
     * @method cleanupTrackAfterBurn: @abstract Cleans up the track after the burn completes. @discussion Called after burning is complete. Typically you'll clean up what was setup in <b>prepareTrackForBurn</b>. Since this method is called after the laser is turned off and the burn is finished, this method can perform time consuming tasks. @param track The track object being burned @result <i>YES</i> to indicate that the burn should proceed and <i>NO</i> to indicate a failure occurred.
     */
    cleanupTrackAfterBurn$?(track: _DRTrack): void;
    /**
     * @method producePreGapForTrack:intoBuffer:length:atAddress:blockSize:ioFlags: @abstract Produces the pregap data. @discussion This method is called to obtain data for the track's pregap. If the @link DRPreGapLengthKey DRPreGapLengthKey @/link key is present in the track properties, the track producer will be asked for the pregap data first. If the producer implements this selector, then it's the responsibility of the producer to provide data for the pregap, otherwise that length of silence will be produced by DiscRecording. The buffer passed in will be a multiple of blockSize (bufferLength == blockSize * N, where N > 1) and should be filled as full as possible with data. address is the sector address on the disc from the start of the track that is the buffer will be written to. Since while burning, keeping the drive's buffer full is of utmost importance, you should not perform lengthy operations or block for data in this method. This method should return the number of bytes actually in the buffer or 0 to indicate that there was an error producing the data.. @param track The track object being burned @param buffer The buffer to place data into @param bufferLength The length of buffer @param address The on-disc address of where data will be written @param blockSize the size of each block on the disc. It's best to return a multiple of this size. @param flags flags @result The number of bytes produced.
     */
    producePreGapForTrack$intoBuffer$length$atAddress$blockSize$ioFlags$?(track: _DRTrack, buffer: string, bufferLength: number, address: number, blockSize: number, flags: NobjcObject): number;
    /**
     * @method produceDataForTrack:intoBuffer:length:atAddress:blockSize:ioFlags: @abstract Produces the track data. @discussion This method is called many times over the course of a burn to obtain data for the track. The buffer passed in will be a multiple of blockSize (bufferLength == blockSize * N, where N > 1) and should be filled as full as possible with data. address is the sector address on the disc from the start of the track that is the buffer will be written to. Since while burning, keeping the drive's buffer full is of utmost importance, you should not perform lengthy operations or block for data in this method. This method should return the number of bytes actually in the buffer or 0 to indicate that there was an error producing the data.. @param track The track object being burned @param buffer The buffer to place data into @param bufferLength The length of buffer @param address The on-disc address of where data will be written @param blockSize the size of each block on the disc. It's best to return a multiple of this size. @param flags flags @result The number of bytes produced.
     */
    produceDataForTrack$intoBuffer$length$atAddress$blockSize$ioFlags$?(track: _DRTrack, buffer: string, bufferLength: number, address: number, blockSize: number, flags: NobjcObject): number;
    /**
     * @method prepareTrackForVerification: @abstract Prepare the track to be verified. @discussion This method is called after the burn complets writing data to disc and before verification phase starts. Now would be a good time to prepare to produce data again by rewinding to the start of files, etc. @param track The track object being burned @result <i>YES</i> to indicate that the verification should proceed and <i>NO</i> to indicate a failure occurred.
     */
    prepareTrackForVerification$?(track: _DRTrack): boolean;
    /**
     * @method verifyPreGapForTrack:inBuffer:length:atAddress:blockSize:ioFlags: @abstract Checks the integrity track pregap after a burn. @discussion If the class implementing this method asks for a verification type of @link DRVerificationTypeReceiveData DRVerificationTypeReceiveData @/link, then a series of calls to this method will start. It's up to the class to reproduce the pregap again and compare it to the data passed in buffer. The buffer passed in will be a multiple of blockSize (bufferLength == blockSize * N, where N > 1). address is the sector address on the disc from the start of the track that is the buffer was written to. @param track The track object being burned @param buffer The data read in from the track to compare with @param bufferLength The length of buffer @param address The on-disc address of where data will was read from. @param blockSize the size of each block on the disc. It's best to return a multiple of this size. @param flags flags @result <i>YES</i> to indicate that the data compared successfully and <i>NO</i> to indicate a failure occurred.
     */
    verifyPreGapForTrack$inBuffer$length$atAddress$blockSize$ioFlags$?(track: _DRTrack, buffer: string, bufferLength: number, address: number, blockSize: number, flags: NobjcObject): boolean;
    /**
     * @method verifyDataForTrack:inBuffer:length:atAddress:blockSize:ioFlags: @abstract Cleans up the track after the burn completes. @discussion If the class implementing this method asks for a verification type of @link DRVerificationTypeReceiveData DRVerificationTypeReceiveData @/link, then a series of calls to this method will start. It's up to the class to reproduce the data again and compare it to the data passed in buffer. The buffer passed in will be a multiple of blockSize (bufferLength == blockSize * N, where N > 1). address is the sector address on the disc from the start of the track that is the buffer was written to. @param track The track object being burned @param buffer The data read in from the track to compare with @param bufferLength The length of buffer @param address The on-disc address of where data will was read from. @param blockSize the size of each block on the disc. It's best to return a multiple of this size. @param flags flags @result <i>YES</i> to indicate that the data compared successfully and <i>NO</i> to indicate a failure occurred.
     */
    verifyDataForTrack$inBuffer$length$atAddress$blockSize$ioFlags$?(track: _DRTrack, buffer: string, bufferLength: number, address: number, blockSize: number, flags: NobjcObject): boolean;
    /**
     * @method cleanupTrackAfterVerification: @abstract Cleans up the track after the verification completes. @discussion Once the verification phase is complete, this method is called. The class implementing the method has a chance to do anything up to and including failing the verification. @param track The track object being burned @result Return <i>YES</i> to indicate success, <i>NO</i> to indicate failure.
     */
    cleanupTrackAfterVerification$?(track: _DRTrack): boolean;
}
