2020-04-30 04:58:19 +00:00
|
|
|
|
using LibHac;
|
|
|
|
|
using LibHac.Ncm;
|
|
|
|
|
using LibHac.Ns;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
using ApplicationId = LibHac.ApplicationId;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Arp
|
|
|
|
|
{
|
2021-01-02 22:34:28 +00:00
|
|
|
|
class LibHacIReader : LibHac.Arp.Impl.IReader
|
2020-04-30 04:58:19 +00:00
|
|
|
|
{
|
2021-08-12 21:56:24 +00:00
|
|
|
|
public ApplicationId ApplicationId { get; set; }
|
2020-04-30 04:58:19 +00:00
|
|
|
|
|
|
|
|
|
public Result GetApplicationLaunchProperty(out LibHac.Arp.ApplicationLaunchProperty launchProperty, ulong processId)
|
|
|
|
|
{
|
2021-01-02 22:34:28 +00:00
|
|
|
|
launchProperty = new LibHac.Arp.ApplicationLaunchProperty
|
|
|
|
|
{
|
|
|
|
|
BaseStorageId = StorageId.BuiltInUser,
|
2021-08-12 21:56:24 +00:00
|
|
|
|
ApplicationId = ApplicationId
|
2021-01-02 22:34:28 +00:00
|
|
|
|
};
|
2020-04-30 04:58:19 +00:00
|
|
|
|
|
|
|
|
|
return Result.Success;
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-02 22:34:28 +00:00
|
|
|
|
public Result GetApplicationLaunchPropertyWithApplicationId(out LibHac.Arp.ApplicationLaunchProperty launchProperty, ApplicationId applicationId)
|
2020-04-30 04:58:19 +00:00
|
|
|
|
{
|
2021-01-02 22:34:28 +00:00
|
|
|
|
launchProperty = new LibHac.Arp.ApplicationLaunchProperty
|
|
|
|
|
{
|
|
|
|
|
BaseStorageId = StorageId.BuiltInUser,
|
|
|
|
|
ApplicationId = applicationId
|
|
|
|
|
};
|
2020-04-30 04:58:19 +00:00
|
|
|
|
|
|
|
|
|
return Result.Success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Result GetApplicationControlProperty(out ApplicationControlProperty controlProperty, ulong processId)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-02 22:34:28 +00:00
|
|
|
|
public Result GetApplicationControlPropertyWithApplicationId(out ApplicationControlProperty controlProperty, ApplicationId applicationId)
|
2020-04-30 04:58:19 +00:00
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
2021-08-12 21:56:24 +00:00
|
|
|
|
|
|
|
|
|
public Result GetServiceObject(out object serviceObject)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal class LibHacArpServiceObject : LibHac.Sm.IServiceObject
|
|
|
|
|
{
|
|
|
|
|
private LibHacIReader _serviceObject;
|
|
|
|
|
|
|
|
|
|
public LibHacArpServiceObject(LibHacIReader serviceObject)
|
|
|
|
|
{
|
|
|
|
|
_serviceObject = serviceObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Result GetServiceObject(out object serviceObject)
|
|
|
|
|
{
|
|
|
|
|
serviceObject = _serviceObject;
|
|
|
|
|
|
|
|
|
|
return Result.Success;
|
|
|
|
|
}
|
2020-04-30 04:58:19 +00:00
|
|
|
|
}
|
2021-01-02 22:34:28 +00:00
|
|
|
|
}
|