31 lines
1.3 KiB
C#
31 lines
1.3 KiB
C#
|
|
using Avalonia_Common.Core;
|
||
|
|
using Avalonia_Services.Core;
|
||
|
|
|
||
|
|
namespace Avalonia_Services.Services.FileLibrary
|
||
|
|
{
|
||
|
|
public interface IFileLibraryService
|
||
|
|
{
|
||
|
|
Task<List<DriveDto>> GetDrivesAsync(CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<List<DirectoryDto>> GetDirectoriesAsync(string? path, CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<List<LibraryRootDto>> GetRootsAsync(CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<LibraryRootDto> AddRootAsync(AddLibraryRootRequest request, CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<LibraryRootDto> SetRootEnabledAsync(UpdateLibraryRootRequest request, CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task DeleteRootAsync(DeleteLibraryRootRequest request, CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<LibraryRootDto> ScanRootAsync(int rootId, CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task ScanDueRootsAsync(CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<PagedResponse<FileRecordDto>> SearchFilesAsync(ServiceEndpointContext ctx, CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<FileRecordDto?> GetFileAsync(int id, CancellationToken cancellationToken = default);
|
||
|
|
|
||
|
|
Task<TextPreviewDto?> GetTextPreviewAsync(int id, CancellationToken cancellationToken = default);
|
||
|
|
}
|
||
|
|
}
|