namespace Tiku.Application.Assets;

public enum AssetSecurityScanVerdict
{
    Clean,
    Infected
}

public sealed record AssetSecurityScanResult(
    AssetSecurityScanVerdict Verdict,
    string Provider,
    string? Signature,
    long BytesScanned,
    string RawResponse);

public interface IAssetSecurityScanner
{
    Task<AssetSecurityScanResult> ScanAsync(
        Stream content,
        long? declaredLength,
        CancellationToken cancellationToken = default);

    Task<bool> CheckHealthAsync(CancellationToken cancellationToken = default);
}

public sealed class AssetSecurityScannerException(string code, string message, Exception? innerException = null)
    : Exception(message, innerException)
{
    public string Code { get; } = code;
}