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/deps/crypto/asymmetric/system/System.h"
9#include "mc/platform/brstd/future.h"
10
11// auto generated forward declare list
12// clang-format off
14class TaskGroup;
15class WebKey;
18namespace Bedrock::Http { struct Url; }
19// clang-format on
20
21class MinecraftServiceKeyManager : public ::Bedrock::EnableNonOwnerReferences {
22public:
23 // MinecraftServiceKeyManager inner types declare
24 // clang-format off
26 // clang-format on
27
28 // MinecraftServiceKeyManager inner types define
29 struct BlockingInitRecursiveContext {
30 public:
31 // member variables
32 // NOLINTBEGIN
34 // NOLINTEND
35
36 public:
37 // prevent constructor by default
38 BlockingInitRecursiveContext& operator=(BlockingInitRecursiveContext const&);
39 BlockingInitRecursiveContext(BlockingInitRecursiveContext const&);
40 BlockingInitRecursiveContext();
41 };
42
43public:
44 // member variables
45 // NOLINTBEGIN
62 // NOLINTEND
63
64public:
65 // prevent constructor by default
66 MinecraftServiceKeyManager& operator=(MinecraftServiceKeyManager const&);
67 MinecraftServiceKeyManager(MinecraftServiceKeyManager const&);
68 MinecraftServiceKeyManager();
69
70public:
71 // virtual functions
72 // NOLINTBEGIN
73 virtual ~MinecraftServiceKeyManager() /*override*/ = default;
74 // NOLINTEND
75
76public:
77 // member functions
78 // NOLINTBEGIN
80 ::std::unique_ptr<::IMinecraftServiceKeySource> keySource,
81 ::std::function<int64()> timeFn,
83 ::std::function<::Bedrock::Threading::Async<
84 ::std::optional<::MinecraftServiceKeysMetadata>>(::TaskGroup&, ::std::string const&, bool)> metadataFn,
85 ::std::function<::Bedrock::Threading::Async<
86 ::std::optional<::std::unordered_map<::std::string, ::WebKey>>>(::TaskGroup&, ::std::string const&, bool)>
87 keysFn
88 );
89
90#ifdef LL_PLAT_S
91 MCNAPI void _blockingInitRecursive(
92 ::MinecraftServiceKeyInfo keyFetchResult,
93 ::std::shared_ptr<::MinecraftServiceKeyManager::BlockingInitRecursiveContext> context
94 );
95#endif
96
97 MCNAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo> _fullFetch(bool highPriority);
98
99 MCNAPI void _updateTrustedKeys();
100
101#ifdef LL_PLAT_S
102 MCNAPI ::brstd::future<bool> blockingInit();
103#endif
104
105 MCNAPI ::MinecraftServiceKeyInfo getKeyInfo() const;
106
107 MCNAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo> getKeysIfWeDontAlreadyHaveThem();
108
109 MCNAPI bool onTick();
110
111 MCNAPI void setHostKey(::std::string const& hostKey, ::Crypto::Asymmetric::System type);
112
113 MCNAPI ::std::optional<::WebKey> tryGetKey(::std::string const& kid) const;
114
115 MCNAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo> updateKeys();
116 // NOLINTEND
117
118public:
119 // constructor thunks
120 // NOLINTBEGIN
121 MCNAPI void* $ctor(
122 ::std::unique_ptr<::IMinecraftServiceKeySource> keySource,
123 ::std::function<int64()> timeFn,
125 ::std::function<::Bedrock::Threading::Async<
126 ::std::optional<::MinecraftServiceKeysMetadata>>(::TaskGroup&, ::std::string const&, bool)> metadataFn,
127 ::std::function<::Bedrock::Threading::Async<
128 ::std::optional<::std::unordered_map<::std::string, ::WebKey>>>(::TaskGroup&, ::std::string const&, bool)>
129 keysFn
130 );
131 // NOLINTEND
132};
Definition EnableNonOwnerReferences.h:7
The game spells this as an AsyncImplBase<T> base subobject holding the handle; a member at the same o...
Definition Async.h:13
Definition IMinecraftServiceKeySource.h:14
MCAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo > getKeysIfWeDontAlreadyHaveThem()
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, ::WebKey > > >(::TaskGroup &, ::std::string const &, bool)> keysFn)
MCAPI void _updateTrustedKeys()
MCAPI ::std::optional<::WebKey > tryGetKey(::std::string const &kid) const
MCAPI void setHostKey(::std::string const &hostKey, ::Crypto::Asymmetric::System type)
MCAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo > updateKeys()
MCAPI::MinecraftServiceKeyInfo getKeyInfo() const
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, ::WebKey > > >(::TaskGroup &, ::std::string const &, bool)> keysFn)
MCAPI ::Bedrock::Threading::Async<::MinecraftServiceKeyInfo > _fullFetch(bool highPriority)
Definition TaskGroup.h:86
Definition WebKey.h:13
Definition Url.h:7
Definition MinecraftServiceKeyInfo.h:5
Definition MinecraftServiceKeyManager.h:29
Definition MinecraftServiceKeysMetadata.h:5
Definition context.h:5
Definition Alias.h:14