aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Applets/IApplet.cs
blob: b10ede68f6a62e86c4b744a5bc44a1e752e04953 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
using System;
using System.Runtime.InteropServices;

namespace Ryujinx.HLE.HOS.Applets
{
    interface IApplet
    {
        event EventHandler AppletStateChanged;

        ResultCode Start(AppletSession normalSession,
                         AppletSession interactiveSession);

        ResultCode GetResult();

        static T ReadStruct<T>(ReadOnlySpan<byte> data) where T : struct
        {
            return MemoryMarshal.Cast<byte, T>(data)[0];
        }
    }
}