using System.IO;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.Common
{
public interface IMovieSession
{
IMovie Movie { get; }
bool ReadOnly { get; set; }
///
/// Gets a value indicating whether or not a new movie is queued for loading
///
bool NewMovieQueued { get; }
///
/// Gets the sync settings from a queued movie, if a movie is queued
///
string QueuedSyncSettings { get; }
IMovieController MovieController { get; }
MultitrackRecorder MultiTrack { get; }
///
/// Gets the controller state from the movie for the most recent frame
///
IController CurrentInput { get; }
IController PreviousFrame { get; }
///
/// Recreates MovieController with the given controller definition
/// with an empty controller state
///
void RecreateMovieController(ControllerDefinition definition);
///
/// Creates a instance based on the
/// given button definition if provided else the
/// current button definition
/// will be used
///
IMovieController GenerateMovieController(ControllerDefinition definition = null);
void HandleFrameBefore();
void HandleFrameAfter();
void HandleSaveState(TextWriter writer);
bool CheckSavestateTimeline(TextReader reader);
bool HandleLoadState(TextReader reader);
///
/// Queues up a movie for loading
/// When initializing a movie, it will be stored until Rom loading processes have been completed, then it will be moved to the Movie property
/// If an existing movie is still active, it will remain in the Movie property while the new movie is queued
///
void QueueNewMovie(IMovie movie, bool record, string systemId);
///
/// Sets the Movie property with the QueuedMovie, clears the queued movie, and starts the new movie
///
void RunQueuedMovie(bool recordMode, IEmulator emulator);
void ToggleMultitrack();
void StopMovie(bool saveChanges = true);
///
/// If a movie is active, it will be converted to a
///
void ConvertToTasProj();
}
}