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/IAsyncResult.h"
8
9// auto generated forward declare list
10// clang-format off
11struct HC_CALL;
12namespace Bedrock::Http { class Request; }
13namespace Bedrock::Http { class Response; }
14namespace Bedrock::Http::Internal { class IRequestBody; }
15namespace Bedrock::Http::Internal { class IResponseBody; }
16namespace Bedrock::Threading { class Mutex; }
17// clang-format on
18
19namespace Bedrock::Http {
20
22public:
23 // member variables
24 // NOLINTBEGIN
29 // NOLINTEND
30
31public:
32 // prevent constructor by default
33 LibHttpClientImpl& operator=(LibHttpClientImpl const&);
35
36public:
37 // virtual functions
38 // NOLINTBEGIN
39 // vIndex: 0
40 virtual ~LibHttpClientImpl() /*override*/ = default;
41
42 // vIndex: 2
43 virtual void initialize() /*override*/;
44
45 // vIndex: 3
46 virtual void shutdown() /*override*/;
47
48 // vIndex: 1
49 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response>>
50 send(::Bedrock::Http::Request&& request) /*override*/;
51 // NOLINTEND
52
53public:
54 // member functions
55 // NOLINTBEGIN
57
58 MCNAPI ::std::optional<::std::chrono::seconds>
59 _checkRetryPolicy(::gsl::not_null<::HC_CALL*> call, ::Bedrock::Http::Response const& httpResponse);
60
61 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response>>
62 _convertResponse(::gsl::not_null<::HC_CALL*> callHandle);
63
64 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response>>
65 _retry(::gsl::not_null<::HC_CALL*> callHandle, ::std::chrono::seconds delay);
66
67 MCNAPI ::std::shared_ptr<::Bedrock::Http::Internal::IRequestBody>
68 _tryGetRequestBody(::gsl::not_null<::HC_CALL*> call);
69
70 MCNAPI ::std::shared_ptr<::Bedrock::Http::Internal::IResponseBody>
71 _tryGetResponseBody(::gsl::not_null<::HC_CALL*> call);
72
73 MCNAPI void _untrack(::gsl::not_null<::HC_CALL*> callHandle);
74 // NOLINTEND
75
76public:
77 // static functions
78 // NOLINTBEGIN
79 MCNAPI static long
80 _convertRequestBody(::gsl::not_null<::HC_CALL*> callHandle, ::Bedrock::Http::Request const& request);
81
82 MCNAPI static long
83 _convertResponseBody(::gsl::not_null<::HC_CALL*> callHandle, ::Bedrock::Http::Response& response);
84
85 MCNAPI static long
86 _convertResponseHeaders(::gsl::not_null<::HC_CALL*> callHandle, ::Bedrock::Http::Response& response);
87
88 MCNAPI static long _createCallHandle(::HC_CALL** outHandle, ::Bedrock::Http::Request const& request);
89
90 MCNAPI static long _requestBodyRead(
91 ::HC_CALL* call,
92 uint64 offset,
93 uint64 bytesAvailable,
94 void* context,
95 uchar* destination,
96 uint64* bytesWritten
97 );
98
99 MCNAPI static long _responseBodyWrite(::HC_CALL* call, uchar const* source, uint64 bytesAvailable, void* context);
100 // NOLINTEND
101
102public:
103 // static variables
104 // NOLINTBEGIN
105 MCNAPI static ::std::weak_ptr<::Bedrock::Http::LibHttpClientImpl>& sWeakThis();
106
107 MCNAPI static ::Bedrock::Threading::Mutex& sWeakThisMutex();
108 // NOLINTEND
109
110public:
111 // constructor thunks
112 // NOLINTBEGIN
113 MCNAPI void* $ctor();
114 // NOLINTEND
115
116public:
117 // virtual function thunks
118 // NOLINTBEGIN
119 MCNAPI void $initialize();
120
121 MCNAPI void $shutdown();
122
123 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response>>
125 // NOLINTEND
126
127public:
128 // vftables
129 // NOLINTBEGIN
130 MCNAPI static void** $vftable();
131 // NOLINTEND
132};
133
134} // namespace Bedrock::Http
Definition DispatcherProcess.h:11
Definition LibHttpClientImpl.h:21
static MCAPI long _responseBodyWrite(::HC_CALL *call, uchar const *source, uint64 bytesAvailable, void *context)
static MCAPI ::std::weak_ptr<::Bedrock::Http::LibHttpClientImpl > & sWeakThis()
MCAPI ::std::optional<::std::chrono::seconds > _checkRetryPolicy(::gsl::not_null<::HC_CALL * > call, ::Bedrock::Http::Response const &httpResponse)
static MCAPI long _convertResponseBody(::gsl::not_null<::HC_CALL * > callHandle, ::Bedrock::Http::Response &response)
static MCAPI long _createCallHandle(::HC_CALL **outHandle, ::Bedrock::Http::Request const &request)
MCAPI void _untrack(::gsl::not_null<::HC_CALL * > callHandle)
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response > > $send(::Bedrock::Http::Request &&request)
MCAPI ::std::shared_ptr<::Bedrock::Http::Internal::IResponseBody > _tryGetResponseBody(::gsl::not_null<::HC_CALL * > call)
static MCAPI long _requestBodyRead(::HC_CALL *call, uint64 offset, uint64 bytesAvailable, void *context, uchar *destination, uint64 *bytesWritten)
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response > > _retry(::gsl::not_null<::HC_CALL * > callHandle, ::std::chrono::seconds delay)
static MCAPI long _convertRequestBody(::gsl::not_null<::HC_CALL * > callHandle, ::Bedrock::Http::Request const &request)
static MCAPI ::Bedrock::Threading::Mutex & sWeakThisMutex()
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response > > _convertResponse(::gsl::not_null<::HC_CALL * > callHandle)
MCAPI ::std::shared_ptr<::Bedrock::Http::Internal::IRequestBody > _tryGetRequestBody(::gsl::not_null<::HC_CALL * > call)
static MCAPI long _convertResponseHeaders(::gsl::not_null<::HC_CALL * > callHandle, ::Bedrock::Http::Response &response)
static MCAPI void ** $vftable()
Definition Request.h:15
Definition Response.h:13
Definition HC_CALL.h:16
Definition context.h:5
Definition Alias.h:14