// 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;
namespace StrixMusic.Sdk.BaseModels
{
///
/// A collection of s and the properties and methods for using and manipulating them.
///
public interface IAlbumCollectionBase : IPlayableCollectionBase, IAlbumCollectionItemBase, IAsyncDisposable
{
///
/// The total number of available Albums.
///
int TotalAlbumItemsCount { get; }
///
/// If true, can be used.
///
bool IsPlayAlbumCollectionAsyncAvailable { get; }
///
/// If true, can be used.
///
bool IsPauseAlbumCollectionAsyncAvailable { get; }
///
/// Attempts to play the album 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 PlayAlbumCollectionAsync(CancellationToken cancellationToken = default);
///
/// Attempts to pause the album collection.
///
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task PauseAlbumCollectionAsync(CancellationToken cancellationToken = default);
///
/// Removes the album from the collection on the backend.
///
/// The index of the album to remove.
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task RemoveAlbumItemAsync(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 IsAddAlbumItemAvailableAsync(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 IsRemoveAlbumItemAvailableAsync(int index, CancellationToken cancellationToken = default);
///
/// Raised when changes.
///
event EventHandler? IsPlayAlbumCollectionAsyncAvailableChanged;
///
/// Raised when changes.
///
event EventHandler? IsPauseAlbumCollectionAsyncAvailableChanged;
///
/// Fires when the merged changes.
///
event EventHandler? AlbumItemsCountChanged;
}
}