import AppleAnnotationBox from "./appleAnnotationBox"; import Mpeg4Box from "./mpeg4Box"; import Mpeg4BoxHeader from "../mpeg4BoxHeader"; import { AppleDataBox } from "./appleDataBox"; import { ByteVector } from "../../byteVector"; /** * This class extends {@link Mpeg4Box} to provide an implementation of an Apple ItemListBox. */ export default class AppleItemListBox extends Mpeg4Box { /** * Private constructor to force construction via static functions. */ private constructor(); /** * Constructs and initializes a new instance of {@link AppleItemListBox} with a provided header and * handler by reading the contents from a specified file. * @param header A {@link Mpeg4BoxHeader} object containing the header to use for the new instance. * @param handlerType Type of the handler box object containing the handler that applies to the * new instance, or undefined if no handler applies. */ static fromHeader(header: Mpeg4BoxHeader, handlerType: ByteVector): AppleItemListBox; /** * Constructs and initializes a new instance of {@link AppleItemListBox} with no children. */ static fromEmpty(): AppleItemListBox; /** * Returns the first itunes box object for a given mean/name combination * @param meanString String specifying text for mean box * @param nameString String specifying text for name box * @returns AppleAnnotationBox First iTunes box that contains the desired mean/name combination * or `undefined` if desired box was not found. */ getItunesTagBox(meanString: string, nameString: string): AppleAnnotationBox; /** * Returns all itunes boxes for a given mean/name string. * @param meanString MEAN box contents to search for * @param nameString NAME box contents to search for * @returns AppleAnnotationBox[] All iTunes boxes that contain the desired mean/name * combination. `[]` is returned if no matches were found. */ getItunesTagBoxes(meanString: string, nameString: string): AppleAnnotationBox[]; /** * Gets all DATA boxes that correspond to the specified iTunes MEAN and NAME values. * @param meanString String specifying text for MEAN box * @param nameString String specifying text for NAME box * @returns AppleDataBox[] DATA boxes contained within the iTunes boxes with the given * MEAN/NAME values. `[]` is returned if no matches are found. */ getItunesTagDataBoxes(meanString: string, nameString: string): AppleDataBox[]; /** * Gets all DATA boxes that correspond to the specified QuickTime box type. * @param type Box type to search for * @returns AppleDataBox[] DATA boxes contained within the boxes with the givem type. `[]` is * returned if no matches were found. */ getQuickTimeDataBoxes(type: ByteVector): AppleDataBox[]; /** * Stores the given `dataStrings` as separate iTunes boxes. It clears any existing iTunes * boxes and replaces them with the provided data. Structure will look like: * ``` * - this * - ---- * - MEAN meanString * - NAME nameString * - DATA dataStrings[0] * - ---- * - MEAN meanString * - NAME nameString * - DATA dataStrings[1] * ... * ``` * @param meanString String to use for MEAN box. * @param nameString String to use for NAME box. * @param dataStrings Strings to store in the DATA boxes. */ setItunesTagBoxes(meanString: string, nameString: string, dataStrings: string[]): void; /** * Stores the given `dataBoxes` in the current instance inside a single box of the given * `type`. Any existing boxes of the given `type` will be removed. Structure will look like: * ``` * - this * - type * - dataBoxes[0] * - dataBoxes[1] * ... * ``` * @param type Type of the parent box that will house `dataBoxes` * @param dataBoxes DATA boxes to store in a new parent box. */ setQuickTimeBoxes(type: ByteVector, dataBoxes: AppleDataBox[]): void; }