// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using UnityEngine.XR.OpenXR;
namespace Microsoft.MixedReality.OpenXR
{
///
/// Represents the xr session state in its lifecycle.
/// Reference https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#session-lifecycle for more details on session state machine in OpenXR.
///
internal enum XrSessionState : int
{
///
/// Indicates an unknown state of session, typically means the session is not created yet.
///
Unknown = 0,
///
/// Indicates that the runtime considers the session is idle.
/// Applications in this state should minimize resource consumption.
///
Idle = 1,
///
/// Indicates that the runtime desires the application to prepare rendering resources, begin its session and synchronize its frame loop with the runtime.
/// Unity engine will handle the necessary preparation and begin a session.
///
Ready = 2,
///
/// Indicates that the application has synchronized its frame loop with the runtime, but its frames are not visible to the user.
///
Synchronized = 3,
///
/// Indicates that the application has synchronized its frame loop with the runtime, and the session's frames will be visible to the user,
/// but the session is not eligible to receive XR input.
///
Visible = 4,
///
/// indicates that the application has synchronized its frame loop with the runtime, the session's frames will be visible to the user,
/// and the session is eligible to receive XR input.
///
Focused = 5,
///
/// Indicates that the runtime has determined that the application should halt its rendering loop.
/// Unity engine will handle the stopping of a running session.
///
Stopping = 6,
///
/// Indicates the runtime is no longer able to operate with the current session, for example due to the loss of a display hardware connection.
///
LossPending = 7,
///
/// Indicates the runtime wishes the application to terminate its XR experience, typically due to a user request via a runtime user interface.
///
Exiting = 8,
};
}