import { ByteVector } from "../byteVector"; import { Id3v2TagHeader, Id3v2TagHeaderFlags } from "./id3v2TagHeader"; /** * This class provides a representation of an ID3v2 tag footer which can be read from and written * to disk. */ export default class Id3v2TagFooter { /** * Identifier used to recognize an ID3v2 footer. */ static readonly FILE_IDENTIFIER: ByteVector; private _flags; private _majorVersion; private _revisionNumber; private _tagSize; /** * Constructs and initializes a new instance by reading it from raw footer data. * @param data Raw data to build the instance from */ static fromData(data: ByteVector): Id3v2TagFooter; /** * Constructs and initializes a new footer based on the contents of the header used for the * same tag. * @param header Header from which to base the new footer */ static fromHeader(header: Id3v2TagHeader): Id3v2TagFooter; /** * Gets the complete size of the tag described by the current instance including the header * and footer. */ get completeTagSize(): number; /** * Gets the flags applied to the current instance. */ get flags(): Id3v2TagHeaderFlags; /** * Sets the flags applied to the current instance. * @param value Bitwise combined {@link Id3v2TagHeaderFlags} value containing the flags to apply * to the current instance. */ set flags(value: Id3v2TagHeaderFlags); /** * Sets the major version of the tag described by the current instance. */ get majorVersion(): number; /** * Sets the major version of the tag described by the current instance. * When the version is set, unsupported header flags will automatically be removed from the * tag. * @param value ID3v2 version if tag described by the current instance. Footers are only * supported with version 4, so this value can only be 4. */ set majorVersion(value: number); /** * Gets the version revision number of the tag represented by the current instance. */ get revisionNumber(): number; /** * Sets the version revision number of the tag represented by the current instance. * This value should always be zero. Non-zero values indicate an experimental or new version of * the format which may not be completely understood by the current version of * node-taglib-sharp. Some software may refuse to read tags with a non-zero value. * @param value Version revision number of the tag represented by the current instance. Must be * an 8-bit unsigned integer. */ set revisionNumber(value: number); /** * Gets the complete size of the tag described by the current instance, minus the header and * footer. */ get tagSize(): number; /** * Sets the complete size of the tag described by the current instance, minus the header * footer. NOTE THIS MUST BE AN 28-BIT UNSIGNED INTEGER. * @param value Size of the tag in bytes. Must be an unsigned 28-bit integer */ set tagSize(value: number); /** * Renders the current instance as a raw byte vector. */ render(): ByteVector; }