using Volpe.Cafe.MarketData;
using Volpe.Cafe.MarketData.Design;
using Volpe.Cafe.Model;
using Volpe.Cafe.ModelSettings;

namespace Volpe.Cafe.EspressoUI
{
    /// <summary>
    /// Provides configuration data and state information for a CAFE Model Session.
    /// </summary>
    public interface ISession
    {

        #region /*** Properties ***/

        /// <summary>Gets the name of the session.</summary>
        string SessionName { get; }
        /// <summary>Gets the location of the session file, where the session data was loaded from or can be saved to.</summary>
        string SessionPath { get; }

        /// <summary>Gets whether the session is open.</summary>
        bool IsOpen { get; }
        /// <summary>Gets whether the session was open as read-only.</summary>
        bool IsReadOnly { get; }
        /// <summary>Gets whether the session needs to be saved.</summary>
        bool SaveRequired { get; set;  }

        /// <summary>Gets whether the session is currently executing the compliance model simulation.</summary>
        bool IsRunning { get; }
        /// <summary>Gets whether the user has requested to stop analysis of the currently executing compliance model simulation.</summary>
        bool StopRequested { get; }
        /// <summary>Gets the status of the session, which should be displayed in the parent form's status bar.</summary>
        string Status { get; }

        /// <summary>Gets or set how frequently, in milliseconds, the session refreshes itself based on the latest progress
        ///   information of the compliance model.</summary>
        int RefreshInterval { get; set; }

        /// <summary>Gets or sets the compliance model that will be used during the modeling process.</summary>
        /// <remarks>Selecting a different compliance model will force the current session to restart.</remarks>
        ICompliance Compliance { get; set; }
        /// <summary>Gets or sets the modeling data associated with the current session.</summary>
        IIndustry Data { get; set; }
        /// <summary>Gets or sets the modeling settings associated with the current session.</summary>
        ModelingSettings Settings { get; }

        #endregion

    }
}
