using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace FLY.Thick.RemoteHistory
{
    public delegate void GetPathsReponseHandler(List<string> paths, object state);
    public delegate void GetRootPathReponseHandler(string rootpath, object state);
    public interface IRemoteHistory
        : INotifyPropertyChanged
    {
        /// <summary>
        /// 最小保存时间，当5分钟内都没新的数据产生，自动 Flush() 单位min
        /// </summary>
        int MinSaveInterval { get; set; }
        /// <summary>
        /// 数据能保存的天数
        /// </summary>
        int KeeyDay { get; set; }

        /// <summary>
        /// 多少行保存一次
        /// </summary>
        int SaveRows { get; set; }

        /// <summary>
        /// 当前总行数
        /// </summary>
        int CurrRows { get; }

        /// <summary>
        /// 当前保存的文件路径
        /// </summary>
        string CurrPath { get; }

        /// <summary>
        /// 当前保存的数据天数
        /// </summary>
        int CurrDays { get; }
        /// <summary>
        /// 参数应用
        /// </summary>
        void Apply();
        /// <summary>
        /// 全部保存
        /// </summary>
        void Flush();

        //获取历史数据
        void GetPaths(DateTime dt_begin, DateTime dt_end, string profilename, GetPathsReponseHandler return_func, object state);
        /// <summary>
        /// 获取根目录
        /// </summary>
        void GetRootPath(GetRootPathReponseHandler return_func, object state);
    }
}
