Mercurial > hg > sv-dependency-builds
comparison win64-msvc/include/capnp/persistent.capnp.h @ 47:d93140aac40b
Current Capnp libs and headers from git
author | Chris Cannam |
---|---|
date | Thu, 20 Oct 2016 18:15:38 +0100 |
parents | |
children | 0f2d93caa50c |
comparison
equal
deleted
inserted
replaced
46:efe5b9f38b13 | 47:d93140aac40b |
---|---|
1 // Generated by Cap'n Proto compiler, DO NOT EDIT | |
2 // source: persistent.capnp | |
3 | |
4 #ifndef CAPNP_INCLUDED_b8630836983feed7_ | |
5 #define CAPNP_INCLUDED_b8630836983feed7_ | |
6 | |
7 #include <capnp/generated-header-support.h> | |
8 #if !CAPNP_LITE | |
9 #include <capnp/capability.h> | |
10 #endif // !CAPNP_LITE | |
11 | |
12 #if CAPNP_VERSION != 6000 | |
13 #error "Version mismatch between generated code and library headers. You must use the same version of the Cap'n Proto compiler and library." | |
14 #endif | |
15 | |
16 | |
17 namespace capnp { | |
18 namespace schemas { | |
19 | |
20 CAPNP_DECLARE_SCHEMA(c8cb212fcd9f5691); | |
21 CAPNP_DECLARE_SCHEMA(f76fba59183073a5); | |
22 CAPNP_DECLARE_SCHEMA(b76848c18c40efbf); | |
23 CAPNP_DECLARE_SCHEMA(84ff286cd00a3ed4); | |
24 CAPNP_DECLARE_SCHEMA(f0c2cc1d3909574d); | |
25 CAPNP_DECLARE_SCHEMA(ecafa18b482da3aa); | |
26 CAPNP_DECLARE_SCHEMA(f622595091cafb67); | |
27 | |
28 } // namespace schemas | |
29 } // namespace capnp | |
30 | |
31 namespace capnp { | |
32 | |
33 template <typename SturdyRef = ::capnp::AnyPointer, typename Owner = ::capnp::AnyPointer> | |
34 struct Persistent { | |
35 Persistent() = delete; | |
36 | |
37 #if !CAPNP_LITE | |
38 class Client; | |
39 class Server; | |
40 #endif // !CAPNP_LITE | |
41 | |
42 struct SaveParams; | |
43 struct SaveResults; | |
44 | |
45 #if !CAPNP_LITE | |
46 struct _capnpPrivate { | |
47 CAPNP_DECLARE_INTERFACE_HEADER(c8cb212fcd9f5691) | |
48 static const ::capnp::_::RawBrandedSchema::Scope brandScopes[]; | |
49 static const ::capnp::_::RawBrandedSchema::Binding brandBindings[]; | |
50 static const ::capnp::_::RawBrandedSchema::Dependency brandDependencies[]; | |
51 static const ::capnp::_::RawBrandedSchema specificBrand; | |
52 static constexpr ::capnp::_::RawBrandedSchema const* brand = ::capnp::_::ChooseBrand<_capnpPrivate, SturdyRef, Owner>::brand; | |
53 }; | |
54 #endif // !CAPNP_LITE | |
55 }; | |
56 | |
57 template <typename SturdyRef, typename Owner> | |
58 struct Persistent<SturdyRef, Owner>::SaveParams { | |
59 SaveParams() = delete; | |
60 | |
61 class Reader; | |
62 class Builder; | |
63 class Pipeline; | |
64 | |
65 struct _capnpPrivate { | |
66 CAPNP_DECLARE_STRUCT_HEADER(f76fba59183073a5, 0, 1) | |
67 #if !CAPNP_LITE | |
68 static const ::capnp::_::RawBrandedSchema::Scope brandScopes[]; | |
69 static const ::capnp::_::RawBrandedSchema::Binding brandBindings[]; | |
70 static const ::capnp::_::RawBrandedSchema specificBrand; | |
71 static constexpr ::capnp::_::RawBrandedSchema const* brand = ::capnp::_::ChooseBrand<_capnpPrivate, SturdyRef, Owner>::brand; | |
72 #endif // !CAPNP_LITE | |
73 }; | |
74 }; | |
75 | |
76 template <typename SturdyRef, typename Owner> | |
77 struct Persistent<SturdyRef, Owner>::SaveResults { | |
78 SaveResults() = delete; | |
79 | |
80 class Reader; | |
81 class Builder; | |
82 class Pipeline; | |
83 | |
84 struct _capnpPrivate { | |
85 CAPNP_DECLARE_STRUCT_HEADER(b76848c18c40efbf, 0, 1) | |
86 #if !CAPNP_LITE | |
87 static const ::capnp::_::RawBrandedSchema::Scope brandScopes[]; | |
88 static const ::capnp::_::RawBrandedSchema::Binding brandBindings[]; | |
89 static const ::capnp::_::RawBrandedSchema specificBrand; | |
90 static constexpr ::capnp::_::RawBrandedSchema const* brand = ::capnp::_::ChooseBrand<_capnpPrivate, SturdyRef, Owner>::brand; | |
91 #endif // !CAPNP_LITE | |
92 }; | |
93 }; | |
94 | |
95 template <typename InternalRef = ::capnp::AnyPointer, typename ExternalRef = ::capnp::AnyPointer, typename InternalOwner = ::capnp::AnyPointer, typename ExternalOwner = ::capnp::AnyPointer> | |
96 struct RealmGateway { | |
97 RealmGateway() = delete; | |
98 | |
99 #if !CAPNP_LITE | |
100 class Client; | |
101 class Server; | |
102 #endif // !CAPNP_LITE | |
103 | |
104 struct ImportParams; | |
105 struct ExportParams; | |
106 | |
107 #if !CAPNP_LITE | |
108 struct _capnpPrivate { | |
109 CAPNP_DECLARE_INTERFACE_HEADER(84ff286cd00a3ed4) | |
110 static const ::capnp::_::RawBrandedSchema::Scope brandScopes[]; | |
111 static const ::capnp::_::RawBrandedSchema::Binding brandBindings[]; | |
112 static const ::capnp::_::RawBrandedSchema::Dependency brandDependencies[]; | |
113 static const ::capnp::_::RawBrandedSchema specificBrand; | |
114 static constexpr ::capnp::_::RawBrandedSchema const* brand = ::capnp::_::ChooseBrand<_capnpPrivate, InternalRef, ExternalRef, InternalOwner, ExternalOwner>::brand; | |
115 }; | |
116 #endif // !CAPNP_LITE | |
117 }; | |
118 | |
119 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
120 struct RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams { | |
121 ImportParams() = delete; | |
122 | |
123 class Reader; | |
124 class Builder; | |
125 class Pipeline; | |
126 | |
127 struct _capnpPrivate { | |
128 CAPNP_DECLARE_STRUCT_HEADER(f0c2cc1d3909574d, 0, 2) | |
129 #if !CAPNP_LITE | |
130 static const ::capnp::_::RawBrandedSchema::Scope brandScopes[]; | |
131 static const ::capnp::_::RawBrandedSchema::Binding brandBindings[]; | |
132 static const ::capnp::_::RawBrandedSchema::Dependency brandDependencies[]; | |
133 static const ::capnp::_::RawBrandedSchema specificBrand; | |
134 static constexpr ::capnp::_::RawBrandedSchema const* brand = ::capnp::_::ChooseBrand<_capnpPrivate, InternalRef, ExternalRef, InternalOwner, ExternalOwner>::brand; | |
135 #endif // !CAPNP_LITE | |
136 }; | |
137 }; | |
138 | |
139 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
140 struct RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams { | |
141 ExportParams() = delete; | |
142 | |
143 class Reader; | |
144 class Builder; | |
145 class Pipeline; | |
146 | |
147 struct _capnpPrivate { | |
148 CAPNP_DECLARE_STRUCT_HEADER(ecafa18b482da3aa, 0, 2) | |
149 #if !CAPNP_LITE | |
150 static const ::capnp::_::RawBrandedSchema::Scope brandScopes[]; | |
151 static const ::capnp::_::RawBrandedSchema::Binding brandBindings[]; | |
152 static const ::capnp::_::RawBrandedSchema::Dependency brandDependencies[]; | |
153 static const ::capnp::_::RawBrandedSchema specificBrand; | |
154 static constexpr ::capnp::_::RawBrandedSchema const* brand = ::capnp::_::ChooseBrand<_capnpPrivate, InternalRef, ExternalRef, InternalOwner, ExternalOwner>::brand; | |
155 #endif // !CAPNP_LITE | |
156 }; | |
157 }; | |
158 | |
159 // ======================================================================================= | |
160 | |
161 #if !CAPNP_LITE | |
162 template <typename SturdyRef, typename Owner> | |
163 class Persistent<SturdyRef, Owner>::Client | |
164 : public virtual ::capnp::Capability::Client { | |
165 public: | |
166 typedef Persistent<SturdyRef, Owner> Calls; | |
167 typedef Persistent<SturdyRef, Owner> Reads; | |
168 | |
169 Client(decltype(nullptr)); | |
170 explicit Client(::kj::Own< ::capnp::ClientHook>&& hook); | |
171 template <typename _t, typename = ::kj::EnableIf< ::kj::canConvert<_t*, Server*>()>> | |
172 Client(::kj::Own<_t>&& server); | |
173 template <typename _t, typename = ::kj::EnableIf< ::kj::canConvert<_t*, Client*>()>> | |
174 Client(::kj::Promise<_t>&& promise); | |
175 Client(::kj::Exception&& exception); | |
176 Client(Client&) = default; | |
177 Client(Client&&) = default; | |
178 Client& operator=(Client& other); | |
179 Client& operator=(Client&& other); | |
180 | |
181 template <typename SturdyRef2 = ::capnp::AnyPointer, typename Owner2 = ::capnp::AnyPointer> | |
182 typename Persistent<SturdyRef2, Owner2>::Client asGeneric() { | |
183 return castAs<Persistent<SturdyRef2, Owner2>>(); | |
184 } | |
185 | |
186 ::capnp::Request<typename ::capnp::Persistent<SturdyRef, Owner>::SaveParams, typename ::capnp::Persistent<SturdyRef, Owner>::SaveResults> saveRequest( | |
187 ::kj::Maybe< ::capnp::MessageSize> sizeHint = nullptr); | |
188 | |
189 protected: | |
190 Client() = default; | |
191 }; | |
192 | |
193 template <typename SturdyRef, typename Owner> | |
194 class Persistent<SturdyRef, Owner>::Server | |
195 : public virtual ::capnp::Capability::Server { | |
196 public: | |
197 typedef Persistent<SturdyRef, Owner> Serves; | |
198 | |
199 ::kj::Promise<void> dispatchCall(uint64_t interfaceId, uint16_t methodId, | |
200 ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) | |
201 override; | |
202 | |
203 protected: | |
204 typedef ::capnp::CallContext<typename ::capnp::Persistent<SturdyRef, Owner>::SaveParams, typename ::capnp::Persistent<SturdyRef, Owner>::SaveResults> SaveContext; | |
205 virtual ::kj::Promise<void> save(SaveContext context); | |
206 | |
207 inline typename ::capnp::Persistent<SturdyRef, Owner>::Client thisCap() { | |
208 return ::capnp::Capability::Server::thisCap() | |
209 .template castAs< ::capnp::Persistent<SturdyRef, Owner>>(); | |
210 } | |
211 | |
212 ::kj::Promise<void> dispatchCallInternal(uint16_t methodId, | |
213 ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context); | |
214 }; | |
215 #endif // !CAPNP_LITE | |
216 | |
217 template <typename SturdyRef, typename Owner> | |
218 class Persistent<SturdyRef, Owner>::SaveParams::Reader { | |
219 public: | |
220 typedef SaveParams Reads; | |
221 | |
222 Reader() = default; | |
223 inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} | |
224 | |
225 inline ::capnp::MessageSize totalSize() const { | |
226 return _reader.totalSize().asPublic(); | |
227 } | |
228 | |
229 #if !CAPNP_LITE | |
230 inline ::kj::StringTree toString() const { | |
231 return ::capnp::_::structString(_reader, *_capnpPrivate::brand); | |
232 } | |
233 #endif // !CAPNP_LITE | |
234 | |
235 template <typename SturdyRef2 = ::capnp::AnyPointer, typename Owner2 = ::capnp::AnyPointer> | |
236 typename Persistent<SturdyRef2, Owner2>::SaveParams::Reader asPersistentGeneric() { | |
237 return typename Persistent<SturdyRef2, Owner2>::SaveParams::Reader(_reader); | |
238 } | |
239 | |
240 inline bool hasSealFor() const; | |
241 inline ::capnp::ReaderFor<Owner> getSealFor() const; | |
242 | |
243 private: | |
244 ::capnp::_::StructReader _reader; | |
245 template <typename, ::capnp::Kind> | |
246 friend struct ::capnp::ToDynamic_; | |
247 template <typename, ::capnp::Kind> | |
248 friend struct ::capnp::_::PointerHelpers; | |
249 template <typename, ::capnp::Kind> | |
250 friend struct ::capnp::List; | |
251 friend class ::capnp::MessageBuilder; | |
252 friend class ::capnp::Orphanage; | |
253 }; | |
254 | |
255 template <typename SturdyRef, typename Owner> | |
256 class Persistent<SturdyRef, Owner>::SaveParams::Builder { | |
257 public: | |
258 typedef SaveParams Builds; | |
259 | |
260 Builder() = delete; // Deleted to discourage incorrect usage. | |
261 // You can explicitly initialize to nullptr instead. | |
262 inline Builder(decltype(nullptr)) {} | |
263 inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {} | |
264 inline operator Reader() const { return Reader(_builder.asReader()); } | |
265 inline Reader asReader() const { return *this; } | |
266 | |
267 inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); } | |
268 #if !CAPNP_LITE | |
269 inline ::kj::StringTree toString() const { return asReader().toString(); } | |
270 #endif // !CAPNP_LITE | |
271 | |
272 template <typename SturdyRef2 = ::capnp::AnyPointer, typename Owner2 = ::capnp::AnyPointer> | |
273 typename Persistent<SturdyRef2, Owner2>::SaveParams::Builder asPersistentGeneric() { | |
274 return typename Persistent<SturdyRef2, Owner2>::SaveParams::Builder(_builder); | |
275 } | |
276 | |
277 inline bool hasSealFor(); | |
278 inline ::capnp::BuilderFor<Owner> getSealFor(); | |
279 inline void setSealFor( ::capnp::ReaderFor<Owner> value); | |
280 inline ::capnp::BuilderFor<Owner> initSealFor(); | |
281 inline ::capnp::BuilderFor<Owner> initSealFor(unsigned int size); | |
282 inline void adoptSealFor(::capnp::Orphan<Owner>&& value); | |
283 inline ::capnp::Orphan<Owner> disownSealFor(); | |
284 | |
285 private: | |
286 ::capnp::_::StructBuilder _builder; | |
287 template <typename, ::capnp::Kind> | |
288 friend struct ::capnp::ToDynamic_; | |
289 friend class ::capnp::Orphanage; | |
290 template <typename, ::capnp::Kind> | |
291 friend struct ::capnp::_::PointerHelpers; | |
292 }; | |
293 | |
294 #if !CAPNP_LITE | |
295 template <typename SturdyRef, typename Owner> | |
296 class Persistent<SturdyRef, Owner>::SaveParams::Pipeline { | |
297 public: | |
298 typedef SaveParams Pipelines; | |
299 | |
300 inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} | |
301 inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) | |
302 : _typeless(kj::mv(typeless)) {} | |
303 | |
304 inline ::capnp::PipelineFor<Owner> getSealFor(); | |
305 private: | |
306 ::capnp::AnyPointer::Pipeline _typeless; | |
307 friend class ::capnp::PipelineHook; | |
308 template <typename, ::capnp::Kind> | |
309 friend struct ::capnp::ToDynamic_; | |
310 }; | |
311 #endif // !CAPNP_LITE | |
312 | |
313 template <typename SturdyRef, typename Owner> | |
314 class Persistent<SturdyRef, Owner>::SaveResults::Reader { | |
315 public: | |
316 typedef SaveResults Reads; | |
317 | |
318 Reader() = default; | |
319 inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} | |
320 | |
321 inline ::capnp::MessageSize totalSize() const { | |
322 return _reader.totalSize().asPublic(); | |
323 } | |
324 | |
325 #if !CAPNP_LITE | |
326 inline ::kj::StringTree toString() const { | |
327 return ::capnp::_::structString(_reader, *_capnpPrivate::brand); | |
328 } | |
329 #endif // !CAPNP_LITE | |
330 | |
331 template <typename SturdyRef2 = ::capnp::AnyPointer, typename Owner2 = ::capnp::AnyPointer> | |
332 typename Persistent<SturdyRef2, Owner2>::SaveResults::Reader asPersistentGeneric() { | |
333 return typename Persistent<SturdyRef2, Owner2>::SaveResults::Reader(_reader); | |
334 } | |
335 | |
336 inline bool hasSturdyRef() const; | |
337 inline ::capnp::ReaderFor<SturdyRef> getSturdyRef() const; | |
338 | |
339 private: | |
340 ::capnp::_::StructReader _reader; | |
341 template <typename, ::capnp::Kind> | |
342 friend struct ::capnp::ToDynamic_; | |
343 template <typename, ::capnp::Kind> | |
344 friend struct ::capnp::_::PointerHelpers; | |
345 template <typename, ::capnp::Kind> | |
346 friend struct ::capnp::List; | |
347 friend class ::capnp::MessageBuilder; | |
348 friend class ::capnp::Orphanage; | |
349 }; | |
350 | |
351 template <typename SturdyRef, typename Owner> | |
352 class Persistent<SturdyRef, Owner>::SaveResults::Builder { | |
353 public: | |
354 typedef SaveResults Builds; | |
355 | |
356 Builder() = delete; // Deleted to discourage incorrect usage. | |
357 // You can explicitly initialize to nullptr instead. | |
358 inline Builder(decltype(nullptr)) {} | |
359 inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {} | |
360 inline operator Reader() const { return Reader(_builder.asReader()); } | |
361 inline Reader asReader() const { return *this; } | |
362 | |
363 inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); } | |
364 #if !CAPNP_LITE | |
365 inline ::kj::StringTree toString() const { return asReader().toString(); } | |
366 #endif // !CAPNP_LITE | |
367 | |
368 template <typename SturdyRef2 = ::capnp::AnyPointer, typename Owner2 = ::capnp::AnyPointer> | |
369 typename Persistent<SturdyRef2, Owner2>::SaveResults::Builder asPersistentGeneric() { | |
370 return typename Persistent<SturdyRef2, Owner2>::SaveResults::Builder(_builder); | |
371 } | |
372 | |
373 inline bool hasSturdyRef(); | |
374 inline ::capnp::BuilderFor<SturdyRef> getSturdyRef(); | |
375 inline void setSturdyRef( ::capnp::ReaderFor<SturdyRef> value); | |
376 inline ::capnp::BuilderFor<SturdyRef> initSturdyRef(); | |
377 inline ::capnp::BuilderFor<SturdyRef> initSturdyRef(unsigned int size); | |
378 inline void adoptSturdyRef(::capnp::Orphan<SturdyRef>&& value); | |
379 inline ::capnp::Orphan<SturdyRef> disownSturdyRef(); | |
380 | |
381 private: | |
382 ::capnp::_::StructBuilder _builder; | |
383 template <typename, ::capnp::Kind> | |
384 friend struct ::capnp::ToDynamic_; | |
385 friend class ::capnp::Orphanage; | |
386 template <typename, ::capnp::Kind> | |
387 friend struct ::capnp::_::PointerHelpers; | |
388 }; | |
389 | |
390 #if !CAPNP_LITE | |
391 template <typename SturdyRef, typename Owner> | |
392 class Persistent<SturdyRef, Owner>::SaveResults::Pipeline { | |
393 public: | |
394 typedef SaveResults Pipelines; | |
395 | |
396 inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} | |
397 inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) | |
398 : _typeless(kj::mv(typeless)) {} | |
399 | |
400 inline ::capnp::PipelineFor<SturdyRef> getSturdyRef(); | |
401 private: | |
402 ::capnp::AnyPointer::Pipeline _typeless; | |
403 friend class ::capnp::PipelineHook; | |
404 template <typename, ::capnp::Kind> | |
405 friend struct ::capnp::ToDynamic_; | |
406 }; | |
407 #endif // !CAPNP_LITE | |
408 | |
409 #if !CAPNP_LITE | |
410 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
411 class RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client | |
412 : public virtual ::capnp::Capability::Client { | |
413 public: | |
414 typedef RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner> Calls; | |
415 typedef RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner> Reads; | |
416 | |
417 Client(decltype(nullptr)); | |
418 explicit Client(::kj::Own< ::capnp::ClientHook>&& hook); | |
419 template <typename _t, typename = ::kj::EnableIf< ::kj::canConvert<_t*, Server*>()>> | |
420 Client(::kj::Own<_t>&& server); | |
421 template <typename _t, typename = ::kj::EnableIf< ::kj::canConvert<_t*, Client*>()>> | |
422 Client(::kj::Promise<_t>&& promise); | |
423 Client(::kj::Exception&& exception); | |
424 Client(Client&) = default; | |
425 Client(Client&&) = default; | |
426 Client& operator=(Client& other); | |
427 Client& operator=(Client&& other); | |
428 | |
429 template <typename InternalRef2 = ::capnp::AnyPointer, typename ExternalRef2 = ::capnp::AnyPointer, typename InternalOwner2 = ::capnp::AnyPointer, typename ExternalOwner2 = ::capnp::AnyPointer> | |
430 typename RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>::Client asGeneric() { | |
431 return castAs<RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>>(); | |
432 } | |
433 | |
434 ::capnp::Request<typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams, typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveResults> importRequest( | |
435 ::kj::Maybe< ::capnp::MessageSize> sizeHint = nullptr); | |
436 ::capnp::Request<typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams, typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveResults> exportRequest( | |
437 ::kj::Maybe< ::capnp::MessageSize> sizeHint = nullptr); | |
438 | |
439 protected: | |
440 Client() = default; | |
441 }; | |
442 | |
443 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
444 class RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Server | |
445 : public virtual ::capnp::Capability::Server { | |
446 public: | |
447 typedef RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner> Serves; | |
448 | |
449 ::kj::Promise<void> dispatchCall(uint64_t interfaceId, uint16_t methodId, | |
450 ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) | |
451 override; | |
452 | |
453 protected: | |
454 typedef typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams ImportParams; | |
455 typedef ::capnp::CallContext<ImportParams, typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveResults> ImportContext; | |
456 virtual ::kj::Promise<void> import(ImportContext context); | |
457 typedef typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams ExportParams; | |
458 typedef ::capnp::CallContext<ExportParams, typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveResults> ExportContext; | |
459 virtual ::kj::Promise<void> export_(ExportContext context); | |
460 | |
461 inline typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client thisCap() { | |
462 return ::capnp::Capability::Server::thisCap() | |
463 .template castAs< ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>>(); | |
464 } | |
465 | |
466 ::kj::Promise<void> dispatchCallInternal(uint16_t methodId, | |
467 ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context); | |
468 }; | |
469 #endif // !CAPNP_LITE | |
470 | |
471 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
472 class RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Reader { | |
473 public: | |
474 typedef ImportParams Reads; | |
475 | |
476 Reader() = default; | |
477 inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} | |
478 | |
479 inline ::capnp::MessageSize totalSize() const { | |
480 return _reader.totalSize().asPublic(); | |
481 } | |
482 | |
483 #if !CAPNP_LITE | |
484 inline ::kj::StringTree toString() const { | |
485 return ::capnp::_::structString(_reader, *_capnpPrivate::brand); | |
486 } | |
487 #endif // !CAPNP_LITE | |
488 | |
489 template <typename InternalRef2 = ::capnp::AnyPointer, typename ExternalRef2 = ::capnp::AnyPointer, typename InternalOwner2 = ::capnp::AnyPointer, typename ExternalOwner2 = ::capnp::AnyPointer> | |
490 typename RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>::ImportParams::Reader asRealmGatewayGeneric() { | |
491 return typename RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>::ImportParams::Reader(_reader); | |
492 } | |
493 | |
494 inline bool hasCap() const; | |
495 #if !CAPNP_LITE | |
496 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client getCap() const; | |
497 #endif // !CAPNP_LITE | |
498 | |
499 inline bool hasParams() const; | |
500 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Reader getParams() const; | |
501 | |
502 private: | |
503 ::capnp::_::StructReader _reader; | |
504 template <typename, ::capnp::Kind> | |
505 friend struct ::capnp::ToDynamic_; | |
506 template <typename, ::capnp::Kind> | |
507 friend struct ::capnp::_::PointerHelpers; | |
508 template <typename, ::capnp::Kind> | |
509 friend struct ::capnp::List; | |
510 friend class ::capnp::MessageBuilder; | |
511 friend class ::capnp::Orphanage; | |
512 }; | |
513 | |
514 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
515 class RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder { | |
516 public: | |
517 typedef ImportParams Builds; | |
518 | |
519 Builder() = delete; // Deleted to discourage incorrect usage. | |
520 // You can explicitly initialize to nullptr instead. | |
521 inline Builder(decltype(nullptr)) {} | |
522 inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {} | |
523 inline operator Reader() const { return Reader(_builder.asReader()); } | |
524 inline Reader asReader() const { return *this; } | |
525 | |
526 inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); } | |
527 #if !CAPNP_LITE | |
528 inline ::kj::StringTree toString() const { return asReader().toString(); } | |
529 #endif // !CAPNP_LITE | |
530 | |
531 template <typename InternalRef2 = ::capnp::AnyPointer, typename ExternalRef2 = ::capnp::AnyPointer, typename InternalOwner2 = ::capnp::AnyPointer, typename ExternalOwner2 = ::capnp::AnyPointer> | |
532 typename RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>::ImportParams::Builder asRealmGatewayGeneric() { | |
533 return typename RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>::ImportParams::Builder(_builder); | |
534 } | |
535 | |
536 inline bool hasCap(); | |
537 #if !CAPNP_LITE | |
538 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client getCap(); | |
539 inline void setCap(typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client&& value); | |
540 inline void setCap(typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client& value); | |
541 inline void adoptCap(::capnp::Orphan< ::capnp::Persistent<ExternalRef, ExternalOwner>>&& value); | |
542 inline ::capnp::Orphan< ::capnp::Persistent<ExternalRef, ExternalOwner>> disownCap(); | |
543 #endif // !CAPNP_LITE | |
544 | |
545 inline bool hasParams(); | |
546 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Builder getParams(); | |
547 inline void setParams(typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Reader value); | |
548 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Builder initParams(); | |
549 inline void adoptParams(::capnp::Orphan<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>&& value); | |
550 inline ::capnp::Orphan<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams> disownParams(); | |
551 | |
552 private: | |
553 ::capnp::_::StructBuilder _builder; | |
554 template <typename, ::capnp::Kind> | |
555 friend struct ::capnp::ToDynamic_; | |
556 friend class ::capnp::Orphanage; | |
557 template <typename, ::capnp::Kind> | |
558 friend struct ::capnp::_::PointerHelpers; | |
559 }; | |
560 | |
561 #if !CAPNP_LITE | |
562 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
563 class RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Pipeline { | |
564 public: | |
565 typedef ImportParams Pipelines; | |
566 | |
567 inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} | |
568 inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) | |
569 : _typeless(kj::mv(typeless)) {} | |
570 | |
571 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client getCap(); | |
572 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Pipeline getParams(); | |
573 private: | |
574 ::capnp::AnyPointer::Pipeline _typeless; | |
575 friend class ::capnp::PipelineHook; | |
576 template <typename, ::capnp::Kind> | |
577 friend struct ::capnp::ToDynamic_; | |
578 }; | |
579 #endif // !CAPNP_LITE | |
580 | |
581 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
582 class RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Reader { | |
583 public: | |
584 typedef ExportParams Reads; | |
585 | |
586 Reader() = default; | |
587 inline explicit Reader(::capnp::_::StructReader base): _reader(base) {} | |
588 | |
589 inline ::capnp::MessageSize totalSize() const { | |
590 return _reader.totalSize().asPublic(); | |
591 } | |
592 | |
593 #if !CAPNP_LITE | |
594 inline ::kj::StringTree toString() const { | |
595 return ::capnp::_::structString(_reader, *_capnpPrivate::brand); | |
596 } | |
597 #endif // !CAPNP_LITE | |
598 | |
599 template <typename InternalRef2 = ::capnp::AnyPointer, typename ExternalRef2 = ::capnp::AnyPointer, typename InternalOwner2 = ::capnp::AnyPointer, typename ExternalOwner2 = ::capnp::AnyPointer> | |
600 typename RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>::ExportParams::Reader asRealmGatewayGeneric() { | |
601 return typename RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>::ExportParams::Reader(_reader); | |
602 } | |
603 | |
604 inline bool hasCap() const; | |
605 #if !CAPNP_LITE | |
606 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client getCap() const; | |
607 #endif // !CAPNP_LITE | |
608 | |
609 inline bool hasParams() const; | |
610 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Reader getParams() const; | |
611 | |
612 private: | |
613 ::capnp::_::StructReader _reader; | |
614 template <typename, ::capnp::Kind> | |
615 friend struct ::capnp::ToDynamic_; | |
616 template <typename, ::capnp::Kind> | |
617 friend struct ::capnp::_::PointerHelpers; | |
618 template <typename, ::capnp::Kind> | |
619 friend struct ::capnp::List; | |
620 friend class ::capnp::MessageBuilder; | |
621 friend class ::capnp::Orphanage; | |
622 }; | |
623 | |
624 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
625 class RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder { | |
626 public: | |
627 typedef ExportParams Builds; | |
628 | |
629 Builder() = delete; // Deleted to discourage incorrect usage. | |
630 // You can explicitly initialize to nullptr instead. | |
631 inline Builder(decltype(nullptr)) {} | |
632 inline explicit Builder(::capnp::_::StructBuilder base): _builder(base) {} | |
633 inline operator Reader() const { return Reader(_builder.asReader()); } | |
634 inline Reader asReader() const { return *this; } | |
635 | |
636 inline ::capnp::MessageSize totalSize() const { return asReader().totalSize(); } | |
637 #if !CAPNP_LITE | |
638 inline ::kj::StringTree toString() const { return asReader().toString(); } | |
639 #endif // !CAPNP_LITE | |
640 | |
641 template <typename InternalRef2 = ::capnp::AnyPointer, typename ExternalRef2 = ::capnp::AnyPointer, typename InternalOwner2 = ::capnp::AnyPointer, typename ExternalOwner2 = ::capnp::AnyPointer> | |
642 typename RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>::ExportParams::Builder asRealmGatewayGeneric() { | |
643 return typename RealmGateway<InternalRef2, ExternalRef2, InternalOwner2, ExternalOwner2>::ExportParams::Builder(_builder); | |
644 } | |
645 | |
646 inline bool hasCap(); | |
647 #if !CAPNP_LITE | |
648 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client getCap(); | |
649 inline void setCap(typename ::capnp::Persistent<InternalRef, InternalOwner>::Client&& value); | |
650 inline void setCap(typename ::capnp::Persistent<InternalRef, InternalOwner>::Client& value); | |
651 inline void adoptCap(::capnp::Orphan< ::capnp::Persistent<InternalRef, InternalOwner>>&& value); | |
652 inline ::capnp::Orphan< ::capnp::Persistent<InternalRef, InternalOwner>> disownCap(); | |
653 #endif // !CAPNP_LITE | |
654 | |
655 inline bool hasParams(); | |
656 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Builder getParams(); | |
657 inline void setParams(typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Reader value); | |
658 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Builder initParams(); | |
659 inline void adoptParams(::capnp::Orphan<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>&& value); | |
660 inline ::capnp::Orphan<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams> disownParams(); | |
661 | |
662 private: | |
663 ::capnp::_::StructBuilder _builder; | |
664 template <typename, ::capnp::Kind> | |
665 friend struct ::capnp::ToDynamic_; | |
666 friend class ::capnp::Orphanage; | |
667 template <typename, ::capnp::Kind> | |
668 friend struct ::capnp::_::PointerHelpers; | |
669 }; | |
670 | |
671 #if !CAPNP_LITE | |
672 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
673 class RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Pipeline { | |
674 public: | |
675 typedef ExportParams Pipelines; | |
676 | |
677 inline Pipeline(decltype(nullptr)): _typeless(nullptr) {} | |
678 inline explicit Pipeline(::capnp::AnyPointer::Pipeline&& typeless) | |
679 : _typeless(kj::mv(typeless)) {} | |
680 | |
681 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client getCap(); | |
682 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Pipeline getParams(); | |
683 private: | |
684 ::capnp::AnyPointer::Pipeline _typeless; | |
685 friend class ::capnp::PipelineHook; | |
686 template <typename, ::capnp::Kind> | |
687 friend struct ::capnp::ToDynamic_; | |
688 }; | |
689 #endif // !CAPNP_LITE | |
690 | |
691 // ======================================================================================= | |
692 | |
693 #if !CAPNP_LITE | |
694 template <typename SturdyRef, typename Owner> | |
695 inline Persistent<SturdyRef, Owner>::Client::Client(decltype(nullptr)) | |
696 : ::capnp::Capability::Client(nullptr) {} | |
697 template <typename SturdyRef, typename Owner> | |
698 inline Persistent<SturdyRef, Owner>::Client::Client( | |
699 ::kj::Own< ::capnp::ClientHook>&& hook) | |
700 : ::capnp::Capability::Client(::kj::mv(hook)) {} | |
701 template <typename SturdyRef, typename Owner> | |
702 template <typename _t, typename> | |
703 inline Persistent<SturdyRef, Owner>::Client::Client(::kj::Own<_t>&& server) | |
704 : ::capnp::Capability::Client(::kj::mv(server)) {} | |
705 template <typename SturdyRef, typename Owner> | |
706 template <typename _t, typename> | |
707 inline Persistent<SturdyRef, Owner>::Client::Client(::kj::Promise<_t>&& promise) | |
708 : ::capnp::Capability::Client(::kj::mv(promise)) {} | |
709 template <typename SturdyRef, typename Owner> | |
710 inline Persistent<SturdyRef, Owner>::Client::Client(::kj::Exception&& exception) | |
711 : ::capnp::Capability::Client(::kj::mv(exception)) {} | |
712 template <typename SturdyRef, typename Owner> | |
713 inline typename ::capnp::Persistent<SturdyRef, Owner>::Client& Persistent<SturdyRef, Owner>::Client::operator=(Client& other) { | |
714 ::capnp::Capability::Client::operator=(other); | |
715 return *this; | |
716 } | |
717 template <typename SturdyRef, typename Owner> | |
718 inline typename ::capnp::Persistent<SturdyRef, Owner>::Client& Persistent<SturdyRef, Owner>::Client::operator=(Client&& other) { | |
719 ::capnp::Capability::Client::operator=(kj::mv(other)); | |
720 return *this; | |
721 } | |
722 | |
723 #endif // !CAPNP_LITE | |
724 template <typename SturdyRef, typename Owner> | |
725 inline bool Persistent<SturdyRef, Owner>::SaveParams::Reader::hasSealFor() const { | |
726 return !_reader.getPointerField(0 * ::capnp::POINTERS).isNull(); | |
727 } | |
728 template <typename SturdyRef, typename Owner> | |
729 inline bool Persistent<SturdyRef, Owner>::SaveParams::Builder::hasSealFor() { | |
730 return !_builder.getPointerField(0 * ::capnp::POINTERS).isNull(); | |
731 } | |
732 template <typename SturdyRef, typename Owner> | |
733 inline ::capnp::ReaderFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Reader::getSealFor() const { | |
734 return ::capnp::_::PointerHelpers<Owner>::get( | |
735 _reader.getPointerField(0 * ::capnp::POINTERS)); | |
736 } | |
737 template <typename SturdyRef, typename Owner> | |
738 inline ::capnp::BuilderFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Builder::getSealFor() { | |
739 return ::capnp::_::PointerHelpers<Owner>::get( | |
740 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
741 } | |
742 #if !CAPNP_LITE | |
743 template <typename SturdyRef, typename Owner> | |
744 inline ::capnp::PipelineFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Pipeline::getSealFor() { | |
745 return ::capnp::PipelineFor<Owner>(_typeless.getPointerField(0)); | |
746 } | |
747 #endif // !CAPNP_LITE | |
748 template <typename SturdyRef, typename Owner> | |
749 inline void Persistent<SturdyRef, Owner>::SaveParams::Builder::setSealFor( ::capnp::ReaderFor<Owner> value) { | |
750 ::capnp::_::PointerHelpers<Owner>::set( | |
751 _builder.getPointerField(0 * ::capnp::POINTERS), value); | |
752 } | |
753 template <typename SturdyRef, typename Owner> | |
754 inline ::capnp::BuilderFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Builder::initSealFor() { | |
755 return ::capnp::_::PointerHelpers<Owner>::init( | |
756 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
757 } | |
758 template <typename SturdyRef, typename Owner> | |
759 inline ::capnp::BuilderFor<Owner> Persistent<SturdyRef, Owner>::SaveParams::Builder::initSealFor(unsigned int size) { | |
760 return ::capnp::_::PointerHelpers<Owner>::init( | |
761 _builder.getPointerField(0 * ::capnp::POINTERS), size); | |
762 } | |
763 template <typename SturdyRef, typename Owner> | |
764 inline void Persistent<SturdyRef, Owner>::SaveParams::Builder::adoptSealFor( | |
765 ::capnp::Orphan<Owner>&& value) { | |
766 ::capnp::_::PointerHelpers<Owner>::adopt( | |
767 _builder.getPointerField(0 * ::capnp::POINTERS), kj::mv(value)); | |
768 } | |
769 template <typename SturdyRef, typename Owner> | |
770 inline ::capnp::Orphan<Owner> Persistent<SturdyRef, Owner>::SaveParams::Builder::disownSealFor() { | |
771 return ::capnp::_::PointerHelpers<Owner>::disown( | |
772 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
773 } | |
774 | |
775 // Persistent<SturdyRef, Owner>::SaveParams | |
776 template <typename SturdyRef, typename Owner> | |
777 constexpr uint16_t Persistent<SturdyRef, Owner>::SaveParams::_capnpPrivate::dataWordSize; | |
778 template <typename SturdyRef, typename Owner> | |
779 constexpr uint16_t Persistent<SturdyRef, Owner>::SaveParams::_capnpPrivate::pointerCount; | |
780 #if !CAPNP_LITE | |
781 template <typename SturdyRef, typename Owner> | |
782 constexpr ::capnp::Kind Persistent<SturdyRef, Owner>::SaveParams::_capnpPrivate::kind; | |
783 template <typename SturdyRef, typename Owner> | |
784 constexpr ::capnp::_::RawSchema const* Persistent<SturdyRef, Owner>::SaveParams::_capnpPrivate::schema; | |
785 template <typename SturdyRef, typename Owner> | |
786 constexpr ::capnp::_::RawBrandedSchema const* Persistent<SturdyRef, Owner>::SaveParams::_capnpPrivate::brand; | |
787 template <typename SturdyRef, typename Owner> | |
788 const ::capnp::_::RawBrandedSchema::Scope Persistent<SturdyRef, Owner>::SaveParams::_capnpPrivate::brandScopes[] = { | |
789 { 0xc8cb212fcd9f5691, brandBindings + 0, 2, false}, | |
790 }; | |
791 template <typename SturdyRef, typename Owner> | |
792 const ::capnp::_::RawBrandedSchema::Binding Persistent<SturdyRef, Owner>::SaveParams::_capnpPrivate::brandBindings[] = { | |
793 ::capnp::_::brandBindingFor<SturdyRef>(), | |
794 ::capnp::_::brandBindingFor<Owner>(), | |
795 }; | |
796 template <typename SturdyRef, typename Owner> | |
797 const ::capnp::_::RawBrandedSchema Persistent<SturdyRef, Owner>::SaveParams::_capnpPrivate::specificBrand = { | |
798 &::capnp::schemas::s_f76fba59183073a5, brandScopes, nullptr, | |
799 sizeof(brandScopes) / sizeof(brandScopes[0]), 0, nullptr | |
800 }; | |
801 #endif // !CAPNP_LITE | |
802 | |
803 template <typename SturdyRef, typename Owner> | |
804 inline bool Persistent<SturdyRef, Owner>::SaveResults::Reader::hasSturdyRef() const { | |
805 return !_reader.getPointerField(0 * ::capnp::POINTERS).isNull(); | |
806 } | |
807 template <typename SturdyRef, typename Owner> | |
808 inline bool Persistent<SturdyRef, Owner>::SaveResults::Builder::hasSturdyRef() { | |
809 return !_builder.getPointerField(0 * ::capnp::POINTERS).isNull(); | |
810 } | |
811 template <typename SturdyRef, typename Owner> | |
812 inline ::capnp::ReaderFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Reader::getSturdyRef() const { | |
813 return ::capnp::_::PointerHelpers<SturdyRef>::get( | |
814 _reader.getPointerField(0 * ::capnp::POINTERS)); | |
815 } | |
816 template <typename SturdyRef, typename Owner> | |
817 inline ::capnp::BuilderFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Builder::getSturdyRef() { | |
818 return ::capnp::_::PointerHelpers<SturdyRef>::get( | |
819 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
820 } | |
821 #if !CAPNP_LITE | |
822 template <typename SturdyRef, typename Owner> | |
823 inline ::capnp::PipelineFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Pipeline::getSturdyRef() { | |
824 return ::capnp::PipelineFor<SturdyRef>(_typeless.getPointerField(0)); | |
825 } | |
826 #endif // !CAPNP_LITE | |
827 template <typename SturdyRef, typename Owner> | |
828 inline void Persistent<SturdyRef, Owner>::SaveResults::Builder::setSturdyRef( ::capnp::ReaderFor<SturdyRef> value) { | |
829 ::capnp::_::PointerHelpers<SturdyRef>::set( | |
830 _builder.getPointerField(0 * ::capnp::POINTERS), value); | |
831 } | |
832 template <typename SturdyRef, typename Owner> | |
833 inline ::capnp::BuilderFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Builder::initSturdyRef() { | |
834 return ::capnp::_::PointerHelpers<SturdyRef>::init( | |
835 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
836 } | |
837 template <typename SturdyRef, typename Owner> | |
838 inline ::capnp::BuilderFor<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Builder::initSturdyRef(unsigned int size) { | |
839 return ::capnp::_::PointerHelpers<SturdyRef>::init( | |
840 _builder.getPointerField(0 * ::capnp::POINTERS), size); | |
841 } | |
842 template <typename SturdyRef, typename Owner> | |
843 inline void Persistent<SturdyRef, Owner>::SaveResults::Builder::adoptSturdyRef( | |
844 ::capnp::Orphan<SturdyRef>&& value) { | |
845 ::capnp::_::PointerHelpers<SturdyRef>::adopt( | |
846 _builder.getPointerField(0 * ::capnp::POINTERS), kj::mv(value)); | |
847 } | |
848 template <typename SturdyRef, typename Owner> | |
849 inline ::capnp::Orphan<SturdyRef> Persistent<SturdyRef, Owner>::SaveResults::Builder::disownSturdyRef() { | |
850 return ::capnp::_::PointerHelpers<SturdyRef>::disown( | |
851 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
852 } | |
853 | |
854 // Persistent<SturdyRef, Owner>::SaveResults | |
855 template <typename SturdyRef, typename Owner> | |
856 constexpr uint16_t Persistent<SturdyRef, Owner>::SaveResults::_capnpPrivate::dataWordSize; | |
857 template <typename SturdyRef, typename Owner> | |
858 constexpr uint16_t Persistent<SturdyRef, Owner>::SaveResults::_capnpPrivate::pointerCount; | |
859 #if !CAPNP_LITE | |
860 template <typename SturdyRef, typename Owner> | |
861 constexpr ::capnp::Kind Persistent<SturdyRef, Owner>::SaveResults::_capnpPrivate::kind; | |
862 template <typename SturdyRef, typename Owner> | |
863 constexpr ::capnp::_::RawSchema const* Persistent<SturdyRef, Owner>::SaveResults::_capnpPrivate::schema; | |
864 template <typename SturdyRef, typename Owner> | |
865 constexpr ::capnp::_::RawBrandedSchema const* Persistent<SturdyRef, Owner>::SaveResults::_capnpPrivate::brand; | |
866 template <typename SturdyRef, typename Owner> | |
867 const ::capnp::_::RawBrandedSchema::Scope Persistent<SturdyRef, Owner>::SaveResults::_capnpPrivate::brandScopes[] = { | |
868 { 0xc8cb212fcd9f5691, brandBindings + 0, 2, false}, | |
869 }; | |
870 template <typename SturdyRef, typename Owner> | |
871 const ::capnp::_::RawBrandedSchema::Binding Persistent<SturdyRef, Owner>::SaveResults::_capnpPrivate::brandBindings[] = { | |
872 ::capnp::_::brandBindingFor<SturdyRef>(), | |
873 ::capnp::_::brandBindingFor<Owner>(), | |
874 }; | |
875 template <typename SturdyRef, typename Owner> | |
876 const ::capnp::_::RawBrandedSchema Persistent<SturdyRef, Owner>::SaveResults::_capnpPrivate::specificBrand = { | |
877 &::capnp::schemas::s_b76848c18c40efbf, brandScopes, nullptr, | |
878 sizeof(brandScopes) / sizeof(brandScopes[0]), 0, nullptr | |
879 }; | |
880 #endif // !CAPNP_LITE | |
881 | |
882 #if !CAPNP_LITE | |
883 template <typename SturdyRef, typename Owner> | |
884 ::capnp::Request<typename ::capnp::Persistent<SturdyRef, Owner>::SaveParams, typename ::capnp::Persistent<SturdyRef, Owner>::SaveResults> | |
885 Persistent<SturdyRef, Owner>::Client::saveRequest(::kj::Maybe< ::capnp::MessageSize> sizeHint) { | |
886 return newCall<typename ::capnp::Persistent<SturdyRef, Owner>::SaveParams, typename ::capnp::Persistent<SturdyRef, Owner>::SaveResults>( | |
887 0xc8cb212fcd9f5691ull, 0, sizeHint); | |
888 } | |
889 template <typename SturdyRef, typename Owner> | |
890 ::kj::Promise<void> Persistent<SturdyRef, Owner>::Server::save(SaveContext) { | |
891 return ::capnp::Capability::Server::internalUnimplemented( | |
892 "capnp/persistent.capnp:Persistent", "save", | |
893 0xc8cb212fcd9f5691ull, 0); | |
894 } | |
895 template <typename SturdyRef, typename Owner> | |
896 ::kj::Promise<void> Persistent<SturdyRef, Owner>::Server::dispatchCall( | |
897 uint64_t interfaceId, uint16_t methodId, | |
898 ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) { | |
899 switch (interfaceId) { | |
900 case 0xc8cb212fcd9f5691ull: | |
901 return dispatchCallInternal(methodId, context); | |
902 default: | |
903 return internalUnimplemented("capnp/persistent.capnp:Persistent", interfaceId); | |
904 } | |
905 } | |
906 template <typename SturdyRef, typename Owner> | |
907 ::kj::Promise<void> Persistent<SturdyRef, Owner>::Server::dispatchCallInternal( | |
908 uint16_t methodId, | |
909 ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) { | |
910 switch (methodId) { | |
911 case 0: | |
912 return save(::capnp::Capability::Server::internalGetTypedContext< | |
913 typename ::capnp::Persistent<SturdyRef, Owner>::SaveParams, typename ::capnp::Persistent<SturdyRef, Owner>::SaveResults>(context)); | |
914 default: | |
915 (void)context; | |
916 return ::capnp::Capability::Server::internalUnimplemented( | |
917 "capnp/persistent.capnp:Persistent", | |
918 0xc8cb212fcd9f5691ull, methodId); | |
919 } | |
920 } | |
921 #endif // !CAPNP_LITE | |
922 | |
923 // Persistent<SturdyRef, Owner> | |
924 #if !CAPNP_LITE | |
925 template <typename SturdyRef, typename Owner> | |
926 constexpr ::capnp::Kind Persistent<SturdyRef, Owner>::_capnpPrivate::kind; | |
927 template <typename SturdyRef, typename Owner> | |
928 constexpr ::capnp::_::RawSchema const* Persistent<SturdyRef, Owner>::_capnpPrivate::schema; | |
929 template <typename SturdyRef, typename Owner> | |
930 constexpr ::capnp::_::RawBrandedSchema const* Persistent<SturdyRef, Owner>::_capnpPrivate::brand; | |
931 template <typename SturdyRef, typename Owner> | |
932 const ::capnp::_::RawBrandedSchema::Scope Persistent<SturdyRef, Owner>::_capnpPrivate::brandScopes[] = { | |
933 { 0xc8cb212fcd9f5691, brandBindings + 0, 2, false}, | |
934 }; | |
935 template <typename SturdyRef, typename Owner> | |
936 const ::capnp::_::RawBrandedSchema::Binding Persistent<SturdyRef, Owner>::_capnpPrivate::brandBindings[] = { | |
937 ::capnp::_::brandBindingFor<SturdyRef>(), | |
938 ::capnp::_::brandBindingFor<Owner>(), | |
939 }; | |
940 template <typename SturdyRef, typename Owner> | |
941 const ::capnp::_::RawBrandedSchema::Dependency Persistent<SturdyRef, Owner>::_capnpPrivate::brandDependencies[] = { | |
942 { 33554432, ::capnp::Persistent<SturdyRef, Owner>::SaveParams::_capnpPrivate::brand }, | |
943 { 50331648, ::capnp::Persistent<SturdyRef, Owner>::SaveResults::_capnpPrivate::brand }, | |
944 }; | |
945 template <typename SturdyRef, typename Owner> | |
946 const ::capnp::_::RawBrandedSchema Persistent<SturdyRef, Owner>::_capnpPrivate::specificBrand = { | |
947 &::capnp::schemas::s_c8cb212fcd9f5691, brandScopes, brandDependencies, | |
948 sizeof(brandScopes) / sizeof(brandScopes[0]), sizeof(brandDependencies) / sizeof(brandDependencies[0]), nullptr | |
949 }; | |
950 #endif // !CAPNP_LITE | |
951 | |
952 #if !CAPNP_LITE | |
953 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
954 inline RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client::Client(decltype(nullptr)) | |
955 : ::capnp::Capability::Client(nullptr) {} | |
956 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
957 inline RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client::Client( | |
958 ::kj::Own< ::capnp::ClientHook>&& hook) | |
959 : ::capnp::Capability::Client(::kj::mv(hook)) {} | |
960 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
961 template <typename _t, typename> | |
962 inline RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client::Client(::kj::Own<_t>&& server) | |
963 : ::capnp::Capability::Client(::kj::mv(server)) {} | |
964 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
965 template <typename _t, typename> | |
966 inline RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client::Client(::kj::Promise<_t>&& promise) | |
967 : ::capnp::Capability::Client(::kj::mv(promise)) {} | |
968 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
969 inline RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client::Client(::kj::Exception&& exception) | |
970 : ::capnp::Capability::Client(::kj::mv(exception)) {} | |
971 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
972 inline typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client& RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client::operator=(Client& other) { | |
973 ::capnp::Capability::Client::operator=(other); | |
974 return *this; | |
975 } | |
976 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
977 inline typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client& RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client::operator=(Client&& other) { | |
978 ::capnp::Capability::Client::operator=(kj::mv(other)); | |
979 return *this; | |
980 } | |
981 | |
982 #endif // !CAPNP_LITE | |
983 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
984 inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Reader::hasCap() const { | |
985 return !_reader.getPointerField(0 * ::capnp::POINTERS).isNull(); | |
986 } | |
987 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
988 inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::hasCap() { | |
989 return !_builder.getPointerField(0 * ::capnp::POINTERS).isNull(); | |
990 } | |
991 #if !CAPNP_LITE | |
992 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
993 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Reader::getCap() const { | |
994 return ::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::get( | |
995 _reader.getPointerField(0 * ::capnp::POINTERS)); | |
996 } | |
997 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
998 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::getCap() { | |
999 return ::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::get( | |
1000 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
1001 } | |
1002 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1003 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Pipeline::getCap() { | |
1004 return typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client(_typeless.getPointerField(0).asCap()); | |
1005 } | |
1006 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1007 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::setCap(typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client&& cap) { | |
1008 ::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::set( | |
1009 _builder.getPointerField(0 * ::capnp::POINTERS), kj::mv(cap)); | |
1010 } | |
1011 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1012 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::setCap(typename ::capnp::Persistent<ExternalRef, ExternalOwner>::Client& cap) { | |
1013 ::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::set( | |
1014 _builder.getPointerField(0 * ::capnp::POINTERS), cap); | |
1015 } | |
1016 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1017 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::adoptCap( | |
1018 ::capnp::Orphan< ::capnp::Persistent<ExternalRef, ExternalOwner>>&& value) { | |
1019 ::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::adopt( | |
1020 _builder.getPointerField(0 * ::capnp::POINTERS), kj::mv(value)); | |
1021 } | |
1022 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1023 inline ::capnp::Orphan< ::capnp::Persistent<ExternalRef, ExternalOwner>> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::disownCap() { | |
1024 return ::capnp::_::PointerHelpers< ::capnp::Persistent<ExternalRef, ExternalOwner>>::disown( | |
1025 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
1026 } | |
1027 #endif // !CAPNP_LITE | |
1028 | |
1029 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1030 inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Reader::hasParams() const { | |
1031 return !_reader.getPointerField(1 * ::capnp::POINTERS).isNull(); | |
1032 } | |
1033 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1034 inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::hasParams() { | |
1035 return !_builder.getPointerField(1 * ::capnp::POINTERS).isNull(); | |
1036 } | |
1037 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1038 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Reader RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Reader::getParams() const { | |
1039 return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::get( | |
1040 _reader.getPointerField(1 * ::capnp::POINTERS)); | |
1041 } | |
1042 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1043 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Builder RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::getParams() { | |
1044 return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::get( | |
1045 _builder.getPointerField(1 * ::capnp::POINTERS)); | |
1046 } | |
1047 #if !CAPNP_LITE | |
1048 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1049 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Pipeline RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Pipeline::getParams() { | |
1050 return typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Pipeline(_typeless.getPointerField(1)); | |
1051 } | |
1052 #endif // !CAPNP_LITE | |
1053 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1054 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::setParams(typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Reader value) { | |
1055 ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::set( | |
1056 _builder.getPointerField(1 * ::capnp::POINTERS), value); | |
1057 } | |
1058 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1059 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::Builder RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::initParams() { | |
1060 return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::init( | |
1061 _builder.getPointerField(1 * ::capnp::POINTERS)); | |
1062 } | |
1063 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1064 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::adoptParams( | |
1065 ::capnp::Orphan<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>&& value) { | |
1066 ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::adopt( | |
1067 _builder.getPointerField(1 * ::capnp::POINTERS), kj::mv(value)); | |
1068 } | |
1069 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1070 inline ::capnp::Orphan<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::Builder::disownParams() { | |
1071 return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams>::disown( | |
1072 _builder.getPointerField(1 * ::capnp::POINTERS)); | |
1073 } | |
1074 | |
1075 // RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams | |
1076 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1077 constexpr uint16_t RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::dataWordSize; | |
1078 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1079 constexpr uint16_t RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::pointerCount; | |
1080 #if !CAPNP_LITE | |
1081 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1082 constexpr ::capnp::Kind RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::kind; | |
1083 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1084 constexpr ::capnp::_::RawSchema const* RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::schema; | |
1085 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1086 constexpr ::capnp::_::RawBrandedSchema const* RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::brand; | |
1087 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1088 const ::capnp::_::RawBrandedSchema::Scope RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::brandScopes[] = { | |
1089 { 0x84ff286cd00a3ed4, brandBindings + 0, 4, false}, | |
1090 }; | |
1091 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1092 const ::capnp::_::RawBrandedSchema::Binding RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::brandBindings[] = { | |
1093 ::capnp::_::brandBindingFor<InternalRef>(), | |
1094 ::capnp::_::brandBindingFor<ExternalRef>(), | |
1095 ::capnp::_::brandBindingFor<InternalOwner>(), | |
1096 ::capnp::_::brandBindingFor<ExternalOwner>(), | |
1097 }; | |
1098 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1099 const ::capnp::_::RawBrandedSchema::Dependency RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::brandDependencies[] = { | |
1100 { 16777216, ::capnp::Persistent<ExternalRef, ExternalOwner>::_capnpPrivate::brand }, | |
1101 { 16777217, ::capnp::Persistent<InternalRef, InternalOwner>::SaveParams::_capnpPrivate::brand }, | |
1102 }; | |
1103 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1104 const ::capnp::_::RawBrandedSchema RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::specificBrand = { | |
1105 &::capnp::schemas::s_f0c2cc1d3909574d, brandScopes, brandDependencies, | |
1106 sizeof(brandScopes) / sizeof(brandScopes[0]), sizeof(brandDependencies) / sizeof(brandDependencies[0]), nullptr | |
1107 }; | |
1108 #endif // !CAPNP_LITE | |
1109 | |
1110 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1111 inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Reader::hasCap() const { | |
1112 return !_reader.getPointerField(0 * ::capnp::POINTERS).isNull(); | |
1113 } | |
1114 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1115 inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::hasCap() { | |
1116 return !_builder.getPointerField(0 * ::capnp::POINTERS).isNull(); | |
1117 } | |
1118 #if !CAPNP_LITE | |
1119 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1120 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Reader::getCap() const { | |
1121 return ::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::get( | |
1122 _reader.getPointerField(0 * ::capnp::POINTERS)); | |
1123 } | |
1124 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1125 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::getCap() { | |
1126 return ::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::get( | |
1127 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
1128 } | |
1129 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1130 inline typename ::capnp::Persistent<InternalRef, InternalOwner>::Client RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Pipeline::getCap() { | |
1131 return typename ::capnp::Persistent<InternalRef, InternalOwner>::Client(_typeless.getPointerField(0).asCap()); | |
1132 } | |
1133 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1134 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::setCap(typename ::capnp::Persistent<InternalRef, InternalOwner>::Client&& cap) { | |
1135 ::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::set( | |
1136 _builder.getPointerField(0 * ::capnp::POINTERS), kj::mv(cap)); | |
1137 } | |
1138 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1139 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::setCap(typename ::capnp::Persistent<InternalRef, InternalOwner>::Client& cap) { | |
1140 ::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::set( | |
1141 _builder.getPointerField(0 * ::capnp::POINTERS), cap); | |
1142 } | |
1143 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1144 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::adoptCap( | |
1145 ::capnp::Orphan< ::capnp::Persistent<InternalRef, InternalOwner>>&& value) { | |
1146 ::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::adopt( | |
1147 _builder.getPointerField(0 * ::capnp::POINTERS), kj::mv(value)); | |
1148 } | |
1149 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1150 inline ::capnp::Orphan< ::capnp::Persistent<InternalRef, InternalOwner>> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::disownCap() { | |
1151 return ::capnp::_::PointerHelpers< ::capnp::Persistent<InternalRef, InternalOwner>>::disown( | |
1152 _builder.getPointerField(0 * ::capnp::POINTERS)); | |
1153 } | |
1154 #endif // !CAPNP_LITE | |
1155 | |
1156 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1157 inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Reader::hasParams() const { | |
1158 return !_reader.getPointerField(1 * ::capnp::POINTERS).isNull(); | |
1159 } | |
1160 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1161 inline bool RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::hasParams() { | |
1162 return !_builder.getPointerField(1 * ::capnp::POINTERS).isNull(); | |
1163 } | |
1164 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1165 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Reader RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Reader::getParams() const { | |
1166 return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::get( | |
1167 _reader.getPointerField(1 * ::capnp::POINTERS)); | |
1168 } | |
1169 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1170 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Builder RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::getParams() { | |
1171 return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::get( | |
1172 _builder.getPointerField(1 * ::capnp::POINTERS)); | |
1173 } | |
1174 #if !CAPNP_LITE | |
1175 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1176 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Pipeline RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Pipeline::getParams() { | |
1177 return typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Pipeline(_typeless.getPointerField(1)); | |
1178 } | |
1179 #endif // !CAPNP_LITE | |
1180 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1181 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::setParams(typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Reader value) { | |
1182 ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::set( | |
1183 _builder.getPointerField(1 * ::capnp::POINTERS), value); | |
1184 } | |
1185 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1186 inline typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::Builder RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::initParams() { | |
1187 return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::init( | |
1188 _builder.getPointerField(1 * ::capnp::POINTERS)); | |
1189 } | |
1190 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1191 inline void RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::adoptParams( | |
1192 ::capnp::Orphan<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>&& value) { | |
1193 ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::adopt( | |
1194 _builder.getPointerField(1 * ::capnp::POINTERS), kj::mv(value)); | |
1195 } | |
1196 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1197 inline ::capnp::Orphan<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::Builder::disownParams() { | |
1198 return ::capnp::_::PointerHelpers<typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams>::disown( | |
1199 _builder.getPointerField(1 * ::capnp::POINTERS)); | |
1200 } | |
1201 | |
1202 // RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams | |
1203 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1204 constexpr uint16_t RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::dataWordSize; | |
1205 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1206 constexpr uint16_t RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::pointerCount; | |
1207 #if !CAPNP_LITE | |
1208 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1209 constexpr ::capnp::Kind RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::kind; | |
1210 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1211 constexpr ::capnp::_::RawSchema const* RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::schema; | |
1212 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1213 constexpr ::capnp::_::RawBrandedSchema const* RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::brand; | |
1214 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1215 const ::capnp::_::RawBrandedSchema::Scope RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::brandScopes[] = { | |
1216 { 0x84ff286cd00a3ed4, brandBindings + 0, 4, false}, | |
1217 }; | |
1218 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1219 const ::capnp::_::RawBrandedSchema::Binding RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::brandBindings[] = { | |
1220 ::capnp::_::brandBindingFor<InternalRef>(), | |
1221 ::capnp::_::brandBindingFor<ExternalRef>(), | |
1222 ::capnp::_::brandBindingFor<InternalOwner>(), | |
1223 ::capnp::_::brandBindingFor<ExternalOwner>(), | |
1224 }; | |
1225 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1226 const ::capnp::_::RawBrandedSchema::Dependency RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::brandDependencies[] = { | |
1227 { 16777216, ::capnp::Persistent<InternalRef, InternalOwner>::_capnpPrivate::brand }, | |
1228 { 16777217, ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveParams::_capnpPrivate::brand }, | |
1229 }; | |
1230 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1231 const ::capnp::_::RawBrandedSchema RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::specificBrand = { | |
1232 &::capnp::schemas::s_ecafa18b482da3aa, brandScopes, brandDependencies, | |
1233 sizeof(brandScopes) / sizeof(brandScopes[0]), sizeof(brandDependencies) / sizeof(brandDependencies[0]), nullptr | |
1234 }; | |
1235 #endif // !CAPNP_LITE | |
1236 | |
1237 #if !CAPNP_LITE | |
1238 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1239 ::capnp::Request<typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams, typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveResults> | |
1240 RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client::importRequest(::kj::Maybe< ::capnp::MessageSize> sizeHint) { | |
1241 return newCall<typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams, typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveResults>( | |
1242 0x84ff286cd00a3ed4ull, 0, sizeHint); | |
1243 } | |
1244 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1245 ::kj::Promise<void> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Server::import(ImportContext) { | |
1246 return ::capnp::Capability::Server::internalUnimplemented( | |
1247 "capnp/persistent.capnp:RealmGateway", "import", | |
1248 0x84ff286cd00a3ed4ull, 0); | |
1249 } | |
1250 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1251 ::capnp::Request<typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams, typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveResults> | |
1252 RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Client::exportRequest(::kj::Maybe< ::capnp::MessageSize> sizeHint) { | |
1253 return newCall<typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams, typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveResults>( | |
1254 0x84ff286cd00a3ed4ull, 1, sizeHint); | |
1255 } | |
1256 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1257 ::kj::Promise<void> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Server::export_(ExportContext) { | |
1258 return ::capnp::Capability::Server::internalUnimplemented( | |
1259 "capnp/persistent.capnp:RealmGateway", "export", | |
1260 0x84ff286cd00a3ed4ull, 1); | |
1261 } | |
1262 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1263 ::kj::Promise<void> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Server::dispatchCall( | |
1264 uint64_t interfaceId, uint16_t methodId, | |
1265 ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) { | |
1266 switch (interfaceId) { | |
1267 case 0x84ff286cd00a3ed4ull: | |
1268 return dispatchCallInternal(methodId, context); | |
1269 default: | |
1270 return internalUnimplemented("capnp/persistent.capnp:RealmGateway", interfaceId); | |
1271 } | |
1272 } | |
1273 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1274 ::kj::Promise<void> RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::Server::dispatchCallInternal( | |
1275 uint16_t methodId, | |
1276 ::capnp::CallContext< ::capnp::AnyPointer, ::capnp::AnyPointer> context) { | |
1277 switch (methodId) { | |
1278 case 0: | |
1279 return import(::capnp::Capability::Server::internalGetTypedContext< | |
1280 typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams, typename ::capnp::Persistent<InternalRef, InternalOwner>::SaveResults>(context)); | |
1281 case 1: | |
1282 return export_(::capnp::Capability::Server::internalGetTypedContext< | |
1283 typename ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams, typename ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveResults>(context)); | |
1284 default: | |
1285 (void)context; | |
1286 return ::capnp::Capability::Server::internalUnimplemented( | |
1287 "capnp/persistent.capnp:RealmGateway", | |
1288 0x84ff286cd00a3ed4ull, methodId); | |
1289 } | |
1290 } | |
1291 #endif // !CAPNP_LITE | |
1292 | |
1293 // RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner> | |
1294 #if !CAPNP_LITE | |
1295 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1296 constexpr ::capnp::Kind RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::_capnpPrivate::kind; | |
1297 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1298 constexpr ::capnp::_::RawSchema const* RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::_capnpPrivate::schema; | |
1299 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1300 constexpr ::capnp::_::RawBrandedSchema const* RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::_capnpPrivate::brand; | |
1301 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1302 const ::capnp::_::RawBrandedSchema::Scope RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::_capnpPrivate::brandScopes[] = { | |
1303 { 0x84ff286cd00a3ed4, brandBindings + 0, 4, false}, | |
1304 }; | |
1305 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1306 const ::capnp::_::RawBrandedSchema::Binding RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::_capnpPrivate::brandBindings[] = { | |
1307 ::capnp::_::brandBindingFor<InternalRef>(), | |
1308 ::capnp::_::brandBindingFor<ExternalRef>(), | |
1309 ::capnp::_::brandBindingFor<InternalOwner>(), | |
1310 ::capnp::_::brandBindingFor<ExternalOwner>(), | |
1311 }; | |
1312 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1313 const ::capnp::_::RawBrandedSchema::Dependency RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::_capnpPrivate::brandDependencies[] = { | |
1314 { 33554432, ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ImportParams::_capnpPrivate::brand }, | |
1315 { 33554433, ::capnp::RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::ExportParams::_capnpPrivate::brand }, | |
1316 { 50331648, ::capnp::Persistent<InternalRef, InternalOwner>::SaveResults::_capnpPrivate::brand }, | |
1317 { 50331649, ::capnp::Persistent<ExternalRef, ExternalOwner>::SaveResults::_capnpPrivate::brand }, | |
1318 }; | |
1319 template <typename InternalRef, typename ExternalRef, typename InternalOwner, typename ExternalOwner> | |
1320 const ::capnp::_::RawBrandedSchema RealmGateway<InternalRef, ExternalRef, InternalOwner, ExternalOwner>::_capnpPrivate::specificBrand = { | |
1321 &::capnp::schemas::s_84ff286cd00a3ed4, brandScopes, brandDependencies, | |
1322 sizeof(brandScopes) / sizeof(brandScopes[0]), sizeof(brandDependencies) / sizeof(brandDependencies[0]), nullptr | |
1323 }; | |
1324 #endif // !CAPNP_LITE | |
1325 | |
1326 } // namespace | |
1327 | |
1328 #endif // CAPNP_INCLUDED_b8630836983feed7_ |