aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Horizon/Sdk/Sf/Cmif/ServerMessageRuntimeMetadata.cs
blob: 18a404302d107f68abb6a49c8cbabd12d6a08bc6 (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
24
25
26
27
28
29
namespace Ryujinx.Horizon.Sdk.Sf.Cmif
{
    struct ServerMessageRuntimeMetadata
    {
        public ushort InDataSize { get; }
        public ushort OutDataSize { get; }
        public byte InHeadersSize { get; }
        public byte OutHeadersSize { get; }
        public byte InObjectsCount { get; }
        public byte OutObjectsCount { get; }
        public int UnfixedOutPointerSizeOffset => InDataSize + InHeadersSize + 0x10;

        public ServerMessageRuntimeMetadata(
            ushort inDataSize,
            ushort outDataSize,
            byte inHeadersSize,
            byte outHeadersSize,
            byte inObjectsCount,
            byte outObjectsCount)
        {
            InDataSize = inDataSize;
            OutDataSize = outDataSize;
            InHeadersSize = inHeadersSize;
            OutHeadersSize = outHeadersSize;
            InObjectsCount = inObjectsCount;
            OutObjectsCount = outObjectsCount;
        }
    }
}