//
// Copyright (c) PlaceholderCompany. All rights reserved.
//
namespace Jellyfin.Server.Implementations.Clustering
{
using System.Threading;
using System.Threading.Tasks;
///
/// Service that processes file system changes from the database (primary instance only).
///
public interface IFileSystemChangeProcessor
{
///
/// Starts the file system change processor.
///
/// The cancellation token.
/// A representing the asynchronous operation.
Task StartAsync(CancellationToken cancellationToken = default);
///
/// Stops the file system change processor.
///
/// The cancellation token.
/// A representing the asynchronous operation.
Task StopAsync(CancellationToken cancellationToken = default);
///
/// Records a file system change to the database.
///
/// The path that changed.
/// The type of change (Created, Modified, Deleted, Renamed).
/// The old path for rename operations.
/// The cancellation token.
/// A representing the asynchronous operation.
Task RecordChangeAsync(string path, string changeType, string? oldPath = null, CancellationToken cancellationToken = default);
}
}