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
56 MCAPI LibHttpClientImpl();
57
58 MCAPI ::std::optional<::std::chrono::seconds>
59 _checkRetryPolicy(::gsl::not_null<::HC_CALL*> call, ::Bedrock::Http::Response const& httpResponse);
60
61 MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response>>
62 _convertResponse(::gsl::not_null<::HC_CALL*> callHandle);
63
64 MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response>>
65 _retry(::gsl::not_null<::HC_CALL*> callHandle, ::std::chrono::seconds delay);
66
67 MCAPI ::std::shared_ptr<::Bedrock::Http::Internal::IRequestBody> _tryGetRequestBody(::gsl::not_null<::HC_CALL*> call
68 );
69
70 MCAPI ::std::shared_ptr<::Bedrock::Http::Internal::IResponseBody>
71 _tryGetResponseBody(::gsl::not_null<::HC_CALL*> call);
72
73 MCAPI void _untrack(::gsl::not_null<::HC_CALL*> callHandle);
74 // NOLINTEND
75
76public:
77 // static functions
78 // NOLINTBEGIN
79 MCAPI static long
80 _convertRequestBody(::gsl::not_null<::HC_CALL*> callHandle, ::Bedrock::Http::Request const& request);
81
82 MCAPI static long _convertResponseBody(::gsl::not_null<::HC_CALL*> callHandle, ::Bedrock::Http::Response& response);
83
84 MCAPI static long
85 _convertResponseHeaders(::gsl::not_null<::HC_CALL*> callHandle, ::Bedrock::Http::Response& response);
86
87 MCAPI static long _createCallHandle(::HC_CALL** outHandle, ::Bedrock::Http::Request const& request);
88
89 MCAPI static long _requestBodyRead(
90 ::HC_CALL* call,
91 uint64 offset,
92 uint64 bytesAvailable,
93 void* context,
94 uchar* destination,
95 uint64* bytesWritten
96 );
97
98 MCAPI static long _responseBodyWrite(::HC_CALL* call, uchar const* source, uint64 bytesAvailable, void* context);
99 // NOLINTEND
100
101public:
102 // static variables
103 // NOLINTBEGIN
104 MCAPI static ::std::weak_ptr<::Bedrock::Http::LibHttpClientImpl>& sWeakThis();
105
106 MCAPI static ::Bedrock::Threading::Mutex& sWeakThisMutex();
107 // NOLINTEND
108
109public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCAPI void* $ctor();
113 // NOLINTEND
114
115public:
116 // destructor thunk
117 // NOLINTBEGIN
118
119 // NOLINTEND
120
121public:
122 // virtual function thunks
123 // NOLINTBEGIN
124 MCAPI void $initialize();
125
126 MCAPI void $shutdown();
127
128 MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<::Bedrock::Http::Response>>
129 $send(::Bedrock::Http::Request&& request);
130 // NOLINTEND
131
132public:
133 // vftables
134 // NOLINTBEGIN
135 MCAPI static void** $vftable();
136 // NOLINTEND
137};
138
139} // namespace Bedrock::Http
Definition DispatcherProcess.h:11
Definition LibHttpClientImpl.h:21
Definition Request.h:15
Definition Response.h:12
Definition HC_CALL.h:16
Definition context.h:5
Definition Alias.h:14