LeviLamina
Loading...
Searching...
No Matches
RpcResultStreamService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/editor/RpcResultStreamCloseReason.h"
7#include "mc/common/editor/RpcResultStreamServiceProvider.h"
8#include "mc/common/editor/Task.h"
9#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
10#include "mc/editor/services/IEditorService.h"
11
12// auto generated forward declare list
13// clang-format off
14namespace Editor { struct CoroutineStatus; }
15namespace Editor::Rpc { class RpcResultStreamCancellationToken; }
16namespace Editor::Rpc { struct RpcRejection; }
17namespace Editor::Rpc { struct RpcResultStreamBatch; }
18namespace Editor::Rpc { struct RpcResultStreamDescriptor; }
19namespace Editor::Rpc { struct RpcResultStreamPayload; }
20namespace Editor::Rpc { struct RpcResultStreamRequest; }
21// clang-format on
22
23namespace Editor::Rpc {
24
25class RpcResultStreamService : public ::Editor::Services::IEditorService,
27public:
28 // RpcResultStreamService inner types declare
29 // clang-format off
30 struct StreamState;
31 struct ActiveReadGuard;
32 // clang-format on
33
34 // RpcResultStreamService inner types define
35 struct StreamState {
36 public:
37 // member variables
38 // NOLINTBEGIN
47 // NOLINTEND
48
49 public:
50 // prevent constructor by default
51 StreamState& operator=(StreamState const&);
52 StreamState(StreamState const&);
53 StreamState();
54 };
55
56 struct ActiveReadGuard {
57 public:
58 // member variables
59 // NOLINTBEGIN
61 // NOLINTEND
62
63 public:
64 // prevent constructor by default
65 ActiveReadGuard& operator=(ActiveReadGuard const&);
66 ActiveReadGuard(ActiveReadGuard const&);
67 ActiveReadGuard();
68 };
69
70public:
71 // member variables
72 // NOLINTBEGIN
76 // NOLINTEND
77
78public:
79 // prevent constructor by default
80 RpcResultStreamService& operator=(RpcResultStreamService const&);
81 RpcResultStreamService(RpcResultStreamService const&);
82 RpcResultStreamService();
83
84public:
85 // virtual functions
86 // NOLINTBEGIN
87 virtual ~RpcResultStreamService() /*override*/ = default;
88
89 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
90
91 virtual ::Scripting::Result_deprecated<void> ready() /*override*/;
92
93 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
94
95 virtual ::std::string_view getServiceName() const /*override*/;
96
97 virtual ::nonstd::expected<::Editor::Rpc::RpcResultStreamDescriptor, ::Editor::Rpc::RpcRejection> openResultStream(
98 ::std::function<::Editor::Task<
99 ::nonstd::expected<::Editor::Rpc::RpcResultStreamPayload, ::Editor::Rpc::RpcRejection>,
100 ::Editor::CoroutineStatus>(uint, ::Editor::Rpc::RpcResultStreamCancellationToken)> producer,
101 ::std::function<void(::Editor::Rpc::RpcResultStreamCloseReason)> onClose
102 ) /*override*/;
103
104 virtual bool cancelResultStream(uint64 streamId) /*override*/;
105 // NOLINTEND
106
107public:
108 // member functions
109 // NOLINTBEGIN
110 MCNAPI bool _closeStream(uint64 streamId, ::Editor::Rpc::RpcResultStreamCloseReason reason);
111 // NOLINTEND
112
113public:
114 // static functions
115 // NOLINTBEGIN
116 MCNAPI static void _notifyStreamClosed(::Editor::Rpc::RpcResultStreamService::StreamState& stream);
117 // NOLINTEND
118
119public:
120 // static variables
121 // NOLINTBEGIN
122 MCNAPI static ::std::string_view const& SERVICE_NAME();
123 // NOLINTEND
124
125public:
126 // virtual function thunks
127 // NOLINTBEGIN
128 MCNAPI ::Scripting::Result_deprecated<void> $init();
129
130 MCNAPI ::Scripting::Result_deprecated<void> $ready();
131
132 MCNAPI ::Scripting::Result_deprecated<void> $quit();
133
134 MCNAPI ::std::string_view $getServiceName() const;
135
136 MCNAPI ::nonstd::expected<::Editor::Rpc::RpcResultStreamDescriptor, ::Editor::Rpc::RpcRejection> $openResultStream(
137 ::std::function<::Editor::Task<
138 ::nonstd::expected<::Editor::Rpc::RpcResultStreamPayload, ::Editor::Rpc::RpcRejection>,
139 ::Editor::CoroutineStatus>(uint, ::Editor::Rpc::RpcResultStreamCancellationToken)> producer,
140 ::std::function<void(::Editor::Rpc::RpcResultStreamCloseReason)> onClose
141 );
142
143 MCNAPI bool $cancelResultStream(uint64 streamId);
144
145
146 // NOLINTEND
147
148public:
149 // vftables
150 // NOLINTBEGIN
151 MCNAPI static void** $vftableForIEditorService();
152
154 // NOLINTEND
155};
156
157} // namespace Editor::Rpc
Definition RpcResultStreamCancellationToken.h:7
Definition RpcResultStreamServiceProvider.h:20
MCAPI bool $cancelResultStream(uint64 streamId)
static MCAPI void ** $vftableForIEditorService()
static MCAPI void ** $vftableForRpcResultStreamServiceProvider()
MCAPI::std::string_view $getServiceName() const
static MCAPI void _notifyStreamClosed(::Editor::Rpc::RpcResultStreamService::StreamState &stream)
static MCAPI ::std::string_view const & SERVICE_NAME()
MCAPI bool _closeStream(uint64 streamId, ::Editor::Rpc::RpcResultStreamCloseReason reason)
MCAPI ::nonstd::expected<::Editor::Rpc::RpcResultStreamDescriptor, ::Editor::Rpc::RpcRejection > $openResultStream(::std::function<::Editor::Task< ::nonstd::expected<::Editor::Rpc::RpcResultStreamPayload, ::Editor::Rpc::RpcRejection >, ::Editor::CoroutineStatus >(uint, ::Editor::Rpc::RpcResultStreamCancellationToken)> producer, ::std::function< void(::Editor::Rpc::RpcResultStreamCloseReason)> onClose)
MCAPI ::Scripting::Result_deprecated< void > $init()
MCAPI ::Scripting::Result_deprecated< void > $ready()
MCAPI ::Scripting::Result_deprecated< void > $quit()
Definition IEditorService.h:11
Definition Task.h:8
STL namespace.
Definition CoroutineStatus.h:7
Definition RpcRejection.h:7
Definition RpcResultStreamBatch.h:7
Definition RpcResultStreamDescriptor.h:7
Definition RpcResultStreamPayload.h:7
Definition RpcResultStreamRequest.h:7
Definition RpcResultStreamService.h:56
Definition RpcResultStreamService.h:35
Definition Alias.h:14