LeviLamina
Loading...
Searching...
No Matches
JsonRpcProvider.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/Result.h"
7
8// auto generated forward declare list
9// clang-format off
12namespace Json { class Value; }
13namespace JsonRpc { class IResultHandler; }
14namespace JsonRpc { class JsonRpcError; }
15namespace cereal { struct ReflectionCtx; }
16// clang-format on
17
18namespace JsonRpc {
19
20class JsonRpcProvider : public ::std::enable_shared_from_this<::JsonRpc::JsonRpcProvider> {
21public:
22 // JsonRpcProvider inner types declare
23 // clang-format off
25 // clang-format on
26
27 // JsonRpcProvider inner types define
28 struct JsonRpcPendingResult {
29 public:
30 // member variables
31 // NOLINTBEGIN
34 // NOLINTEND
35
36 public:
37 // prevent constructor by default
38 JsonRpcPendingResult& operator=(JsonRpcPendingResult const&);
39 JsonRpcPendingResult(JsonRpcPendingResult const&);
40 JsonRpcPendingResult();
41
42 public:
43 // member functions
44 // NOLINTBEGIN
46 // NOLINTEND
47
48 public:
49 // destructor thunk
50 // NOLINTBEGIN
51 MCNAPI void $dtor();
52 // NOLINTEND
53 };
54
55public:
56 // member variables
57 // NOLINTBEGIN
68 // NOLINTEND
69
70public:
71 // prevent constructor by default
72 JsonRpcProvider& operator=(JsonRpcProvider const&);
73 JsonRpcProvider(JsonRpcProvider const&);
74 JsonRpcProvider();
75
76public:
77 // member functions
78 // NOLINTBEGIN
80 ::std::shared_ptr<::ISignalingJsonRpcInterop> signalingServiceInterop,
81 ::std::vector<::std::shared_ptr<::IJsonRpcComponent>> components
82 );
83
84 MCNAPI void _dispatchJsonRpc(::std::string const& method, ::Json::Value const& params, ::std::string const& id);
85
86 MCNAPI void _expirePendingResult(::std::string const& id);
87
88 MCNAPI ::cereal::ReflectionCtx& getReflectionContext();
89
90 MCNAPI void
92
93#ifdef LL_PLAT_S
94 MCNAPI void initialize();
95#endif
96
97 MCNAPI void onMessage(::std::string_view incomingMessage);
98
99 MCNAPI ::std::unique_ptr<::std::string, ::std::function<void(::std::string*)>>
100 registerJsonRpcMethod(::std::string method, ::std::unique_ptr<::JsonRpc::IResultHandler> handler);
101
103 // NOLINTEND
104
105public:
106 // constructor thunks
107 // NOLINTBEGIN
108 MCNAPI void* $ctor(
109 ::std::shared_ptr<::ISignalingJsonRpcInterop> signalingServiceInterop,
110 ::std::vector<::std::shared_ptr<::IJsonRpcComponent>> components
111 );
112 // NOLINTEND
113
114public:
115 // destructor thunk
116 // NOLINTBEGIN
117 MCNAPI void $dtor();
118 // NOLINTEND
119};
120
121} // namespace JsonRpc
Definition Result.h:9
Definition IJsonRpcComponent.h:10
Definition ISignalingJsonRpcInterop.h:20
Definition IResultHandler.h:17
Definition JsonRpcError.h:12
MCAPI void handleJsonRpcResult(::std::string const &id, ::Bedrock::Result<::Json::Value, ::JsonRpc::JsonRpcError > &&result)
MCAPI::cereal::ReflectionCtx & getReflectionContext()
MCAPI void _expirePendingResult(::std::string const &id)
MCAPI void _dispatchJsonRpc(::std::string const &method, ::Json::Value const &params, ::std::string const &id)
MCAPI void * $ctor(::std::shared_ptr<::ISignalingJsonRpcInterop > signalingServiceInterop, ::std::vector<::std::shared_ptr<::IJsonRpcComponent > > components)
MCAPI JsonRpcProvider(::std::shared_ptr<::ISignalingJsonRpcInterop > signalingServiceInterop, ::std::vector<::std::shared_ptr<::IJsonRpcComponent > > components)
MCAPI void onMessage(::std::string_view incomingMessage)
MCAPI ::std::unique_ptr<::std::string, ::std::function< void(::std::string *)> > registerJsonRpcMethod(::std::string method, ::std::unique_ptr<::JsonRpc::IResultHandler > handler)
Definition Value.h:16
Definition JsonRpcProvider.h:28
Definition ReflectionCtx.h:11
Definition Alias.h:14