// Copyright (c) Arlo Godfrey. All Rights Reserved. // Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms. // See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information. using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using OwlCore.Events; using StrixMusic.Sdk.AppModels; using StrixMusic.Sdk.MediaPlayback; namespace StrixMusic.Sdk.CoreModels { /// /// Playlist data that was created by the user and should be added as a new item in the backend. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Must use instances to satisfy interface.")] public sealed class InitialCorePlaylistData : ICorePlaylist, ICoreInitialData { private readonly InitialPlaylistData _playlistData; /// /// Create a new instance of . /// /// /// public InitialCorePlaylistData(InitialPlaylistData playlistData, ICore sourceCore) { _playlistData = playlistData; SourceCore = sourceCore; } /// public event EventHandler? PlaybackStateChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? NameChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? DescriptionChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? DurationChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? LastPlayedChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? IsPlayTrackCollectionAsyncAvailableChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? IsPauseTrackCollectionAsyncAvailableChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? IsChangeNameAsyncAvailableChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? IsChangeDescriptionAsyncAvailableChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? IsChangeDurationAsyncAvailableChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event CollectionChangedEventHandler? TracksChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? TracksCountChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event CollectionChangedEventHandler? ImagesChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? ImagesCountChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event CollectionChangedEventHandler? PlaylistItemsChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? IsPlayPlaylistCollectionAsyncAvailableChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? IsPausePlaylistCollectionAsyncAvailableChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? PlaylistItemsCountChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event CollectionChangedEventHandler? UrlsChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public event EventHandler? UrlsCountChanged { add => throw new NotSupportedException(); remove => throw new NotSupportedException(); } /// public int TotalTrackCount => _playlistData.TotalTrackCount; /// public int TotalImageCount => _playlistData.TotalImageCount; /// public int TotalUrlCount => _playlistData.TotalUrlCount; /// public ICore SourceCore { get; } /// public string Id => _playlistData.Id; /// public string Name => _playlistData.Name; /// public string? Description => _playlistData.Description; /// public DateTime? LastPlayed { get; } /// public PlaybackState PlaybackState { get; } /// public TimeSpan Duration { get; } /// public DateTime? AddedAt { get; } = DateTime.Now; /// public ICoreUserProfile? Owner { get; } /// public ICorePlayableCollectionGroup? RelatedItems { get; } /// public bool IsPlayTrackCollectionAsyncAvailable { get; } /// public bool IsPauseTrackCollectionAsyncAvailable { get; } /// public bool IsChangeNameAsyncAvailable { get; } /// public bool IsChangeDescriptionAsyncAvailable { get; } /// public bool IsChangeDurationAsyncAvailable { get; } /// public Task IsAddTrackAvailableAsync(int index, CancellationToken cancellationToken = default) { return Task.FromResult(false); } /// public Task IsRemoveTrackAvailableAsync(int index, CancellationToken cancellationToken = default) { return Task.FromResult(false); } /// public Task IsAddImageAvailableAsync(int index, CancellationToken cancellationToken = default) { return Task.FromResult(false); } /// public Task IsRemoveImageAvailableAsync(int index, CancellationToken cancellationToken = default) { return Task.FromResult(false); } /// public Task IsAddGenreAvailableAsync(int index, CancellationToken cancellationToken = default) { return Task.FromResult(false); } /// public Task IsRemoveGenreAvailableAsync(int index, CancellationToken cancellationToken = default) { return Task.FromResult(false); } /// public Task IsAddUrlAvailableAsync(int index, CancellationToken cancellationToken = default) { return Task.FromResult(false); } /// public Task IsRemoveUrlAvailableAsync(int index, CancellationToken cancellationToken = default) { return Task.FromResult(false); } /// public Task AddTrackAsync(ICoreTrack track, int index, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task AddImageAsync(ICoreImage image, int index, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task RemoveTrackAsync(int index, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task RemoveImageAsync(int index, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task AddUrlAsync(ICoreUrl url, int index, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task RemoveUrlAsync(int index, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task PlayTrackCollectionAsync(CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task PauseTrackCollectionAsync(CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task ChangeNameAsync(string name, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task ChangeDescriptionAsync(string? description, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task ChangeDurationAsync(TimeSpan duration, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public IAsyncEnumerable GetTracksAsync(int limit, int offset, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public IAsyncEnumerable GetImagesAsync(int limit, int offset, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public IAsyncEnumerable GetUrlsAsync(int limit, int offset, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public Task PlayTrackCollectionAsync(ICoreTrack track, CancellationToken cancellationToken = default) { throw new NotSupportedException(); } /// public ValueTask DisposeAsync() { return default; } } }