using System; using System.IO; using System.Threading.Tasks; using MalwareMultiScan.Api.Data.Models; namespace MalwareMultiScan.Api.Services.Interfaces { /// /// Scan result service. /// public interface IScanResultService { /// /// Create scan result. /// /// Optional callback URL. /// Scan result entry with id. Task CreateScanResult(Uri callbackUrl); /// /// Get scan result. /// /// Result id. /// Scan result entry with id. Task GetScanResult(string id); /// /// Update scan result entry. /// /// Result id. /// Backend id. /// Duration. /// Completion status. /// Indicates that scanning completed without error. /// Detected names of threats. Task UpdateScanResultForBackend(string resultId, string backendId, long duration, bool completed = false, bool succeeded = false, string[] threats = null); /// /// Queue URL for scanning. /// /// Result entry. /// Remote URL. Task QueueUrlScan(ScanResult result, string fileUrl); /// /// Store file. /// /// File name. /// File stream. /// Unique file id. Task StoreFile(string fileName, Stream fileStream); /// /// Obtain file. /// /// Unique file id. /// Seekable file stream opened for reading. Task ObtainFile(string id); } }