LeviLamina
Loading...
Searching...
No Matches
MinecraftServiceKeyManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/Async.h"
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8#include "mc/platform/brstd/future.h"
9
10// auto generated forward declare list
11// clang-format off
13class TaskGroup;
16namespace Bedrock::Http { struct Url; }
17// clang-format on
18
19class MinecraftServiceKeyManager : public ::Bedrock::EnableNonOwnerReferences {
20public:
21 // MinecraftServiceKeyManager inner types declare
22 // clang-format off
24 // clang-format on
25
26 // MinecraftServiceKeyManager inner types define
27 struct BlockingInitRecursiveContext {
28 public:
29 // member variables
30 // NOLINTBEGIN
32 // NOLINTEND
33
34 public:
35 // prevent constructor by default
36 BlockingInitRecursiveContext& operator=(BlockingInitRecursiveContext const&);
37 BlockingInitRecursiveContext(BlockingInitRecursiveContext const&);
38 BlockingInitRecursiveContext();
39 };
40
41public:
42 // member variables
43 // NOLINTBEGIN
59 // NOLINTEND
60
61public:
62 // prevent constructor by default
63 MinecraftServiceKeyManager& operator=(MinecraftServiceKeyManager const&);
64 MinecraftServiceKeyManager(MinecraftServiceKeyManager const&);
65 MinecraftServiceKeyManager();
66
67public:
68 // virtual functions
69 // NOLINTBEGIN
70 virtual ~MinecraftServiceKeyManager() /*override*/;
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCNAPI explicit MinecraftServiceKeyManager(::std::unique_ptr<::IMinecraftServiceKeySource> keySource);
77
79 ::std::unique_ptr<::IMinecraftServiceKeySource> keySource,
80 ::std::function<int64()> timeFn,
82 ::std::function<::Bedrock::Threading::Async<
83 ::std::optional<::MinecraftServiceKeysMetadata>>(::TaskGroup&, ::std::string const&, bool)> metadataFn,
84 ::std::function<::Bedrock::Threading::Async<::std::optional<
85 ::std::unordered_map<::std::string, ::std::string>>>(::TaskGroup&, ::std::string const&, bool)> keysFn
86 );
87
88#ifdef LL_PLAT_S
89 MCNAPI void _blockingInitRecursive(
90 ::MinecraftServiceKeyInfo keyFetchResult,
91 ::std::shared_ptr<::MinecraftServiceKeyManager::BlockingInitRecursiveContext> context
92 );
93#endif
94
95 MCNAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo> _fastFetch(bool highPriority);
96
97 MCNAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo> _fullFetch(bool highPriority);
98
99 MCNAPI bool _saveMetadata(::std::optional<::MinecraftServiceKeysMetadata> const& metadata);
100
101 MCNAPI void _updateTrustedKeys();
102
103#ifdef LL_PLAT_S
104 MCNAPI ::brstd::future<bool> blockingInit();
105#endif
106
107 MCNAPI ::std::string const& getIssuer() const;
108
109 MCNAPI ::std::string getKeyFromKeyId(::std::string const& kid) const;
110
111 MCNAPI ::MinecraftServiceKeyInfo getKeyInfo() const;
112
113 MCNAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo> getKeysIfWeDontAlreadyHaveThem();
114
115 MCNAPI int64 getRoughTimeCorrectionSeconds() const;
116
117 MCNAPI bool hasRetrievedTrustedKeys() const;
118
119 MCNAPI void init();
120
121 MCNAPI bool onTick();
122
123 MCNAPI void setHostKey(::std::string const& hostKey);
124 // NOLINTEND
125
126public:
127 // constructor thunks
128 // NOLINTBEGIN
129 MCNAPI void* $ctor(::std::unique_ptr<::IMinecraftServiceKeySource> keySource);
130
131 MCNAPI void* $ctor(
132 ::std::unique_ptr<::IMinecraftServiceKeySource> keySource,
133 ::std::function<int64()> timeFn,
135 ::std::function<::Bedrock::Threading::Async<
136 ::std::optional<::MinecraftServiceKeysMetadata>>(::TaskGroup&, ::std::string const&, bool)> metadataFn,
137 ::std::function<::Bedrock::Threading::Async<::std::optional<
138 ::std::unordered_map<::std::string, ::std::string>>>(::TaskGroup&, ::std::string const&, bool)> keysFn
139 );
140 // NOLINTEND
141
142public:
143 // destructor thunk
144 // NOLINTBEGIN
145 MCNAPI void $dtor();
146 // NOLINTEND
147
148public:
149 // vftables
150 // NOLINTBEGIN
151 MCNAPI static void** $vftable();
152 // NOLINTEND
153};
Definition EnableNonOwnerReferences.h:7
Definition Async.h:8
Definition IMinecraftServiceKeySource.h:14
MCAPI void setHostKey(::std::string const &hostKey)
MCAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo > getKeysIfWeDontAlreadyHaveThem()
MCAPI void _updateTrustedKeys()
MCAPI void * $ctor(::std::unique_ptr<::IMinecraftServiceKeySource > keySource)
MCAPI void * $ctor(::std::unique_ptr<::IMinecraftServiceKeySource > keySource, ::std::function< int64()> timeFn, ::std::function<::Bedrock::Threading::Async<::Bedrock::Http::Url >()> urlFn, ::std::function<::Bedrock::Threading::Async< ::std::optional<::MinecraftServiceKeysMetadata > >(::TaskGroup &, ::std::string const &, bool)> metadataFn, ::std::function<::Bedrock::Threading::Async<::std::optional< ::std::unordered_map<::std::string, ::std::string > > >(::TaskGroup &, ::std::string const &, bool)> keysFn)
MCAPI bool _saveMetadata(::std::optional<::MinecraftServiceKeysMetadata > const &metadata)
MCAPI MinecraftServiceKeyManager(::std::unique_ptr<::IMinecraftServiceKeySource > keySource, ::std::function< int64()> timeFn, ::std::function<::Bedrock::Threading::Async<::Bedrock::Http::Url >()> urlFn, ::std::function<::Bedrock::Threading::Async< ::std::optional<::MinecraftServiceKeysMetadata > >(::TaskGroup &, ::std::string const &, bool)> metadataFn, ::std::function<::Bedrock::Threading::Async<::std::optional< ::std::unordered_map<::std::string, ::std::string > > >(::TaskGroup &, ::std::string const &, bool)> keysFn)
MCAPI MinecraftServiceKeyManager(::std::unique_ptr<::IMinecraftServiceKeySource > keySource)
MCAPI::std::string const & getIssuer() const
MCAPI::MinecraftServiceKeyInfo getKeyInfo() const
static MCAPI void ** $vftable()
MCAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo > _fastFetch(bool highPriority)
MCAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo > _fullFetch(bool highPriority)
MCAPI::std::string getKeyFromKeyId(::std::string const &kid) const
MCAPI int64 getRoughTimeCorrectionSeconds() const
MCAPI bool hasRetrievedTrustedKeys() const
Definition TaskGroup.h:55
Definition Url.h:7
Definition MinecraftServiceKeyInfo.h:5
Definition MinecraftServiceKeyManager.h:27
Definition MinecraftServiceKeysMetadata.h:5
Definition context.h:5
Definition Alias.h:14