Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
LibHttpClientImpl.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/http/DispatcherProcess.h"
7#include "mc/deps/core/threading/Async.h"
8#include "mc/deps/core/threading/TaskGroup.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace Bedrock::Http { class LibHttpClientInstance; }
13namespace Bedrock::Http { class Request; }
14namespace Bedrock::Http { class Response; }
15namespace Bedrock::Http::Internal { class IResponseBody; }
16struct HC_CALL;
17// clang-format on
18
19namespace Bedrock::Http {
20
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Bedrock::Http::LibHttpClientInstance>> mHttpLibrary;
26 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::Bedrock::Http::Request>> mRequestCache;
27 ::ll::TypedStorage<8, 80, ::std::mutex> mRequestCacheMutex;
28 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
29 // NOLINTEND
30
31public:
32 // virtual functions
33 // NOLINTBEGIN
34 virtual ~LibHttpClientImpl() /*override*/ = default;
35
36 virtual void initialize() /*override*/;
37
38 virtual void shutdown() /*override*/;
39
40 virtual ::Bedrock::Threading::Async<::Bedrock::Http::Response>
41 send(::Bedrock::Http::Request&& request) /*override*/;
42 // NOLINTEND
43
44public:
45 // member functions
46 // NOLINTBEGIN
48
49 MCNAPI ::gsl::not_null<::std::shared_ptr<::Bedrock::Http::Internal::IResponseBody>>
50 _getResponseBody(::gsl::not_null<::HC_CALL*> call);
51
52 MCNAPI void _logRequestUrl(::gsl::not_null<::HC_CALL*> callHandle);
53 // NOLINTEND
54
55public:
56 // static functions
57 // NOLINTBEGIN
58 MCNAPI static HRESULT
59 _requestBodyRead(::HC_CALL* call, uint64, uint64 bytesAvailable, void*, uchar* destination, uint64* bytesWritten);
60
61 MCNAPI static HRESULT _responseBodyWrite(::HC_CALL* call, uchar const* source, uint64 bytesAvailable, void*);
62 // NOLINTEND
63
64public:
65 // static variables
66 // NOLINTBEGIN
67 MCNAPI static ::std::mutex& sWeakThisMutex();
68 // NOLINTEND
69
70public:
71 // constructor thunks
72 // NOLINTBEGIN
73 MCNAPI void* $ctor();
74 // NOLINTEND
75
76public:
77 // virtual function thunks
78 // NOLINTBEGIN
79 MCNAPI void $initialize();
80
81 MCNAPI void $shutdown();
82
83 MCAPI ::Bedrock::Threading::Async<::Bedrock::Http::Response> $send(::Bedrock::Http::Request&& request);
84
85
86 // NOLINTEND
87};
88
89} // namespace Bedrock::Http
Definition DispatcherProcess.h:11
Definition IResponseBody.h:10
MCAPI ::gsl::not_null<::std::shared_ptr<::Bedrock::Http::Internal::IResponseBody > > _getResponseBody(::gsl::not_null<::HC_CALL * > call)
MCAPI void _logRequestUrl(::gsl::not_null<::HC_CALL * > callHandle)
static MCAPI ::std::mutex & sWeakThisMutex()
static MCAPI HRESULT _responseBodyWrite(::HC_CALL *call, uchar const *source, uint64 bytesAvailable, void *)
static MCAPI HRESULT _requestBodyRead(::HC_CALL *call, uint64, uint64 bytesAvailable, void *, uchar *destination, uint64 *bytesWritten)
Definition LibHttpClientInstance.h:10
Definition Request.h:22
Definition Response.h:17
Definition HC_CALL.h:14