1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
// Generated by uniffi-bindgen-gecko-js. DO NOT EDIT.
#include "nsString.h"
#include "nsPrintfCString.h"
#include "mozilla/Logging.h"
#include "mozilla/Maybe.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/dom/UniFFICallbacks.h"
#include "mozilla/dom/UniFFIScaffolding.h"
#include "mozilla/dom/ScaffoldingCall.h"
namespace mozilla::uniffi {
using dom::ArrayBuffer;
using dom::AutoEntryScript;
using dom::GlobalObject;
using dom::RootedDictionary;
using dom::Promise;
using dom::ScaffoldingType;
using dom::Sequence;
using dom::UniFFICallbackHandler;
using dom::UniFFIPointer;
using dom::UniFFIScaffoldingCallResult;
// Define scaffolding functions from UniFFI
extern "C" {
void ffi_tabs_dffd_TabsStore_object_free(void *, RustCallStatus*);
void * tabs_dffd_TabsStore_new(RustBuffer, RustCallStatus*);
RustBuffer tabs_dffd_TabsStore_get_all(void *, RustCallStatus*);
void tabs_dffd_TabsStore_set_local_tabs(void *, RustBuffer, RustCallStatus*);
void tabs_dffd_TabsStore_register_with_sync_manager(void *, RustCallStatus*);
void tabs_dffd_TabsStore_reset(void *, RustCallStatus*);
RustBuffer tabs_dffd_TabsStore_sync(void *, RustBuffer, RustBuffer, RustBuffer, RustBuffer, RustBuffer, RustCallStatus*);
void * tabs_dffd_TabsStore_bridged_engine(void *, RustCallStatus*);
void ffi_tabs_dffd_TabsBridgedEngine_object_free(void *, RustCallStatus*);
int64_t tabs_dffd_TabsBridgedEngine_last_sync(void *, RustCallStatus*);
void tabs_dffd_TabsBridgedEngine_set_last_sync(void *, int64_t, RustCallStatus*);
RustBuffer tabs_dffd_TabsBridgedEngine_sync_id(void *, RustCallStatus*);
RustBuffer tabs_dffd_TabsBridgedEngine_reset_sync_id(void *, RustCallStatus*);
RustBuffer tabs_dffd_TabsBridgedEngine_ensure_current_sync_id(void *, RustBuffer, RustCallStatus*);
void tabs_dffd_TabsBridgedEngine_prepare_for_sync(void *, RustBuffer, RustCallStatus*);
void tabs_dffd_TabsBridgedEngine_sync_started(void *, RustCallStatus*);
void tabs_dffd_TabsBridgedEngine_store_incoming(void *, RustBuffer, RustCallStatus*);
RustBuffer tabs_dffd_TabsBridgedEngine_apply(void *, RustCallStatus*);
void tabs_dffd_TabsBridgedEngine_set_uploaded(void *, int64_t, RustBuffer, RustCallStatus*);
void tabs_dffd_TabsBridgedEngine_sync_finished(void *, RustCallStatus*);
void tabs_dffd_TabsBridgedEngine_reset(void *, RustCallStatus*);
void tabs_dffd_TabsBridgedEngine_wipe(void *, RustCallStatus*);
}
// Define pointer types
const static mozilla::uniffi::UniFFIPointerType kTabsTabsStorePointerType {
"tabs::TabsStore"_ns,
ffi_tabs_dffd_TabsStore_object_free
};
const static mozilla::uniffi::UniFFIPointerType kTabsTabsBridgedEnginePointerType {
"tabs::TabsBridgedEngine"_ns,
ffi_tabs_dffd_TabsBridgedEngine_object_free
};
// Define the data we need per-callback interface
// Define a lookup function for our callback interface info
Maybe<CallbackInterfaceInfo> UniFFIGetCallbackInterfaceInfo(uint64_t aInterfaceId) {
switch(aInterfaceId) {
default:
return Nothing();
}
}
Maybe<already_AddRefed<Promise>> UniFFICallAsync(const GlobalObject& aGlobal, uint64_t aId, const Sequence<ScaffoldingType>& aArgs, ErrorResult& aError) {
switch (aId) {
case 0: { // tabs:tabs_dffd_TabsStore_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsStore_new, aGlobal, aArgs, "tabs_dffd_TabsStore_new: "_ns, aError));
}
case 1: { // tabs:tabs_dffd_TabsStore_get_all
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsStore_get_all, aGlobal, aArgs, "tabs_dffd_TabsStore_get_all: "_ns, aError));
}
case 2: { // tabs:tabs_dffd_TabsStore_set_local_tabs
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsStore_set_local_tabs, aGlobal, aArgs, "tabs_dffd_TabsStore_set_local_tabs: "_ns, aError));
}
case 3: { // tabs:tabs_dffd_TabsStore_register_with_sync_manager
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsStore_register_with_sync_manager, aGlobal, aArgs, "tabs_dffd_TabsStore_register_with_sync_manager: "_ns, aError));
}
case 4: { // tabs:tabs_dffd_TabsStore_reset
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsStore_reset, aGlobal, aArgs, "tabs_dffd_TabsStore_reset: "_ns, aError));
}
case 5: { // tabs:tabs_dffd_TabsStore_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsStore_sync, aGlobal, aArgs, "tabs_dffd_TabsStore_sync: "_ns, aError));
}
case 6: { // tabs:tabs_dffd_TabsStore_bridged_engine
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsStore_bridged_engine, aGlobal, aArgs, "tabs_dffd_TabsStore_bridged_engine: "_ns, aError));
}
case 7: { // tabs:tabs_dffd_TabsBridgedEngine_last_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int64_t>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_last_sync, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_last_sync: "_ns, aError));
}
case 8: { // tabs:tabs_dffd_TabsBridgedEngine_set_last_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_set_last_sync, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_set_last_sync: "_ns, aError));
}
case 9: { // tabs:tabs_dffd_TabsBridgedEngine_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_sync_id, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_sync_id: "_ns, aError));
}
case 10: { // tabs:tabs_dffd_TabsBridgedEngine_reset_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_reset_sync_id, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_reset_sync_id: "_ns, aError));
}
case 11: { // tabs:tabs_dffd_TabsBridgedEngine_ensure_current_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_ensure_current_sync_id, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_ensure_current_sync_id: "_ns, aError));
}
case 12: { // tabs:tabs_dffd_TabsBridgedEngine_prepare_for_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_prepare_for_sync, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_prepare_for_sync: "_ns, aError));
}
case 13: { // tabs:tabs_dffd_TabsBridgedEngine_sync_started
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_sync_started, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_sync_started: "_ns, aError));
}
case 14: { // tabs:tabs_dffd_TabsBridgedEngine_store_incoming
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_store_incoming, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_store_incoming: "_ns, aError));
}
case 15: { // tabs:tabs_dffd_TabsBridgedEngine_apply
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_apply, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_apply: "_ns, aError));
}
case 16: { // tabs:tabs_dffd_TabsBridgedEngine_set_uploaded
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>, ScaffoldingConverter<RustBuffer>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_set_uploaded, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_set_uploaded: "_ns, aError));
}
case 17: { // tabs:tabs_dffd_TabsBridgedEngine_sync_finished
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_sync_finished, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_sync_finished: "_ns, aError));
}
case 18: { // tabs:tabs_dffd_TabsBridgedEngine_reset
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_reset, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_reset: "_ns, aError));
}
case 19: { // tabs:tabs_dffd_TabsBridgedEngine_wipe
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
return Some(CallHandler::CallAsync(tabs_dffd_TabsBridgedEngine_wipe, aGlobal, aArgs, "tabs_dffd_TabsBridgedEngine_wipe: "_ns, aError));
}
}
return Nothing();
}
bool UniFFICallSync(const GlobalObject& aGlobal, uint64_t aId, const Sequence<ScaffoldingType>& aArgs, RootedDictionary<UniFFIScaffoldingCallResult>& aReturnValue, ErrorResult& aError) {
switch (aId) {
case 0: { // tabs:tabs_dffd_TabsStore_new
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(tabs_dffd_TabsStore_new, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsStore_new: "_ns, aError);
return true;
}
case 1: { // tabs:tabs_dffd_TabsStore_get_all
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsStore_get_all, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsStore_get_all: "_ns, aError);
return true;
}
case 2: { // tabs:tabs_dffd_TabsStore_set_local_tabs
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(tabs_dffd_TabsStore_set_local_tabs, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsStore_set_local_tabs: "_ns, aError);
return true;
}
case 3: { // tabs:tabs_dffd_TabsStore_register_with_sync_manager
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsStore_register_with_sync_manager, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsStore_register_with_sync_manager: "_ns, aError);
return true;
}
case 4: { // tabs:tabs_dffd_TabsStore_reset
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsStore_reset, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsStore_reset: "_ns, aError);
return true;
}
case 5: { // tabs:tabs_dffd_TabsStore_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(tabs_dffd_TabsStore_sync, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsStore_sync: "_ns, aError);
return true;
}
case 6: { // tabs:tabs_dffd_TabsStore_bridged_engine
using CallHandler = ScaffoldingCallHandler<ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingObjectConverter<&kTabsTabsStorePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsStore_bridged_engine, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsStore_bridged_engine: "_ns, aError);
return true;
}
case 7: { // tabs:tabs_dffd_TabsBridgedEngine_last_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<int64_t>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_last_sync, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_last_sync: "_ns, aError);
return true;
}
case 8: { // tabs:tabs_dffd_TabsBridgedEngine_set_last_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_set_last_sync, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_set_last_sync: "_ns, aError);
return true;
}
case 9: { // tabs:tabs_dffd_TabsBridgedEngine_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_sync_id, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_sync_id: "_ns, aError);
return true;
}
case 10: { // tabs:tabs_dffd_TabsBridgedEngine_reset_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_reset_sync_id, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_reset_sync_id: "_ns, aError);
return true;
}
case 11: { // tabs:tabs_dffd_TabsBridgedEngine_ensure_current_sync_id
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_ensure_current_sync_id, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_ensure_current_sync_id: "_ns, aError);
return true;
}
case 12: { // tabs:tabs_dffd_TabsBridgedEngine_prepare_for_sync
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_prepare_for_sync, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_prepare_for_sync: "_ns, aError);
return true;
}
case 13: { // tabs:tabs_dffd_TabsBridgedEngine_sync_started
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_sync_started, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_sync_started: "_ns, aError);
return true;
}
case 14: { // tabs:tabs_dffd_TabsBridgedEngine_store_incoming
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_store_incoming, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_store_incoming: "_ns, aError);
return true;
}
case 15: { // tabs:tabs_dffd_TabsBridgedEngine_apply
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<RustBuffer>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_apply, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_apply: "_ns, aError);
return true;
}
case 16: { // tabs:tabs_dffd_TabsBridgedEngine_set_uploaded
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>, ScaffoldingConverter<int64_t>, ScaffoldingConverter<RustBuffer>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_set_uploaded, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_set_uploaded: "_ns, aError);
return true;
}
case 17: { // tabs:tabs_dffd_TabsBridgedEngine_sync_finished
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_sync_finished, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_sync_finished: "_ns, aError);
return true;
}
case 18: { // tabs:tabs_dffd_TabsBridgedEngine_reset
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_reset, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_reset: "_ns, aError);
return true;
}
case 19: { // tabs:tabs_dffd_TabsBridgedEngine_wipe
using CallHandler = ScaffoldingCallHandler<ScaffoldingConverter<void>, ScaffoldingObjectConverter<&kTabsTabsBridgedEnginePointerType>>;
CallHandler::CallSync(tabs_dffd_TabsBridgedEngine_wipe, aGlobal, aArgs, aReturnValue, "tabs_dffd_TabsBridgedEngine_wipe: "_ns, aError);
return true;
}
}
return false;
}
Maybe<already_AddRefed<UniFFIPointer>> UniFFIReadPointer(const GlobalObject& aGlobal, uint64_t aId, const ArrayBuffer& aArrayBuff, long aPosition, ErrorResult& aError) {
const UniFFIPointerType* type;
switch (aId) {
case 0: { // tabs:TabsStore
type = &kTabsTabsStorePointerType;
break;
}
case 1: { // tabs:TabsBridgedEngine
type = &kTabsTabsBridgedEnginePointerType;
break;
}
default:
return Nothing();
}
return Some(UniFFIPointer::Read(aArrayBuff, aPosition, type, aError));
}
bool UniFFIWritePointer(const GlobalObject& aGlobal, uint64_t aId, const UniFFIPointer& aPtr, const ArrayBuffer& aArrayBuff, long aPosition, ErrorResult& aError) {
const UniFFIPointerType* type;
switch (aId) {
case 0: { // tabs:TabsStore
type = &kTabsTabsStorePointerType;
break;
}
case 1: { // tabs:TabsBridgedEngine
type = &kTabsTabsBridgedEnginePointerType;
break;
}
default:
return false;
}
aPtr.Write(aArrayBuff, aPosition, type, aError);
return true;
}
} // namespace mozilla::uniffi
|