using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using MDL.Models;

namespace BLL.Interfaces
{
    /// <summary>
    /// FTP上传服务接口
    /// </summary>
    public interface IFtpUploadService
    {
        /// <summary>
        /// 上传文件到FTP服务器
        /// </summary>
        /// <param name="fileStream">文件流</param>
        /// <param name="fileName">文件名</param>
        /// <param name="directory">上传目录</param>
        /// <returns>上传结果</returns>
        Task<FtpUploadResult> UploadFileAsync(Stream fileStream, string fileName, string directory);
        
        /// <summary>
        /// 批量上传文件
        /// </summary>
        /// <param name="fileStreams">文件流列表</param>
        /// <param name="fileNames">文件名列表</param>
        /// <param name="directory">上传目录</param>
        /// <returns>上传结果列表</returns>
        Task<List<FtpUploadResult>> UploadFilesAsync(List<Stream> fileStreams, List<string> fileNames, string directory);
        
        /// <summary>
        /// 检查文件是否存在于FTP服务器
        /// </summary>
        /// <param name="fileName">文件名</param>
        /// <param name="directory">目录</param>
        /// <returns>检查结果</returns>
        Task<bool> CheckFileExistsAsync(string fileName, string directory);
        
        /// <summary>
        /// 批量检查文件是否存在于FTP服务器
        /// </summary>
        /// <param name="fileNames">文件名列表</param>
        /// <param name="directory">目录</param>
        /// <returns>检查结果列表</returns>
        Task<List<FtpCheckResult>> CheckFilesExistsAsync(List<string> fileNames, string directory);
    }
}
