From fe6dc1717c965c26a6486e8b5fc57b42176d2e50 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Thu, 15 Feb 2024 12:27:13 -0500 Subject: [PATCH] IStorage --- .../Sdk/Am/Controllers/IAppletCommonFunctions.cs | 3 ++- .../Sdk/Am/Controllers/IApplicationFunctions.cs | 3 ++- .../Sdk/Am/Controllers/IAudioController.cs | 3 ++- .../Sdk/Am/Controllers/ICommonStateGetter.cs | 3 ++- .../Sdk/Am/Controllers/IDebugFunctions.cs | 3 ++- .../Sdk/Am/Controllers/ILibraryAppletCreator.cs | 3 ++- .../Am/Controllers/ILibraryAppletSelfAccessor.cs | 3 ++- .../Sdk/Am/Controllers/IOverlayFunctions.cs | 3 ++- .../Am/Controllers/IProcessWindingController.cs | 3 ++- .../Sdk/Am/Controllers/ISelfController.cs | 3 ++- .../Sdk/Am/Controllers/IWindowController.cs | 3 ++- .../Sdk/Am/Proxies/IApplicationProxy.cs | 3 ++- .../Sdk/Am/Proxies/ILibraryAppletProxy.cs | 3 ++- .../Sdk/Am/Proxies/IOverlayAppletProxy.cs | 3 ++- .../Sdk/Am/Proxies/ISystemAppletProxy.cs | 3 ++- src/Ryujinx.Horizon/Sdk/Am/Storage/IStorage.cs | 12 ++++++++++++ .../Sdk/Am/Storage/IStorageAccessor.cs | 13 +++++++++++++ .../Sdk/Am/Storage/IStorageChannel.cs | 14 ++++++++++++++ .../Sdk/Am/Storage/ITransferStorageAccessor.cs | 11 +++++++++++ 19 files changed, 80 insertions(+), 15 deletions(-) create mode 100644 src/Ryujinx.Horizon/Sdk/Am/Storage/IStorage.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/Storage/IStorageAccessor.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/Storage/IStorageChannel.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Am/Storage/ITransferStorageAccessor.cs diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAppletCommonFunctions.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAppletCommonFunctions.cs index 582bcb381..129fa7ed2 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAppletCommonFunctions.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAppletCommonFunctions.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface IAppletCommonFunctions + interface IAppletCommonFunctions : IServiceObject { Result SetTerminateResult(); Result ReadThemeStorage(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IApplicationFunctions.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IApplicationFunctions.cs index 889a9e794..5789d659c 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IApplicationFunctions.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IApplicationFunctions.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface IApplicationFunctions + interface IApplicationFunctions : IServiceObject { Result PopLaunchParameter(); Result CreateApplicationAndPushAndRequestToStart(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAudioController.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAudioController.cs index a480e16b2..758d8542f 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAudioController.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IAudioController.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface IAudioController + interface IAudioController : IServiceObject { Result SetExpectedMasterVolume(float mainAppletVolume, float libraryAppletVolume); Result GetMainAppletExpectedMasterVolume(out float mainAppletVolume); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ICommonStateGetter.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ICommonStateGetter.cs index d24cc7efc..db405e45f 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ICommonStateGetter.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ICommonStateGetter.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface ICommonStateGetter + interface ICommonStateGetter : IServiceObject { Result GetEventHandle(); Result ReceiveMessage(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IDebugFunctions.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IDebugFunctions.cs index cf46a4357..a3dc6e790 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IDebugFunctions.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IDebugFunctions.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface IDebugFunctions + interface IDebugFunctions : IServiceObject { Result NotifyMessageToHomeMenuForDebug(); Result OpenMainApplication(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletCreator.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletCreator.cs index f25b6b4e6..457ea7a3d 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletCreator.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletCreator.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface ILibraryAppletCreator + interface ILibraryAppletCreator : IServiceObject { Result CreateLibraryApplet(); Result TerminateAllLibraryApplets(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletSelfAccessor.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletSelfAccessor.cs index 844fee360..b9b279e0f 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletSelfAccessor.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ILibraryAppletSelfAccessor.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface ILibraryAppletSelfAccessor + interface ILibraryAppletSelfAccessor : IServiceObject { Result PopInData(); Result PushOutData(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IOverlayFunctions.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IOverlayFunctions.cs index 021ae8dc0..5a765fa56 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IOverlayFunctions.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IOverlayFunctions.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface IOverlayFunctions + interface IOverlayFunctions : IServiceObject { Result BeginToWatchShortHomeButtonMessage(); Result EndToWatchShortHomeButtonMessage(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IProcessWindingController.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IProcessWindingController.cs index 7e31e516f..a7fbcc421 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IProcessWindingController.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IProcessWindingController.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface IProcessWindingController + interface IProcessWindingController : IServiceObject { Result GetLaunchReason(); Result OpenCallingLibraryApplet(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISelfController.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISelfController.cs index 9f90029be..f79881ea7 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISelfController.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/ISelfController.cs @@ -1,8 +1,9 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface ISelfController + interface ISelfController : IServiceObject { Result Exit(); Result LockExit(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IWindowController.cs b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IWindowController.cs index 8652d5c13..ba9916d6c 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Controllers/IWindowController.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Controllers/IWindowController.cs @@ -1,9 +1,10 @@ using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; using System; namespace Ryujinx.Horizon.Sdk.Am.Controllers { - public interface IWindowController + interface IWindowController : IServiceObject { Result CreateWindow(); Result GetAppletResourceUserId(); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Proxies/IApplicationProxy.cs b/src/Ryujinx.Horizon/Sdk/Am/Proxies/IApplicationProxy.cs index 6cadff937..0ecc76a2e 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Proxies/IApplicationProxy.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Proxies/IApplicationProxy.cs @@ -1,9 +1,10 @@ using Ryujinx.Horizon.Common; using Ryujinx.Horizon.Sdk.Am.Controllers; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Proxies { - public interface IApplicationProxy + interface IApplicationProxy : IServiceObject { Result GetCommonStateGetter(out ICommonStateGetter commonStateGetter); Result GetSelfController(out ISelfController selfController); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Proxies/ILibraryAppletProxy.cs b/src/Ryujinx.Horizon/Sdk/Am/Proxies/ILibraryAppletProxy.cs index c1f056a31..ffbb90acf 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Proxies/ILibraryAppletProxy.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Proxies/ILibraryAppletProxy.cs @@ -1,9 +1,10 @@ using Ryujinx.Horizon.Common; using Ryujinx.Horizon.Sdk.Am.Controllers; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Proxies { - public interface ILibraryAppletProxy + interface ILibraryAppletProxy : IServiceObject { Result GetCommonStateGetter(out ICommonStateGetter commonStateGetter); Result GetSelfController(out ISelfController selfController); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Proxies/IOverlayAppletProxy.cs b/src/Ryujinx.Horizon/Sdk/Am/Proxies/IOverlayAppletProxy.cs index 50d9a9b82..f8162052a 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Proxies/IOverlayAppletProxy.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Proxies/IOverlayAppletProxy.cs @@ -1,9 +1,10 @@ using Ryujinx.Horizon.Common; using Ryujinx.Horizon.Sdk.Am.Controllers; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Proxies { - public interface IOverlayAppletProxy + interface IOverlayAppletProxy : IServiceObject { Result GetCommonStateGetter(out ICommonStateGetter commonStateGetter); Result GetSelfController(out ISelfController selfController); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Proxies/ISystemAppletProxy.cs b/src/Ryujinx.Horizon/Sdk/Am/Proxies/ISystemAppletProxy.cs index c6ffd54b5..4c98b9d10 100644 --- a/src/Ryujinx.Horizon/Sdk/Am/Proxies/ISystemAppletProxy.cs +++ b/src/Ryujinx.Horizon/Sdk/Am/Proxies/ISystemAppletProxy.cs @@ -1,9 +1,10 @@ using Ryujinx.Horizon.Common; using Ryujinx.Horizon.Sdk.Am.Controllers; +using Ryujinx.Horizon.Sdk.Sf; namespace Ryujinx.Horizon.Sdk.Am.Proxies { - public interface ISystemAppletProxy + interface ISystemAppletProxy : IServiceObject { Result GetCommonStateGetter(out ICommonStateGetter commonStateGetter); Result GetSelfController(out ISelfController selfController); diff --git a/src/Ryujinx.Horizon/Sdk/Am/Storage/IStorage.cs b/src/Ryujinx.Horizon/Sdk/Am/Storage/IStorage.cs new file mode 100644 index 000000000..31a20cdba --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/Storage/IStorage.cs @@ -0,0 +1,12 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Sdk.Am.Storage +{ + interface IStorage : IServiceObject + { + Result Open(out IStorageAccessor arg0); + Result OpenTransferStorage(out ITransferStorageAccessor arg0); + Result GetAndInvalidate(out IStorage arg0); + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Am/Storage/IStorageAccessor.cs b/src/Ryujinx.Horizon/Sdk/Am/Storage/IStorageAccessor.cs new file mode 100644 index 000000000..c92aab823 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/Storage/IStorageAccessor.cs @@ -0,0 +1,13 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; +using System; + +namespace Ryujinx.Horizon.Sdk.Am.Storage +{ + interface IStorageAccessor : IServiceObject + { + Result GetSize(out long arg0); + Result Write(long arg0, ReadOnlySpan arg1); + Result Read(long arg0, Span arg1); + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Am/Storage/IStorageChannel.cs b/src/Ryujinx.Horizon/Sdk/Am/Storage/IStorageChannel.cs new file mode 100644 index 000000000..ae2a6c503 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/Storage/IStorageChannel.cs @@ -0,0 +1,14 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Sdk.Am.Storage +{ + interface IStorageChannel : IServiceObject + { + Result Push(IStorage arg0); + Result Unpop(IStorage arg0); + Result Pop(out IStorage arg0); + Result GetPopEventHandle(out int arg0); + Result Clear(); + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Am/Storage/ITransferStorageAccessor.cs b/src/Ryujinx.Horizon/Sdk/Am/Storage/ITransferStorageAccessor.cs new file mode 100644 index 000000000..8d477073a --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Am/Storage/ITransferStorageAccessor.cs @@ -0,0 +1,11 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Sdk.Am.Storage +{ + interface ITransferStorageAccessor : IServiceObject + { + Result GetSize(out long arg0); + Result GetHandle(out int arg0, out ulong arg1); + } +}