LeviLamina
Loading...
Searching...
No Matches
WinHttpConnection.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/XAsyncOp.h"
7#include "mc/external/lib_http_client/HCWebSocketCloseStatus.h"
8#include "mc/external/lib_http_client/Result.h"
9#include "mc/external/lib_http_client/hc_websocket_impl.h"
10#include "mc/external/lib_http_client/proxy_type.h"
11
12// auto generated forward declare list
13// clang-format off
14struct HC_CALL;
16struct XAsyncBlock;
18namespace xbox::httpclient { struct WinHttpCallbackContext; }
19namespace xbox::httpclient { struct XPlatSecurityInformation; }
20// clang-format on
21
22namespace xbox::httpclient {
23
25 public ::std::enable_shared_from_this<::xbox::httpclient::WinHttpConnection> {
26public:
27 // WinHttpConnection inner types declare
28 // clang-format off
30 // clang-format on
31
32 // WinHttpConnection inner types define
34 public:
35 // member variables
36 // NOLINTBEGIN
42 // NOLINTEND
43
44 public:
45 // prevent constructor by default
49 };
50
51public:
52 // member variables
53 // NOLINTBEGIN
80 // NOLINTEND
81
82public:
83 // prevent constructor by default
84 WinHttpConnection& operator=(WinHttpConnection const&);
87
88public:
89 // virtual functions
90 // NOLINTBEGIN
91 // vIndex: 0
92 virtual ~WinHttpConnection() /*override*/;
93 // NOLINTEND
94
95public:
96 // member functions
97 // NOLINTBEGIN
98 MCNAPI long Close(::std::function<void()> callback);
99
101
102 MCNAPI long Initialize();
103
104 MCNAPI void SendRequest();
105
106 MCNAPI void StartWinHttpClose();
107
109
110 MCNAPI long WebSocketDisconnect(::HCWebSocketCloseStatus closeStatus);
111
112 MCNAPI long WebSocketReadAsync();
113
114 MCNAPI long WebSocketReadComplete(bool binaryMessage, bool endOfMessage);
115
117
118 MCNAPI long WebSocketSendMessageAsync(::XAsyncBlock* async, char const* message);
119
121 ::XAsyncBlock* async,
122 uchar const* payloadBytes,
123 uint64 payloadSize,
124 ::_WINHTTP_WEB_SOCKET_BUFFER_TYPE payloadType
125 );
126
128 void* hSession,
129 ::HC_CALL* call,
130 ::xbox::httpclient::proxy_type proxyType,
132 );
133
134 MCNAPI void complete_task(long translatedHR, uint platformSpecificError);
135
136 MCNAPI void on_websocket_disconnected(ushort closeReason);
137 // NOLINTEND
138
139public:
140 // static functions
141 // NOLINTBEGIN
142 MCNAPI static ::xbox::httpclient::Result<::std::shared_ptr<::xbox::httpclient::WinHttpConnection>> Initialize(
143 void* hSession,
144 ::HC_CALL* call,
145 ::xbox::httpclient::proxy_type proxyType,
147 );
148
149 MCNAPI static ::xbox::httpclient::Result<::std::shared_ptr<::xbox::httpclient::WinHttpConnection>> Initialize(
150 void* hSession,
151 ::HC_WEBSOCKET_OBSERVER* webSocket,
152 char const* uri,
153 char const* subprotocol,
154 ::xbox::httpclient::proxy_type proxyType,
156 );
157
158 MCNAPI static long WebSocketConnectProvider(::XAsyncOp op, ::XAsyncProviderData const* data);
159
160 MCNAPI static long WebSocketSendProvider(::XAsyncOp op, ::XAsyncProviderData const* data);
161
163
165 void* hRequestHandle,
167 void* statusInfo
168 );
169
171 void* hRequestHandle,
173 void*
174 );
175
177 void* hRequestHandle,
179 void* statusInfo
180 );
181
183 void* hRequestHandle,
185 );
186
187 MCNAPI static void completion_callback(
188 void* hRequestHandle,
189 uint64 context,
190 ulong statusCode,
191 void* statusInfo,
192 ulong statusInfoLength
193 );
194
196
197 MCNAPI static void parse_headers_string(::HC_CALL* call, wchar_t* headersStr);
198
199 MCNAPI static uint
200 parse_status_code(::HC_CALL* call, void* hRequestHandle, ::xbox::httpclient::WinHttpConnection* pRequestContext);
201
202 MCNAPI static void read_next_response_chunk(::xbox::httpclient::WinHttpConnection* pRequestContext, ulong);
203 // NOLINTEND
204
205public:
206 // constructor thunks
207 // NOLINTBEGIN
208 MCNAPI void* $ctor(
209 void* hSession,
210 ::HC_CALL* call,
211 ::xbox::httpclient::proxy_type proxyType,
213 );
214 // NOLINTEND
215
216public:
217 // destructor thunk
218 // NOLINTBEGIN
219 MCNAPI void $dtor();
220 // NOLINTEND
221
222public:
223 // vftables
224 // NOLINTBEGIN
225 MCNAPI static void** $vftable();
226 // NOLINTEND
227};
228
229} // namespace xbox::httpclient
Definition WinHttpConnection.h:25
static MCAPI long WebSocketConnectProvider(::XAsyncOp op, ::XAsyncProviderData const *data)
MCAPI WinHttpConnection(void *hSession, ::HC_CALL *call, ::xbox::httpclient::proxy_type proxyType, ::xbox::httpclient::XPlatSecurityInformation &&securityInformation)
static MCAPI void read_next_response_chunk(::xbox::httpclient::WinHttpConnection *pRequestContext, ulong)
static MCAPI void _multiple_segment_write_data(::xbox::httpclient::WinHttpConnection *pRequestContext)
MCAPI void * $ctor(void *hSession, ::HC_CALL *call, ::xbox::httpclient::proxy_type proxyType, ::xbox::httpclient::XPlatSecurityInformation &&securityInformation)
MCAPI void on_websocket_disconnected(ushort closeReason)
MCAPI long WebSocketReadComplete(bool binaryMessage, bool endOfMessage)
MCAPI long WebSocketDisconnect(::HCWebSocketCloseStatus closeStatus)
MCAPI long WebSocketSendMessageAsync(::XAsyncBlock *async, char const *message)
static MCAPI void callback_websocket_status_headers_available(void *hRequestHandle, ::xbox::httpclient::WinHttpCallbackContext *winHttpContext)
MCAPI long Close(::std::function< void()> callback)
static MCAPI void callback_status_request_error(void *hRequestHandle, ::xbox::httpclient::WinHttpConnection *pRequestContext, void *statusInfo)
MCAPI void complete_task(long translatedHR, uint platformSpecificError)
static MCAPI void completion_callback(void *hRequestHandle, uint64 context, ulong statusCode, void *statusInfo, ulong statusInfoLength)
MCAPI void WebSocketSendMessage(::xbox::httpclient::WinHttpConnection::WebSocketSendContext const &sendContext)
MCAPI long HttpCallPerformAsync(::XAsyncBlock *async)
static MCAPI ::xbox::httpclient::Result<::std::shared_ptr<::xbox::httpclient::WinHttpConnection > > Initialize(void *hSession, ::HC_CALL *call, ::xbox::httpclient::proxy_type proxyType, ::xbox::httpclient::XPlatSecurityInformation &&securityInformation)
static MCAPI long WebSocketSendProvider(::XAsyncOp op, ::XAsyncProviderData const *data)
static MCAPI void parse_headers_string(::HC_CALL *call, wchar_t *headersStr)
static MCAPI long flush_response_buffer(::xbox::httpclient::WinHttpConnection *pRequestContext)
static MCAPI uint parse_status_code(::HC_CALL *call, void *hRequestHandle, ::xbox::httpclient::WinHttpConnection *pRequestContext)
static MCAPI void callback_status_headers_available(void *hRequestHandle, ::xbox::httpclient::WinHttpConnection *pRequestContext, void *)
static MCAPI void ** $vftable()
static MCAPI void callback_status_data_available(void *hRequestHandle, ::xbox::httpclient::WinHttpConnection *pRequestContext, void *statusInfo)
static MCAPI ::xbox::httpclient::Result<::std::shared_ptr<::xbox::httpclient::WinHttpConnection > > Initialize(void *hSession, ::HC_WEBSOCKET_OBSERVER *webSocket, char const *uri, char const *subprotocol, ::xbox::httpclient::proxy_type proxyType, ::xbox::httpclient::XPlatSecurityInformation &&securityInformation)
MCAPI long WebSocketSendMessageAsync(::XAsyncBlock *async, uchar const *payloadBytes, uint64 payloadSize, ::_WINHTTP_WEB_SOCKET_BUFFER_TYPE payloadType)
MCAPI long WebSocketConnectAsync(::XAsyncBlock *async)
Definition HC_CALL.h:16
Definition HC_WEBSOCKET_OBSERVER.h:14
Definition XAsyncBlock.h:10
Definition XAsyncProviderData.h:5
Definition context.h:5
Definition Alias.h:14
Definition WinHttpCallbackContext.h:7
Definition XPlatSecurityInformation.h:7
Definition hc_websocket_impl.h:7