aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Am/AppletAE/IStorage.cs
blob: 190f1a514313c4b155d5a8cea2f497735280df7a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
{
    class IStorage : IpcService
    {
        public bool   IsReadOnly { get; private set; }
        public byte[] Data       { get; private set; }

        public IStorage(byte[] data, bool isReadOnly = false)
        {
            IsReadOnly = isReadOnly;
            Data       = data;
        }

        [CommandCmif(0)]
        // Open() -> object<nn::am::service::IStorageAccessor>
        public ResultCode Open(ServiceCtx context)
        {
            MakeObject(context, new IStorageAccessor(this));

            return ResultCode.Success;
        }
    }
}