@@ -37,11 +37,12 @@ struct ReactNativeStaticServerSpec : winrt::Microsoft::ReactNative::TurboModuleS
37
37
};
38
38
static constexpr auto methods = std::tuple{
39
39
Method<void (std::string) noexcept >{0 , L" addListener" },
40
- Method<void (double ) noexcept >{1 , L" removeListeners" },
41
- Method<void (double , std::string, std::string, Promise<std::string>) noexcept >{2 , L" start" },
42
- Method<void (Promise<std::string>) noexcept >{3 , L" getLocalIpAddress" },
43
- Method<void (std::string, Promise<double >) noexcept >{4 , L" getOpenPort" },
44
- Method<void (Promise<std::string>) noexcept >{5 , L" stop" },
40
+ Method<void (Promise<std::optional<double >>) noexcept >{1 , L" getActiveServerId" },
41
+ Method<void (double ) noexcept >{2 , L" removeListeners" },
42
+ Method<void (double , std::string, std::string, Promise<std::string>) noexcept >{3 , L" start" },
43
+ Method<void (Promise<std::string>) noexcept >{4 , L" getLocalIpAddress" },
44
+ Method<void (std::string, Promise<double >) noexcept >{5 , L" getOpenPort" },
45
+ Method<void (Promise<std::string>) noexcept >{6 , L" stop" },
45
46
};
46
47
47
48
template <class TModule >
@@ -62,26 +63,31 @@ struct ReactNativeStaticServerSpec : winrt::Microsoft::ReactNative::TurboModuleS
62
63
" REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n " );
63
64
REACT_SHOW_METHOD_SPEC_ERRORS (
64
65
1 ,
66
+ " getActiveServerId" ,
67
+ " REACT_METHOD(getActiveServerId) void getActiveServerId(::React::ReactPromise<std::optional<double>> &&result) noexcept { /* implementation */ }\n "
68
+ " REACT_METHOD(getActiveServerId) static void getActiveServerId(::React::ReactPromise<std::optional<double>> &&result) noexcept { /* implementation */ }\n " );
69
+ REACT_SHOW_METHOD_SPEC_ERRORS (
70
+ 2 ,
65
71
" removeListeners" ,
66
72
" REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n "
67
73
" REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n " );
68
74
REACT_SHOW_METHOD_SPEC_ERRORS (
69
- 2 ,
75
+ 3 ,
70
76
" start" ,
71
77
" REACT_METHOD(start) void start(double id, std::string configPath, std::string errlogPath, ::React::ReactPromise<std::string> &&result) noexcept { /* implementation */ }\n "
72
78
" REACT_METHOD(start) static void start(double id, std::string configPath, std::string errlogPath, ::React::ReactPromise<std::string> &&result) noexcept { /* implementation */ }\n " );
73
79
REACT_SHOW_METHOD_SPEC_ERRORS (
74
- 3 ,
80
+ 4 ,
75
81
" getLocalIpAddress" ,
76
82
" REACT_METHOD(getLocalIpAddress) void getLocalIpAddress(::React::ReactPromise<std::string> &&result) noexcept { /* implementation */ }\n "
77
83
" REACT_METHOD(getLocalIpAddress) static void getLocalIpAddress(::React::ReactPromise<std::string> &&result) noexcept { /* implementation */ }\n " );
78
84
REACT_SHOW_METHOD_SPEC_ERRORS (
79
- 4 ,
85
+ 5 ,
80
86
" getOpenPort" ,
81
87
" REACT_METHOD(getOpenPort) void getOpenPort(std::string address, ::React::ReactPromise<double> &&result) noexcept { /* implementation */ }\n "
82
88
" REACT_METHOD(getOpenPort) static void getOpenPort(std::string address, ::React::ReactPromise<double> &&result) noexcept { /* implementation */ }\n " );
83
89
REACT_SHOW_METHOD_SPEC_ERRORS (
84
- 5 ,
90
+ 6 ,
85
91
" stop" ,
86
92
" REACT_METHOD(stop) void stop(::React::ReactPromise<std::string> &&result) noexcept { /* implementation */ }\n "
87
93
" REACT_METHOD(stop) static void stop(::React::ReactPromise<std::string> &&result) noexcept { /* implementation */ }\n " );
0 commit comments