LeviLamina
Loading...
Searching...
No Matches
AllowList.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/AllowListEntry.h"
7#include "mc/server/IJsonSerializable.h"
8
9// auto generated forward declare list
10// clang-format off
11class AllowListEntry;
12namespace Json { class Value; }
13namespace mce { class UUID; }
14// clang-format on
15
16class AllowList : public ::IJsonSerializable {
17public:
18 // member variables
19 // NOLINTBEGIN
20 ::ll::TypedStorage<8, 24, ::std::vector<::AllowListEntry>> mEntries;
21 ::ll::TypedStorage<8, 64, ::std::function<void()>> mSyncCallback;
22 ::ll::TypedStorage<1, 1, bool> mIsEnabled;
23 // NOLINTEND
24
25#ifdef LL_PLAT_S
26#else // LL_PLAT_C
27public:
28 // prevent constructor by default
29 AllowList();
30
31#endif
32public:
33 // virtual functions
34 // NOLINTBEGIN
35 virtual ::Json::Value serialize() const /*override*/;
36
37 virtual void deserialize(::Json::Value const& root) /*override*/;
38 // NOLINTEND
39
40public:
41 // member functions
42 // NOLINTBEGIN
43#ifdef LL_PLAT_C
44 MCAPI explicit AllowList(::std::function<void()> syncCallback);
45#endif
46
47#ifdef LL_PLAT_S
48 MCAPI bool addByName(::std::string_view name);
49#endif
50
51 MCAPI bool addByNsaId(::std::string_view nsaId);
52
53 MCAPI bool addByPsnId(::std::string_view psnId);
54
55 MCAPI bool addByXuid(::std::string_view xuid);
56
57 MCAPI bool isAllowed(
58 ::mce::UUID const& uuid,
59 ::std::string_view xuid,
60 ::std::string_view psnId,
61 ::std::string_view nsaId
62 ) const;
63
64#ifdef LL_PLAT_S
65 MCAPI bool removeByName(::std::string_view name);
66#endif
67
68 MCAPI void tryUpdateEntries(
69 ::std::string_view name,
70 ::std::string_view xuid,
71 ::std::string_view psnId,
72 ::std::string_view nsaId
73 );
74 // NOLINTEND
75
76public:
77 // constructor thunks
78 // NOLINTBEGIN
79#ifdef LL_PLAT_C
80 MCAPI void* $ctor(::std::function<void()> syncCallback);
81#endif
82 // NOLINTEND
83
84public:
85 // virtual function thunks
86 // NOLINTBEGIN
87 MCAPI ::Json::Value $serialize() const;
88
89 MCAPI void $deserialize(::Json::Value const& root);
90
91
92 // NOLINTEND
93
94public:
95 // vftables
96 // NOLINTBEGIN
97 MCNAPI static void** $vftable();
98 // NOLINTEND
99};
Definition AllowListEntry.h:14
static MCAPI void ** $vftable()
Definition IJsonSerializable.h:10
Definition Value.h:16
Definition UUID.h:7