using System.Collections.Generic;
using System.Threading.Tasks;

namespace Plane.Copters
{
    public interface ICopterMissionActions
    {
        /// <summary>
        /// 查询任务序列。
        /// </summary>
        /// <param name="millisecondsTimeout">超时时间。</param>
        /// <returns>飞行器返回的任务序列。</returns>
        Task<IEnumerable<IMission>> RequestMissionListAsync(int millisecondsTimeout = 10000);

        /// <summary>
        /// 写入任务序列。
        /// </summary>
        /// <param name="missions">任务序列。</param>
        /// <param name="millisecondsTimeout">超时时间。</param>
        /// <returns>若写入成功，返回 true；否则返回 false。</returns>
        Task<bool> WriteMissionListAsync(IEnumerable<IMission> missions, int millisecondsTimeout = 10000);
    }
}
