// 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 IPlaylistCollectionBase : IPlayableCollectionItem, IPlaylistCollectionItemBase, IAsyncDisposable
{
///
/// The total number of available Playlists.
///
int TotalPlaylistItemsCount { get; }
///
/// If true, can be used.
///
bool IsPlayPlaylistCollectionAsyncAvailable { get; }
///
/// If true, can be used.
///
bool IsPausePlaylistCollectionAsyncAvailable { get; }
///
/// Attempts to play the Playlist 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 PlayPlaylistCollectionAsync(CancellationToken cancellationToken = default);
///
/// Attempts to pause the Playlist collection.
///
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task PausePlaylistCollectionAsync(CancellationToken cancellationToken = default);
///
/// Removes the playlist from the collection on the backend.
///
/// The index of the playlist to remove.
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task RemovePlaylistItemAsync(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 IsAddPlaylistItemAvailableAsync(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 IsRemovePlaylistItemAvailableAsync(int index, CancellationToken cancellationToken = default);
///
/// Raised when changes.
///
event EventHandler? IsPlayPlaylistCollectionAsyncAvailableChanged;
///
/// Raised when changes.
///
event EventHandler? IsPausePlaylistCollectionAsyncAvailableChanged;
///
/// Fires when the merged changes.
///
event EventHandler? PlaylistItemsCountChanged;
}
}