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 // NOLINTEND
23
24#ifdef LL_PLAT_S
25#else // LL_PLAT_C
26public:
27 // prevent constructor by default
28 AllowList();
29
30#endif
31public:
32 // virtual functions
33 // NOLINTBEGIN
34 virtual ::Json::Value serialize() const /*override*/;
35
36 virtual void deserialize(::Json::Value const& root) /*override*/;
37 // NOLINTEND
38
39public:
40 // member functions
41 // NOLINTBEGIN
42#ifdef LL_PLAT_C
43 MCAPI explicit AllowList(::std::function<void()> syncCallback);
44#endif
45
46#ifdef LL_PLAT_S
47 MCAPI bool addByName(::std::string_view name);
48#endif
49
50 MCAPI bool addByNsaId(::std::string_view nsaId);
51
52 MCAPI bool addByPsnId(::std::string_view psnId);
53
54 MCAPI bool addByXuid(::std::string_view xuid);
55
56#ifdef LL_PLAT_S
57 MCFOLD ::std::vector<::AllowListEntry> const& getEntries() const;
58#endif
59
60 MCAPI bool isAllowed(
61 ::mce::UUID const& uuid,
62 ::std::string_view xuid,
63 ::std::string_view psnId,
64 ::std::string_view nsaId
65 ) const;
66
67 MCAPI bool isIgnoringPlayerLimit(::mce::UUID const& uuid, ::std::string_view xuid) const;
68
69#ifdef LL_PLAT_S
70 MCAPI bool removeByName(::std::string_view name);
71#endif
72
73 MCAPI bool removeByNsaId(::std::string_view nsaId);
74
75 MCAPI bool removeByPsnId(::std::string_view psnId);
76
77 MCAPI bool removeByXuid(::std::string_view xuid);
78
79 MCAPI void tryUpdateEntries(
80 ::std::string_view name,
81 ::std::string_view xuid,
82 ::std::string_view psnId,
83 ::std::string_view nsaId
84 );
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90#ifdef LL_PLAT_C
91 MCAPI void* $ctor(::std::function<void()> syncCallback);
92#endif
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98 MCAPI ::Json::Value $serialize() const;
99
100 MCAPI void $deserialize(::Json::Value const& root);
101
102
103 // NOLINTEND
104
105public:
106 // vftables
107 // NOLINTBEGIN
108 MCNAPI static void** $vftable();
109 // NOLINTEND
110};
Definition AllowListEntry.h:14
static MCAPI void ** $vftable()
Definition IJsonSerializable.h:10
Definition Value.h:16
Definition UUID.h:7