aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Horizon/Sdk/Sf/Cmif/ServerMessageRuntimeMetadata.cs
blob: 206676020b85935601acece525866229ab67a639 (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
30
namespace Ryujinx.Horizon.Sdk.Sf.Cmif
{
    readonly 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;
        }
    }
}