2019-09-18 17:45:11 -07:00
|
|
|
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2018-03-19 11:58:46 -07:00
|
|
|
class IStorage : IpcService
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2021-01-18 18:28:35 -08:00
|
|
|
public bool IsReadOnly { get; private set; }
|
|
|
|
public byte[] Data { get; private set; }
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2021-01-18 18:28:35 -08:00
|
|
|
public IStorage(byte[] data, bool isReadOnly = false)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2021-01-18 18:28:35 -08:00
|
|
|
IsReadOnly = isReadOnly;
|
|
|
|
Data = data;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
[CommandHipc(0)]
|
2019-07-11 18:13:43 -07:00
|
|
|
// Open() -> object<nn::am::service::IStorageAccessor>
|
2019-07-14 12:04:38 -07:00
|
|
|
public ResultCode Open(ServiceCtx context)
|
2018-02-09 16:14:55 -08:00
|
|
|
{
|
2018-12-06 03:16:24 -08:00
|
|
|
MakeObject(context, new IStorageAccessor(this));
|
2018-02-09 16:14:55 -08:00
|
|
|
|
2019-07-14 12:04:38 -07:00
|
|
|
return ResultCode.Success;
|
2018-02-09 16:14:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|