Files
MP42Foundation/MP42/MP42Metadata.h
T

68 lines
2.3 KiB
Objective-C

//
// MP42Metadata.h
// Subler
//
// Created by Damiano Galassi on 06/02/09.
// Copyright 2009 Damiano Galassi. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MP42MetadataItem.h"
NS_ASSUME_NONNULL_BEGIN
@interface MP42Metadata : NSObject <NSSecureCoding, NSCopying>
/**
* Initializes a new metadata instance by a given URL
*
* @param URL An URL that identifies an xml file.
*
* @return The receiver, initialized with the resource specified by URL.
*/
- (instancetype)initWithURL:(NSURL *)URL;
/**
* Returns the complete list of available metadata.
*/
@property (nonatomic, class, readonly)NSArray<NSString *> *availableMetadata;
/**
* Returns the complete list of writable metadata.
*/
@property (nonatomic, class, readonly)NSArray<NSString *> *writableMetadata;
- (void)addMetadataItem:(MP42MetadataItem *)item;
- (void)removeMetadataItem:(MP42MetadataItem *)item;
@property (nonatomic, readonly) NSArray<MP42MetadataItem *> *items;
/*!
@abstract Filters an array of AVMetadataItems according to identifier.
@param identifier
The identifier that must be matched for a metadata item to be copied to the output array. Items are considered a match not only when their identifiers are equal to the specified identifier, and also when their identifiers conform to the specified identifier.
@result An instance of NSArray containing the metadata items of the target NSArray that match the specified identifier.
*/
- (NSArray<MP42MetadataItem *> *)metadataItemsFilteredByIdentifier:(NSString *)identifier;
/*!
@abstract Filters an array of AVMetadataItems according a data type mask.
@param dataType
The identifier that must be matched for a metadata item to be copied to the output array. Items are considered a match not only when their identifiers are equal to the specified identifier, and also when their identifiers conform to the specified identifier.
@result An instance of NSArray containing the metadata items of the target NSArray that match the specified identifier.
*/
- (NSArray<MP42MetadataItem *> *)metadataItemsFilteredByDataType:(MP42MetadataItemDataType)dataType;
@property (nonatomic, readwrite, copy) NSString *presetName;
/**
Merges the tags of the passed MP42Metadata instance
@param metadata the instance to merge.
*/
- (void)mergeMetadata:(MP42Metadata *)metadata;
@end
NS_ASSUME_NONNULL_END