using System;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Providers
{
///
/// Marker interface
///
public interface IMetadataProvider
{
///
/// Gets the name.
///
/// The name.
string Name { get; }
}
public interface IMetadataProvider : IMetadataProvider
where TItemType : IHasMetadata
{
}
public interface ILocalMetadataProvider : IMetadataProvider
{
///
/// Determines whether [has local metadata] [the specified item].
///
/// The item.
/// true if [has local metadata] [the specified item]; otherwise, false.
bool HasLocalMetadata(IHasMetadata item);
}
public interface IRemoteMetadataProvider : IMetadataProvider
{
}
public interface IRemoteMetadataProvider : IMetadataProvider, IRemoteMetadataProvider
where TItemType : IHasMetadata
{
Task> GetMetadata(ItemId id, CancellationToken cancellationToken);
}
public interface ILocalMetadataProvider : IMetadataProvider, ILocalMetadataProvider
where TItemType : IHasMetadata
{
Task> GetMetadata(string path, CancellationToken cancellationToken);
}
public interface IHasChangeMonitor
{
///
/// Determines whether the specified item has changed.
///
/// The item.
/// The date.
/// true if the specified item has changed; otherwise, false.
bool HasChanged(IHasMetadata item, DateTime date);
}
public class MetadataResult
where T : IHasMetadata
{
public bool HasMetadata { get; set; }
public T Item { get; set; }
}
}