Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
RpcService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
8namespace Editor { class ServiceProviderCollection; }
9namespace Editor::Rpc { struct RpcRejection; }
10namespace Scripting { struct ModuleBinding; }
11namespace cereal { class BasicLoader; }
12namespace cereal { class BasicSaver; }
13namespace cereal { struct SchemaReader; }
14namespace cereal { struct SchemaWriter; }
15// clang-format on
16
17namespace Editor::Rpc {
18
19class RpcService {
20public:
21 // RpcService inner types declare
22 // clang-format off
23 struct DispatchTarget;
24 // clang-format on
25
26 // RpcService inner types define
27 struct DispatchTarget {
28 public:
29 // member variables
30 // NOLINTBEGIN
33 // NOLINTEND
34
35 public:
36 // prevent constructor by default
37 DispatchTarget& operator=(DispatchTarget const&);
38 DispatchTarget(DispatchTarget const&);
39 DispatchTarget();
40 };
41
42public:
43 // member variables
44 // NOLINTBEGIN
59 // NOLINTEND
60
61public:
62 // prevent constructor by default
63 RpcService& operator=(RpcService const&);
64 RpcService(RpcService const&);
65 RpcService();
66
67public:
68 // member functions
69 // NOLINTBEGIN
70 MCNAPI explicit RpcService(::Editor::ServiceProviderCollection& serviceProviders);
71
72 MCNAPI void callWithCallback(
73 ::std::string const& className,
74 ::std::string const& methodName,
75 ::std::string const& serializedArgs,
76 ::std::function<void(::Editor::Rpc::RpcRejection, ::std::string)> callback
77 );
78
79 MCNAPI void registerModule(::Scripting::ModuleBinding&& moduleBinding, ::std::string subsystem);
80
81 MCNAPI void shutdown();
82
83 MCNAPI ~RpcService();
84 // NOLINTEND
85
86public:
87 // constructor thunks
88 // NOLINTBEGIN
89 MCNAPI void* $ctor(::Editor::ServiceProviderCollection& serviceProviders);
90 // NOLINTEND
91
92public:
93 // destructor thunk
94 // NOLINTBEGIN
95 MCNAPI void $dtor();
96 // NOLINTEND
97};
98
99} // namespace Editor::Rpc
Definition BedrockLoadContext.h:15
MCAPI RpcService(::Editor::ServiceProviderCollection &serviceProviders)
MCAPI void registerModule(::Scripting::ModuleBinding &&moduleBinding, ::std::string subsystem)
MCAPI void callWithCallback(::std::string const &className, ::std::string const &methodName, ::std::string const &serializedArgs, ::std::function< void(::Editor::Rpc::RpcRejection, ::std::string)> callback)
MCAPI void * $ctor(::Editor::ServiceProviderCollection &serviceProviders)
Definition ServiceProviderCollection.h:7
Definition BasicLoader.h:18
Definition BasicSaver.h:18
Definition RpcRejection.h:7
Definition RpcService.h:27
Definition ModuleBinding.h:23
Definition SchemaReader.h:13
Definition SchemaWriter.h:16
Definition Alias.h:14