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