aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Horizon/Sdk/Sf/Cmif/ServerMessageRuntimeMetadata.cs
blob: 6a92e8d550a908fb841a3c9ff77fa4d328d51cf3 (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
{
    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;
        }
    }
}