using FLY.FilmCasting.AutoDie.Server.Model;
using FObjBase;
using FObjBase.Reflect;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.FilmCasting.AutoDie.IService
{
    public interface IBulkDbService : INotifyPropertyChanged
    {
        /// <summary>
        /// 最后一条数据Id
        /// </summary>
        long LastId { get; }
        /// <summary>
        /// 获取一幅数据;
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        [Call(typeof(GetFrameReponse))]
        void GetFrame(long Id, AsyncCBHandler asyncDelegate, object asyncContext);

        /// <summary>
        /// 获取一幅稳定的数据;
        /// </summary>
        /// <param name="Id">以Id为起始点, 向前或者向后或者最近稳定的一幅数据</param>
        /// <param name="isPre"></param>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        [Call(typeof(GetStableFrameReponse))]
        void GetStableFrame(long id, bool isPre, AsyncCBHandler asyncDelegate, object asyncContext);


        /// <summary>
        /// 以Id为起始点, 向前或者向后获取最近通道改变时间不相同的数据 或 起效数据
        /// </summary>
        /// <param name="id"></param>
        /// <param name="isPre">向前</param>
        /// <param name="isTakeEffect">数据起效</param>
        /// <param name="isDiffCTime">加热不同</param>
        /// <param name="asyncDelegate"></param>
        /// <param name="asyncContext"></param>
        [Call(typeof(GetFrameReponse))]
        void GetFrameAdv(long id, bool isPre, bool isTakeEffect, bool isDiffCTime, AsyncCBHandler asyncDelegate, object asyncContext);
    }
    public class GetFrameReponse
    {
        public long Id;
        public Lc_ThickHeat thickHeat;
    }
    public class GetStableFrameReponse
    {
        public long id;
        public bool isPre;
        public Lc_ThickHeat thickHeat;
    }
}
