import BaseObject from "./baseObject"; import { ByteVector } from "../../byteVector"; import { ObjectType } from "../constants"; import { DataType, DescriptorBase, DescriptorValue } from "./descriptorBase"; import { File } from "../../file"; /** * This class provides a representation of an ASF content descriptor to be used in combination with * {@link ExtendedContentDescriptionObject}. * @remarks * This class can store various types of information. Although {@link toString} provides * a representation of all types of values, it is recommended to determine which of the `get*` * methods to use by accessing {@link type} */ export declare class ContentDescriptor extends DescriptorBase { constructor(name: string, type: DataType, value: DescriptorValue); /** * Instantiates a new instance by reading in the contents from a file. * @param file The file to read the raw ASF description record from * @internal */ static fromFile(file: File): ContentDescriptor; /** @inheritDoc */ render(): ByteVector; } /** * This class provides a representation of an ASF extended contend description object which can be * read from and written to disk. */ export declare class ExtendedContentDescriptionObject extends BaseObject { private _descriptors; private constructor(); /** * Constructs and initializes a new, empty extended content description object. */ static fromEmpty(): ExtendedContentDescriptionObject; /** * Constructs and initializes a new instance that is read in from the provided file at the * provided position. * @param file File to read the instance from. Must not be falsey * @param position Position in the file where the instance begins. Must be a positive, safe * integer. */ static fromFile(file: File, position: number): ExtendedContentDescriptionObject; /** * Gets all descriptors stored in the current instance. */ get descriptors(): ContentDescriptor[]; /** * Gets whether the current instance contains any records. * @returns * `true` if the current instance does not contain any records, `false` * otherwise. */ get isEmpty(): boolean; /** @inheritDoc */ get objectType(): ObjectType; /** * Adds a descriptor to the current instance. * @param descriptor Record to add to the current instance */ addDescriptor(descriptor: ContentDescriptor): void; /** * Gets all descriptors with a name matching one of the provided collection of names the * current instance. * @param names List of names of the records to return */ getDescriptors(...names: string[]): ContentDescriptor[]; /** * Removes all descriptors with a given name from the current instance. * @param name Name of the descriptor to be removed */ removeDescriptors(name: string): void; /** @inheritDoc */ render(): ByteVector; /** * Sets a collection of descriptors for a given name, removing the existing matching records. * @remarks * All added descriptors should have their name set to `name` but this is not * verified by the method. The descriptors will be added with their own names and not the * one provided as an argument, which is only used for removing existing values and * determining where to position the new descriptors. * @param name Name of the descriptors to be added/removed * @param descriptors Descriptors to add to the new instance */ setDescriptors(name: string, ...descriptors: ContentDescriptor[]): void; }