LeviLamina
Loading...
Searching...
No Matches
EduWebService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/certificates/identity/web_services/EduRole.h"
7#include "mc/certificates/identity/web_services/IEduWebService.h"
8#include "mc/certificates/identity/web_services/SigninContext.h"
9#include "mc/deps/core/minecraft/threading/EnableQueueForMainThread.h"
10
11// auto generated forward declare list
12// clang-format off
14struct EDUConfigData;
15struct ServicePack;
16namespace Bedrock::Http { class Request; }
17namespace Bedrock::Http { class Response; }
18namespace Json { class Value; }
19namespace WebServices::EduSignin { struct SigninError; }
20namespace WebServices::EduSignin { struct SigninResponse; }
21// clang-format on
22
23namespace WebServices {
24
26public:
27 // member variables
28 // NOLINTBEGIN
34 // NOLINTEND
35
36public:
37 // prevent constructor by default
38 EduWebService& operator=(EduWebService const&);
39 EduWebService(EduWebService const&);
40 EduWebService();
41
42public:
43 // virtual functions
44 // NOLINTBEGIN
45#ifdef LL_PLAT_S
46 virtual ~EduWebService() /*override*/ = default;
47#else // LL_PLAT_C
48 virtual ~EduWebService() /*override*/;
49#endif
50
51 virtual void setEula() /*override*/;
52
53#ifdef LL_PLAT_S
54 virtual void
55 setPurchaseReceipt(::std::string const&, ::std::function<void(bool)> const&, ::std::string const&) /*override*/;
56#else // LL_PLAT_C
57 virtual void setPurchaseReceipt(
58 ::std::string const& receipt,
59 ::std::function<void(bool)> const& callback,
60 ::std::string const& anonimizedOId
61 ) /*override*/;
62#endif
63
64#ifdef LL_PLAT_S
65 virtual void setSkin(::std::string const&) /*override*/;
66#else // LL_PLAT_C
67 virtual void setSkin(::std::string const& newSkin) /*override*/;
68#endif
69
70#ifdef LL_PLAT_S
71 virtual void signinForDemo(
72 ::std::function<
73 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
74 ) /*override*/;
75#else // LL_PLAT_C
76 virtual void signinForDemo(
77 ::std::function<
78 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
79 callback
80 ) /*override*/;
81#endif
82
83#ifdef LL_PLAT_S
84 virtual void signin(
85 ::std::function<
86 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>,
87 ::std::string const&
88 ) /*override*/;
89#else // LL_PLAT_C
90 virtual void signin(
91 ::std::function<
92 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
93 callback,
94 ::std::string const& delegationKey
95 ) /*override*/;
96#endif
97
98#ifdef LL_PLAT_S
99 virtual void sendInitialPackRequest(::std::function<void(::std::vector<::ServicePack>)>) /*override*/;
100#else // LL_PLAT_C
101 virtual void
102 sendInitialPackRequest(::std::function<void(::std::vector<::ServicePack>)> packReturnCallback) /*override*/;
103#endif
104
105 // NOLINTEND
106
107public:
108 // member functions
109 // NOLINTBEGIN
110#ifdef LL_PLAT_C
111 MCNAPI EduWebService(
112 ::std::unique_ptr<::ResponseVerifier> verifier,
113 ::std::function<::std::string const()> getEduIdentityToken,
114 ::std::function<::std::optional<::EDUConfigData>(::Json::Value&)> clientConfigParser,
115 ::std::string const& appSessionId
116 );
117
118 MCNAPI void _authenticateWithService(
119 ::std::function<
120 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
121 callback,
122 ::Json::Value unverifiedJson,
123 ::WebServices::SigninContext context
124 );
125
126 MCNAPI void _authenticateWithService(
128 ::std::function<
129 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
130 callback,
131 ::WebServices::SigninContext context
132 );
133
134 MCNAPI ::Bedrock::Http::Request
135 getRequest(::std::string_view url, ::std::string apiVersion, bool includeAuth, ::Json::Value&& body);
136
137 MCNAPI ::WebServices::EduSignin::EduRole getRole(::std::string const& str);
138#endif
139 // NOLINTEND
140
141public:
142 // constructor thunks
143 // NOLINTBEGIN
144#ifdef LL_PLAT_C
145 MCNAPI void* $ctor(
146 ::std::unique_ptr<::ResponseVerifier> verifier,
147 ::std::function<::std::string const()> getEduIdentityToken,
148 ::std::function<::std::optional<::EDUConfigData>(::Json::Value&)> clientConfigParser,
149 ::std::string const& appSessionId
150 );
151#endif
152 // NOLINTEND
153
154public:
155 // destructor thunk
156 // NOLINTBEGIN
157 MCNAPI void $dtor();
158 // NOLINTEND
159
160public:
161 // virtual function thunks
162 // NOLINTBEGIN
163#ifdef LL_PLAT_C
164 MCNAPI void $setEula();
165
166 MCNAPI void $setPurchaseReceipt(
167 ::std::string const& receipt,
168 ::std::function<void(bool)> const& callback,
169 ::std::string const& anonimizedOId
170 );
171
172 MCNAPI void $setSkin(::std::string const& newSkin);
173
174 MCNAPI void $signinForDemo(
175 ::std::function<
176 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
177 callback
178 );
179
180 MCNAPI void $signin(
181 ::std::function<
182 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
183 callback,
184 ::std::string const& delegationKey
185 );
186
187 MCNAPI void $sendInitialPackRequest(::std::function<void(::std::vector<::ServicePack>)> packReturnCallback);
188#endif
189
190
191 // NOLINTEND
192
193public:
194 // vftables
195 // NOLINTBEGIN
196 MCNAPI static void** $vftableForIEduWebService();
197
199 // NOLINTEND
200};
201
202} // namespace WebServices
Definition Request.h:22
Definition Response.h:7
Definition EnableQueueForMainThread.h:11
Definition Value.h:16
Definition ResponseVerifier.h:10
static MCAPI void ** $vftableForIEduWebService()
static MCAPI void ** $vftableForEnableQueueForMainThread()
Definition EDUConfigData.h:15
Definition ServicePack.h:13
Definition SigninError.h:7
Definition SigninResponse.h:7
Definition IEduWebService.h:17
Definition context.h:5
Definition Alias.h:14