-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathNativeNetworkingAndroidSpec.g.h
59 lines (51 loc) · 3.11 KB
/
NativeNetworkingAndroidSpec.g.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* This file is auto-generated from a NativeModule spec file in js.
*
* This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules
* in a way that also verifies at compile time that the native module matches the interface required
* by the TurboModule JS spec.
*/
#pragma once
// clang-format off
#include <NativeModules.h>
#include <tuple>
namespace Microsoft::ReactNativeSpecs {
struct NetworkingAndroidSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
static constexpr auto methods = std::tuple{
Method<void(std::string, std::string, double, ::React::JSValueArray, ::React::JSValue, std::string, bool, double, bool) noexcept>{0, L"sendRequest"},
Method<void(double) noexcept>{1, L"abortRequest"},
Method<void(Callback<bool>) noexcept>{2, L"clearCookies"},
Method<void(std::string) noexcept>{3, L"addListener"},
Method<void(double) noexcept>{4, L"removeListeners"},
};
template <class TModule>
static constexpr void ValidateModule() noexcept {
constexpr auto methodCheckResults = CheckMethods<TModule, NetworkingAndroidSpec>();
REACT_SHOW_METHOD_SPEC_ERRORS(
0,
"sendRequest",
" REACT_METHOD(sendRequest) void sendRequest(std::string method, std::string url, double requestId, ::React::JSValueArray && headers, ::React::JSValue && data, std::string responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) noexcept { /* implementation */ }\n"
" REACT_METHOD(sendRequest) static void sendRequest(std::string method, std::string url, double requestId, ::React::JSValueArray && headers, ::React::JSValue && data, std::string responseType, bool useIncrementalUpdates, double timeout, bool withCredentials) noexcept { /* implementation */ }\n");
REACT_SHOW_METHOD_SPEC_ERRORS(
1,
"abortRequest",
" REACT_METHOD(abortRequest) void abortRequest(double requestId) noexcept { /* implementation */ }\n"
" REACT_METHOD(abortRequest) static void abortRequest(double requestId) noexcept { /* implementation */ }\n");
REACT_SHOW_METHOD_SPEC_ERRORS(
2,
"clearCookies",
" REACT_METHOD(clearCookies) void clearCookies(std::function<void(bool)> const & callback) noexcept { /* implementation */ }\n"
" REACT_METHOD(clearCookies) static void clearCookies(std::function<void(bool)> const & callback) noexcept { /* implementation */ }\n");
REACT_SHOW_METHOD_SPEC_ERRORS(
3,
"addListener",
" REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n"
" REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n");
REACT_SHOW_METHOD_SPEC_ERRORS(
4,
"removeListeners",
" REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n"
" REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n");
}
};
} // namespace Microsoft::ReactNativeSpecs