// 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.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using OwlCore.Events;
using StrixMusic.Sdk.AdapterModels;
using StrixMusic.Sdk.BaseModels;
using StrixMusic.Sdk.CoreModels;
namespace StrixMusic.Sdk.AppModels
{
///
/// A collection of images.
///
/// Instances of this class may contain data merged from one or more sources.
public interface IImageCollection : IImageCollectionBase, IAppModel, IMerged
{
///
/// Gets a requested number of s starting at the given offset.
///
/// The max number of items to return.
/// Get items starting at this index.
/// A cancellation token that may be used to cancel the ongoing task.
/// The requested range of items.
IAsyncEnumerable GetImagesAsync(int limit, int offset, CancellationToken cancellationToken = default);
///
/// Adds a new image to the collection.
///
/// The image to add.
/// the position to insert the image at.
/// A cancellation token that may be used to cancel the ongoing task.
/// A representing the asynchronous operation.
Task AddImageAsync(IImage image, int index, CancellationToken cancellationToken = default);
///
/// Fires when the items are changed.
///
event CollectionChangedEventHandler? ImagesChanged;
}
}