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 MCNAPI_C void _authenticateWithService(
83 ::std::function<
84 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
85 callback,
86 ::Json::Value unverifiedJson,
87 ::WebServices::SigninContext context
88 );
89
90 MCNAPI_C void _authenticateWithService(
92 ::std::function<
93 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
94 callback,
95 ::WebServices::SigninContext context
96 );
97
98 MCNAPI_C ::Bedrock::Http::Request
99 getRequest(::std::string_view url, ::std::string apiVersion, bool includeAuth, ::Json::Value&& body);
100
101 MCNAPI_C ::WebServices::EduSignin::EduRole getRole(::std::string const& str);
102 // NOLINTEND
103
104public:
105 // static functions
106 // NOLINTBEGIN
107 MCNAPI_C static ::ActiveDirectoryAuthenticationState
108 getErrorState(::std::string const& reason, ::WebServices::SigninContext context);
109 // NOLINTEND
110
111public:
112 // constructor thunks
113 // NOLINTBEGIN
114 MCNAPI_C void* $ctor(
115 ::std::unique_ptr<::ResponseVerifier> verifier,
116 ::std::function<::std::string const()> getEduIdentityToken,
117 ::std::function<::std::optional<::EDUConfigData>(::Json::Value&)> clientConfigParser,
118 ::std::string const& appSessionId
119 );
120 // NOLINTEND
121
122public:
123 // destructor thunk
124 // NOLINTBEGIN
125 MCNAPI void $dtor();
126 // NOLINTEND
127
128public:
129 // virtual function thunks
130 // NOLINTBEGIN
131#ifdef LL_PLAT_C
132 MCNAPI void $setEula();
133
134 MCNAPI void $setPurchaseReceipt(
135 ::std::string const& receipt,
136 ::std::function<void(bool)> const& callback,
137 ::std::string const& anonimizedOId
138 );
139
140 MCNAPI void $setSkin(::std::string const& newSkin);
141
142 MCNAPI void $signinForDemo(
143 ::std::function<
144 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
145 callback
146 );
147
148 MCNAPI void $signin(
149 ::std::function<
150 void(::std::variant<::WebServices::EduSignin::SigninResponse, ::WebServices::EduSignin::SigninError>)>
151 callback,
152 ::std::string const& delegationKey
153 );
154
155 MCNAPI void $sendInitialPackRequest(::std::function<void(::std::vector<::ServicePack>)> packReturnCallback);
156#endif
157
158
159 // NOLINTEND
160
161public:
162 // vftables
163 // NOLINTBEGIN
164 MCNAPI static void** $vftableForIEduWebService();
165
167 // NOLINTEND
168};
169
170} // namespace WebServices
Definition Request.h:16
Definition Response.h:13
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