// 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.Threading;
using System.Threading.Tasks;
using StrixMusic.Sdk.AppModels;
namespace StrixMusic.Sdk.BaseModels
{
///
/// A collection of s and the properties and methods for using and manipulating them.
///
public interface IArtistCollectionBase : IPlayableCollectionBase, IArtistCollectionItemBase, IAsyncDisposable
{
///
/// The total number of available Artists.
///
int TotalArtistItemsCount { get; }
///
/// If true, can be used.
///
bool IsPlayArtistCollectionAsyncAvailable { get; }
///
/// If true, can be used.
///
bool IsPauseArtistCollectionAsyncAvailable { get; }
///
/// Attempts to play the Artist collection, or resumes playback if already playing.
///
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task PlayArtistCollectionAsync(CancellationToken cancellationToken = default);
///
/// Attempts to pause the Artist collection.
///
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task PauseArtistCollectionAsync(CancellationToken cancellationToken = default);
///
/// Removes the artist from the collection on the backend.
///
/// The index of the artist to remove.
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task RemoveArtistItemAsync(int index, CancellationToken cancellationToken = default);
///
/// Checks if the backend supports adding an at a specific index.
///
/// A representing the asynchronous operation. If value is true, a new can be added.
Task IsAddArtistItemAvailableAsync(int index, CancellationToken cancellationToken = default);
///
/// Checks if the backend supports removing an at a specific index.
///
/// A representing the asynchronous operation. If value is true, the can be removed.
Task IsRemoveArtistItemAvailableAsync(int index, CancellationToken cancellationToken = default);
///
/// Raised when changes.
///
event EventHandler? IsPlayArtistCollectionAsyncAvailableChanged;
///
/// Raised when changes.
///
event EventHandler? IsPauseArtistCollectionAsyncAvailableChanged;
///
/// Fires when the merged changes.
///
event EventHandler? ArtistItemsCountChanged;
}
}