using System;
namespace Observatory.Framework
{
    /// 
    /// Provides data for Elite Dangerous journal events.
    /// 
    public class JournalEventArgs : EventArgs
    {
        /// 
        /// Type of journal entry that triggered event.
        /// Will be a class from the Observatory.Framework.Files.Journal namespace derived from JournalBase, or JournalBase itself in the case of an unhandled journal event type.
        /// 
        public Type journalType;
        /// 
        /// Elite Dangerous journal event, deserialized into a .NET object of the type specified by JournalEventArgs.journalType.
        /// Unhandled json values within a journal entry type will be contained in member property:
Dictionary<string, object> AdditionalProperties.
        /// 
        public object journalEvent;
    }
    /// 
    /// Provides values used as arguments for Observatory notification events.
    /// 
    public class NotificationArgs
    {
        /// 
        /// Text typically displayed as header content.
        /// 
        public string Title;
        /// 
        /// SSML representation of Title text.
        /// This value is optional, if omitted the value of NotificationArgs.Title will be used for voice synthesis without markup.
        /// 
        public string TitleSsml;
        /// 
        /// Text typically displayed as body content.
        /// 
        public string Detail;
        /// 
        /// SSML representation of Detail text.
        /// This value is optional, if omitted the value of NotificationArgs.Detail will be used for voice synthesis without markup.
        /// 
        public string DetailSsml;
        /// 
        /// Specify window timeout in ms (overrides Core setting). Specify 0 timeout to persist until removed via IObservatoryCore.CancelNotification. Default -1 (use Core setting).
        /// 
        public int Timeout = -1;
        /// 
        /// Specify window X position as a percentage from upper left corner (overrides Core setting). Default -1.0 (use Core setting).
        /// 
        public double XPos = -1.0;
        /// 
        /// Specify window Y position as a percentage from upper left corner (overrides Core setting). Default -1.0 (use Core setting).
        /// 
        public double YPos = -1.0;
        /// 
        /// Specifies the desired renderings of the notification. Defaults to .
        /// 
        public NotificationRendering Rendering = NotificationRendering.All;
        /// 
        /// Specifies if some part of the notification should be suppressed. Not supported by all notifiers. Defaults to .
        /// 
        public NotificationSuppression Suppression = NotificationSuppression.None;
        /// 
        /// The plugin sending this notification.
        /// 
        public string Sender = "";
        /// 
        /// Additional notification detailed (generally not rendered by voice or popup; potentially used by aggregating/logging plugins).
        /// 
        public string ExtendedDetails;
        /// 
        /// A value which allows grouping of notifications together. For example, values >= 0 <= 1000 could be system body IDs, -1 is the system, anything else is arbitrary.
        /// 
        public int? CoalescingId;
    }
    /// 
    /// Defines constants for suppression of title or detail announcement in a notification.
    /// 
    [Flags]
    public enum NotificationSuppression
    {
        /// 
        /// No suppression.
        /// 
        None = 0,
        /// 
        /// Suppress title.
        /// 
        Title = 1,
        /// 
        /// Suppress detail.
        /// 
        Detail = 2,
    }
    /// 
    /// Defines constants for controlling notification routing to plugins or native notification handlers.
    /// 
    [Flags]
    public enum NotificationRendering
    {
        /// 
        /// Send notification to native visual popup notificaiton handler.
        /// 
        NativeVisual = 1,
        /// 
        /// Send notification to native speech notification handler.
        /// 
        NativeVocal = 2,
        /// 
        /// Send notification to all installed notifier plugins.
        /// 
        PluginNotifier = 4,
        /// 
        /// Send notification to all available handlers.
        /// 
        All = (NativeVisual | NativeVocal | PluginNotifier)
    }
    /// 
    /// Flags indicating current state of journal monitoring.
    /// 
    [Flags]
    public enum LogMonitorState : uint
    {
        /// 
        /// Monitoring is stopped.
        /// 
        Idle = 0,
        /// 
        /// Real-time monitoring is active.
        /// 
        Realtime = 1,
        /// 
        /// Batch read of historical journals is in progress.
        /// 
        Batch = 2,
        /// 
        /// Batch read of recent journals is in progress to establish current player state.
        /// 
        PreRead = 4
    }
    /// 
    /// Provides information about a LogMonitor state transition.
    /// 
    public class LogMonitorStateChangedEventArgs : EventArgs
    {
        /// 
        /// The previous LogMonitor state.
        /// 
        public LogMonitorState PreviousState;
        /// 
        /// The new, current LogMonitor state.
        /// 
        public LogMonitorState NewState;
        /// 
        /// Determins if the given state is a batch read of any form.
        /// 
        /// The state to evaluate
        /// A boolean; True iff the state provided represents a batch-mode read.
        public static bool IsBatchRead(LogMonitorState state)
        {
            return state.HasFlag(LogMonitorState.Batch) || state.HasFlag(LogMonitorState.PreRead);
        }
    }
}