Move most API interfaces and implementations to BizHawk.Client.Common

This commit is contained in:
YoshiRulz 2019-11-16 16:16:33 +10:00 committed by James Groom
parent 13e4b5396d
commit fab882b7a5
37 changed files with 67 additions and 54 deletions

View File

@ -56,17 +56,7 @@
<Compile Include="Attributes\BizHawkExternalToolUsageAttribute.cs" /> <Compile Include="Attributes\BizHawkExternalToolUsageAttribute.cs" />
<Compile Include="Attributes\BizHawkExternalToolAttribute.cs" /> <Compile Include="Attributes\BizHawkExternalToolAttribute.cs" />
<Compile Include="Classes\ApiInjector.cs" /> <Compile Include="Classes\ApiInjector.cs" />
<Compile Include="Classes\Api\EmuApi.cs" />
<Compile Include="Classes\Api\GameInfoApi.cs" />
<Compile Include="Classes\Api\MemApi.cs" />
<Compile Include="Classes\Api\MemApiBase.cs" />
<Compile Include="Classes\Api\PluginBase.cs" /> <Compile Include="Classes\Api\PluginBase.cs" />
<Compile Include="Classes\Api\JoypadApi.cs" />
<Compile Include="Classes\Api\MemEventsApi.cs" />
<Compile Include="Classes\Api\MemorySaveStateApi.cs" />
<Compile Include="Classes\Api\MovieApi.cs" />
<Compile Include="Classes\Api\SqlApi.cs" />
<Compile Include="Classes\Api\UserDataApi.cs" />
<Compile Include="Classes\BasicApiProvider.cs" /> <Compile Include="Classes\BasicApiProvider.cs" />
<Compile Include="Classes\BizHawkSystemIdToCoreSystemEnumConverter.cs" /> <Compile Include="Classes\BizHawkSystemIdToCoreSystemEnumConverter.cs" />
<Compile Include="Classes\Events\EventArgs\BeforeQuickLoadEventArgs.cs" /> <Compile Include="Classes\Events\EventArgs\BeforeQuickLoadEventArgs.cs" />
@ -82,25 +72,9 @@
<Compile Include="Enums\BizHawkExternalToolUsage.cs" /> <Compile Include="Enums\BizHawkExternalToolUsage.cs" />
<Compile Include="Classes\ClientApi.cs" /> <Compile Include="Classes\ClientApi.cs" />
<Compile Include="Classes\ExternalToolManager.cs" /> <Compile Include="Classes\ExternalToolManager.cs" />
<Compile Include="Interfaces\Api\IComm.cs" />
<Compile Include="Interfaces\Api\IInput.cs" />
<Compile Include="Interfaces\Api\ITool.cs" />
<Compile Include="Interfaces\Api\ISaveState.cs" />
<Compile Include="Interfaces\Api\IUserData.cs" />
<Compile Include="Interfaces\Api\ISql.cs" />
<Compile Include="Interfaces\Api\IInputMovie.cs" />
<Compile Include="Interfaces\Api\IMemorySavestate.cs" />
<Compile Include="Interfaces\Api\IMemEvents.cs" />
<Compile Include="Interfaces\Api\IEmu.cs" />
<Compile Include="Interfaces\Api\IExternalApi.cs" />
<Compile Include="Interfaces\Api\IJoypad.cs" />
<Compile Include="Interfaces\IExternalApiProvider.cs" /> <Compile Include="Interfaces\IExternalApiProvider.cs" />
<Compile Include="Interfaces\IExternalToolForm.cs" /> <Compile Include="Interfaces\IExternalToolForm.cs" />
<Compile Include="Interfaces\Api\IGameInfo.cs" />
<Compile Include="Interfaces\Api\IGui.cs" />
<Compile Include="Interfaces\Api\IMem.cs" />
<Compile Include="Interfaces\IPlugin.cs" /> <Compile Include="Interfaces\IPlugin.cs" />
<Compile Include="Interfaces\Api\IApiContainer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,4 +1,5 @@
using BizHawk.Emulation.Common; using BizHawk.Client.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.ApiHawk
{ {

View File

@ -2,6 +2,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using BizHawk.Client.Common;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.ApiHawk
{ {
/// <summary> /// <summary>

View File

@ -1,6 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using BizHawk.Client.Common;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.ApiHawk
{ {
/// <summary> /// <summary>

View File

@ -1,4 +1,6 @@
namespace BizHawk.Client.ApiHawk using BizHawk.Client.Common;
namespace BizHawk.Client.ApiHawk
{ {
interface IPlugin interface IPlugin
{ {

View File

@ -13,7 +13,7 @@ using BizHawk.Emulation.Cores.Sega.MasterSystem;
using BizHawk.Emulation.Cores.WonderSwan; using BizHawk.Emulation.Cores.WonderSwan;
using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES; using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
[Description("A library for interacting with the currently loaded emulator core")] [Description("A library for interacting with the currently loaded emulator core")]
public sealed class EmuApi : IEmu public sealed class EmuApi : IEmu

View File

@ -3,7 +3,7 @@
using BizHawk.Client.Common; using BizHawk.Client.Common;
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public sealed class GameInfoApi : IGameInfo public sealed class GameInfoApi : IGameInfo
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using BizHawk.Client.Common; using BizHawk.Client.Common;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public sealed class JoypadApi : IJoypad public sealed class JoypadApi : IJoypad
{ {

View File

@ -5,7 +5,7 @@ using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions; using BizHawk.Emulation.Common.IEmulatorExtensions;
using BizHawk.Common.BufferExtensions; using BizHawk.Common.BufferExtensions;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public sealed class MemApi : MemApiBase, IMem public sealed class MemApi : MemApiBase, IMem
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions; using BizHawk.Emulation.Common.IEmulatorExtensions;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
/// <summary> /// <summary>
/// Base class for the Memory and MainMemory plugin libraries /// Base class for the Memory and MainMemory plugin libraries

View File

@ -3,7 +3,7 @@
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions; using BizHawk.Emulation.Common.IEmulatorExtensions;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public sealed class MemEventsApi : IMemEvents public sealed class MemEventsApi : IMemEvents
{ {

View File

@ -4,7 +4,7 @@ using System.IO;
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public sealed class MemorySaveStateApi : IMemorySaveState public sealed class MemorySaveStateApi : IMemorySaveState
{ {

View File

@ -4,7 +4,7 @@ using System.IO;
using BizHawk.Client.Common; using BizHawk.Client.Common;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public sealed class MovieApi : IInputMovie public sealed class MovieApi : IInputMovie
{ {

View File

@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Data.SQLite; using System.Data.SQLite;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public sealed class SqlApi : ISql public sealed class SqlApi : ISql
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using BizHawk.Client.Common; using BizHawk.Client.Common;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public sealed class UserDataApi : IUserData public sealed class UserDataApi : IUserData
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IApiContainer public interface IApiContainer
{ {

View File

@ -1,4 +1,4 @@
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IComm : IExternalApi public interface IComm : IExternalApi
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IEmu : IExternalApi public interface IEmu : IExternalApi
{ {

View File

@ -1,4 +1,4 @@
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
/// <summary> /// <summary>
/// This interface specifies that a client exposes a given interface, such as <see cref="BizHawk.Emulation.Common.IDebuggable"/>, /// This interface specifies that a client exposes a given interface, such as <see cref="BizHawk.Emulation.Common.IDebuggable"/>,

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IGameInfo : IExternalApi public interface IGameInfo : IExternalApi
{ {

View File

@ -2,7 +2,7 @@
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.Windows.Forms; using System.Windows.Forms;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IGui : IExternalApi public interface IGui : IExternalApi
{ {

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IInput : IExternalApi public interface IInput : IExternalApi
{ {

View File

@ -1,5 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IInputMovie : IExternalApi public interface IInputMovie : IExternalApi
{ {

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IJoypad : IExternalApi public interface IJoypad : IExternalApi
{ {

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IMem : IExternalApi public interface IMem : IExternalApi
{ {

View File

@ -2,7 +2,7 @@
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IMemEvents : IExternalApi public interface IMemEvents : IExternalApi
{ {

View File

@ -1,4 +1,4 @@
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IMemorySaveState : IExternalApi public interface IMemorySaveState : IExternalApi
{ {

View File

@ -1,4 +1,4 @@
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface ISaveState : IExternalApi public interface ISaveState : IExternalApi
{ {

View File

@ -1,4 +1,4 @@
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface ISql : IExternalApi public interface ISql : IExternalApi
{ {

View File

@ -1,5 +1,5 @@
using System; using System;
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface ITool : IExternalApi public interface ITool : IExternalApi
{ {

View File

@ -1,4 +1,4 @@
namespace BizHawk.Client.ApiHawk namespace BizHawk.Client.Common
{ {
public interface IUserData : IExternalApi public interface IUserData : IExternalApi
{ {

View File

@ -82,7 +82,33 @@
<Compile Include="..\Version\VersionInfo.cs"> <Compile Include="..\Version\VersionInfo.cs">
<Link>VersionInfo.cs</Link> <Link>VersionInfo.cs</Link>
</Compile> </Compile>
<Compile Include="Api\Classes\EmuApi.cs" />
<Compile Include="Api\Classes\GameInfoApi.cs" />
<Compile Include="Api\Classes\JoypadApi.cs" />
<Compile Include="Api\Classes\MemApi.cs" />
<Compile Include="Api\Classes\MemApiBase.cs" />
<Compile Include="Api\Classes\MemEventsApi.cs" />
<Compile Include="Api\Classes\MemorySaveStateApi.cs" />
<Compile Include="Api\Classes\MovieApi.cs" />
<Compile Include="Api\Classes\SqlApi.cs" />
<Compile Include="Api\Classes\UserDataApi.cs" />
<Compile Include="Api\CoreSystem.cs" /> <Compile Include="Api\CoreSystem.cs" />
<Compile Include="Api\Interfaces\IApiContainer.cs" />
<Compile Include="Api\Interfaces\IComm.cs" />
<Compile Include="Api\Interfaces\IEmu.cs" />
<Compile Include="Api\Interfaces\IExternalApi.cs" />
<Compile Include="Api\Interfaces\IGameInfo.cs" />
<Compile Include="Api\Interfaces\IGui.cs" />
<Compile Include="Api\Interfaces\IInput.cs" />
<Compile Include="Api\Interfaces\IInputMovie.cs" />
<Compile Include="Api\Interfaces\IJoypad.cs" />
<Compile Include="Api\Interfaces\IMem.cs" />
<Compile Include="Api\Interfaces\IMemEvents.cs" />
<Compile Include="Api\Interfaces\IMemorySavestate.cs" />
<Compile Include="Api\Interfaces\ISaveState.cs" />
<Compile Include="Api\Interfaces\ISql.cs" />
<Compile Include="Api\Interfaces\ITool.cs" />
<Compile Include="Api\Interfaces\IUserData.cs" />
<Compile Include="Api\JoypadButton.cs" /> <Compile Include="Api\JoypadButton.cs" />
<Compile Include="BinarySaveStates.cs" /> <Compile Include="BinarySaveStates.cs" />
<Compile Include="BitmapBufferVideoProvider.cs" /> <Compile Include="BitmapBufferVideoProvider.cs" />

View File

@ -4,6 +4,7 @@ using System.Reflection;
using System.Linq; using System.Linq;
using BizHawk.Client.ApiHawk; using BizHawk.Client.ApiHawk;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk
{ {

View File

@ -7,6 +7,7 @@ using System.Reflection;
using BizHawk.Common.ReflectionExtensions; using BizHawk.Common.ReflectionExtensions;
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
using BizHawk.Client.ApiHawk; using BizHawk.Client.ApiHawk;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk

View File

@ -8,6 +8,8 @@ using System.Collections.Generic;
using System.Net.Http; using System.Net.Http;
using System.Windows.Forms; using System.Windows.Forms;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk
{ {

View File

@ -6,6 +6,7 @@ using System.Windows.Forms;
using System.IO; using System.IO;
using BizHawk.Client.ApiHawk; using BizHawk.Client.ApiHawk;
using BizHawk.Client.Common;
using BizHawk.Emulation.Common; using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using BizHawk.Client.ApiHawk; using BizHawk.Client.ApiHawk;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk namespace BizHawk.Client.EmuHawk
{ {