ILibraryAppletSelfAccessor

This commit is contained in:
Isaac Marovitz 2023-11-10 11:52:19 -05:00
parent ecbe393ff4
commit 105e4b448c
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
5 changed files with 339 additions and 4 deletions

View file

@ -0,0 +1,290 @@
using Ryujinx.Common.Logging;
using Ryujinx.Horizon.Common;
using Ryujinx.Horizon.Sdk.Am.Controllers;
using Ryujinx.Horizon.Sdk.Sf;
namespace Ryujinx.Horizon.Am.Ipc.Controllers
{
partial class LibraryAppletSelfAccessor : ILibraryAppletSelfAccessor
{
[CmifCommand(0)]
public Result PopInData()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(1)]
public Result PushOutData()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(2)]
public Result PopInteractiveInData()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(3)]
public Result PushInteractiveOutData()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(5)]
public Result GetPopInDataEvent()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(6)]
public Result GetPopInteractiveInDataEvent()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(10)]
public Result ExitProcessAndReturn()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(11)]
public Result GetLibraryAppletInfo()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(12)]
public Result GetMainAppletIdentityInfo()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(13)]
public Result CanUseApplicationCore()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(14)]
public Result GetCallerAppletIdentityInfo()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(15)]
public Result GetMainAppletApplicationControlProperty()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(16)]
public Result GetMainAppletStorageId()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(17)]
public Result GetCallerAppletIdentityInfoStack()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(18)]
public Result GetNextReturnDestinationAppletIdentityInfo()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(19)]
public Result GetDesirableKeyboardLayout()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(20)]
public Result PopExtraStorage()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(25)]
public Result GetPopExtraStorageEvent()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(30)]
public Result UnpopInData()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(31)]
public Result UnpopExtraStorage()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(40)]
public Result GetIndirectLayerProducerHandle()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(50)]
public Result ReportVisibleError()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(51)]
public Result ReportVisibleErrorWithErrorContext()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(60)]
public Result GetMainAppletApplicationDesiredLanguage()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(70)]
public Result GetCurrentApplicationId()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(80)]
public Result RequestExitToSelf()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(90)]
public Result CreateApplicationAndPushAndRequestToLaunch()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(100)]
public Result CreateGameMovieTrimmer()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(101)]
public Result ReserveResourceForMovieOperation()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(102)]
public Result UnreserveResourceForMovieOperation()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(110)]
public Result GetMainAppletAvailableUsers()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(120)]
public Result GetLaunchStorageInfoForDebug()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(130)]
public Result GetGpuErrorDetectedSystemEvent()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(140)]
public Result SetApplicationMemoryReservation()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
[CmifCommand(150)]
public Result ShouldSetGpuTimeSliceManually()
{
Logger.Stub?.PrintStub(LogClass.ServiceAm);
return Result.Success;
}
}
}

View file

@ -65,9 +65,11 @@ namespace Ryujinx.Horizon.Am.Ipc.Proxies
} }
[CmifCommand(20)] [CmifCommand(20)]
public Result OpenLibraryAppletSelfAccessor() public Result OpenLibraryAppletSelfAccessor(out ILibraryAppletSelfAccessor libraryAppletSelfAccessor)
{ {
throw new System.NotImplementedException(); libraryAppletSelfAccessor = new LibraryAppletSelfAccessor();
return Result.Success;
} }
[CmifCommand(21)] [CmifCommand(21)]

View file

@ -54,7 +54,6 @@ namespace Ryujinx.Horizon.Am.Ipc.Proxies
processWindingController = new ProcessWindingController(); processWindingController = new ProcessWindingController();
return Result.Success; return Result.Success;
throw new System.NotImplementedException();
} }
[CmifCommand(11)] [CmifCommand(11)]

View file

@ -0,0 +1,44 @@
using Ryujinx.Horizon.Common;
namespace Ryujinx.Horizon.Sdk.Am.Controllers
{
public interface ILibraryAppletSelfAccessor
{
Result PopInData();
Result PushOutData();
Result PopInteractiveInData();
Result PushInteractiveOutData();
Result GetPopInDataEvent();
Result GetPopInteractiveInDataEvent();
Result ExitProcessAndReturn();
Result GetLibraryAppletInfo();
Result GetMainAppletIdentityInfo();
Result CanUseApplicationCore();
Result GetCallerAppletIdentityInfo();
Result GetMainAppletApplicationControlProperty();
Result GetMainAppletStorageId();
Result GetCallerAppletIdentityInfoStack();
Result GetNextReturnDestinationAppletIdentityInfo();
Result GetDesirableKeyboardLayout();
Result PopExtraStorage();
Result GetPopExtraStorageEvent();
Result UnpopInData();
Result UnpopExtraStorage();
Result GetIndirectLayerProducerHandle();
Result ReportVisibleError();
Result ReportVisibleErrorWithErrorContext();
Result GetMainAppletApplicationDesiredLanguage();
Result GetCurrentApplicationId();
Result RequestExitToSelf();
Result CreateApplicationAndPushAndRequestToLaunch();
Result CreateGameMovieTrimmer();
Result ReserveResourceForMovieOperation();
Result UnreserveResourceForMovieOperation();
Result GetMainAppletAvailableUsers();
Result GetLaunchStorageInfoForDebug();
Result GetGpuErrorDetectedSystemEvent();
Result SetApplicationMemoryReservation();
Result ShouldSetGpuTimeSliceManually();
// 160 (17.0.0+) Unknown Function
}
}

View file

@ -12,7 +12,7 @@ namespace Ryujinx.Horizon.Sdk.Am.Proxies
Result GetDisplayController(out IDisplayController displayController); Result GetDisplayController(out IDisplayController displayController);
Result GetProcessWindingController(out IProcessWindingController processWindingController); Result GetProcessWindingController(out IProcessWindingController processWindingController);
Result GetLibraryAppletCreator(out ILibraryAppletCreator libraryAppletCreator); Result GetLibraryAppletCreator(out ILibraryAppletCreator libraryAppletCreator);
Result OpenLibraryAppletSelfAccessor(); Result OpenLibraryAppletSelfAccessor(out ILibraryAppletSelfAccessor libraryAppletSelfAccessor);
Result GetAppletCommonFunctions(out IAppletCommonFunctions appletCommonFunctions); Result GetAppletCommonFunctions(out IAppletCommonFunctions appletCommonFunctions);
Result GetHomeMenuFunctions(); Result GetHomeMenuFunctions();
Result GetGlobalStateController(); Result GetGlobalStateController();