import { ByteVector } from "../../byteVector"; import { FrameIdentifier } from "../frameIdentifiers"; /** * Indicates the flags applied to a {@link Id3v2FrameHeader} object. */ export declare enum Id3v2FrameFlags { /** * Header contains no flags. */ None = 0, /** * Frame is to be deleted if the tag is altered. */ TagAlterPreservation = 16384, /** * Frame is to be deleted if the file is altered. */ FileAlterPreservation = 8192, /** * Frame is read-only and should not be altered. */ ReadOnly = 4096, /** * Frame has a grouping identity. */ GroupingIdentity = 64, /** * Frame data is compressed. */ Compression = 8, /** * Frame data is encrypted. */ Encryption = 4, /** * Frame data has been unsynchronized using the ID3v2 unsynchronization scheme. */ Unsynchronized = 2, /** * Frame has a data length indicator. */ DataLengthIndicator = 1 } /** * This class provides a representation of an ID3v2 frame header which can be read from and * written to disk. */ export declare class Id3v2FrameHeader { private _flags; private _frameId; private _frameSize; /** * Constructs and initializes a new instance by processing the data for the frame header. * @param id Identifier of the frame * @param flags Flags to assign to the frame (if omitted, defaults to * {@link Id3v2FrameFlags.None}) * @param frameSize Size of the frame in bytes, excluding the size of the header (if omitted, * defaults to 0) */ constructor(id: FrameIdentifier, flags?: Id3v2FrameFlags, frameSize?: number); /** * Constructs and initializes a new instance of {@link Id3v2FrameHeader} by reading it from raw * header data of a specified version. * @param data Raw data to build the new instance from. * If the data size is smaller than the size of a full header, the data is just treated as * a frame identifier and the remaining values are zeroed. * @param version ID3v2 version with which the data in `data` was encoded. */ static fromData(data: ByteVector, version: number): Id3v2FrameHeader; /** * Constructs and initializes a new, blank frame header of size 0, with the * provided frame identifier. * @param id Identifier for the frame */ static fromFrameIdentifier(id: FrameIdentifier): Id3v2FrameHeader; /** * Gets the flags applied to the current instance. */ get flags(): Id3v2FrameFlags; /** * Sets the flags applied to the current instance. */ set flags(value: Id3v2FrameFlags); /** * Gets the identifier of the frame described by the current instance. */ get frameId(): FrameIdentifier; /** * Sets the identifier of the frame described by the current instance. */ set frameId(value: FrameIdentifier); /** * Gets the size of the frame described by the current instance, minus the header. */ get frameSize(): number; /** * Sets the size of the frame described by the current instance, minus the header. * Must be a positive, safe integer. */ set frameSize(value: number); /** * Gets the size of a header for a specified ID3v2 version. * @param version Version of ID3v2 to get the size for. Must be a positive integer < 256 */ static getSize(version: number): number; /** * Renders the current instance, encoded in a specified ID3v2 version. * @param version Version of ID3v2 to use when encoding the current instance. */ render(version: number): ByteVector; }