@succinctlabs/react-native-zcam1 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/README.md +61 -0
  2. package/Zcam1Sdk.podspec +157 -0
  3. package/app.plugin.js +11 -0
  4. package/cpp/generated/zcam1_c2pa_utils.cpp +4091 -0
  5. package/cpp/generated/zcam1_c2pa_utils.hpp +367 -0
  6. package/cpp/generated/zcam1_certs_utils.cpp +1799 -0
  7. package/cpp/generated/zcam1_certs_utils.hpp +72 -0
  8. package/cpp/generated/zcam1_verify_utils.cpp +1857 -0
  9. package/cpp/generated/zcam1_verify_utils.hpp +79 -0
  10. package/cpp/proving/generated/zcam1_proving_utils.cpp +3661 -0
  11. package/cpp/proving/generated/zcam1_proving_utils.hpp +275 -0
  12. package/cpp/proving/zcam1-proving.cpp +16 -0
  13. package/cpp/proving/zcam1-proving.h +15 -0
  14. package/cpp/zcam1-sdk.cpp +20 -0
  15. package/cpp/zcam1-sdk.h +15 -0
  16. package/ios/Zcam1Camera.swift +2945 -0
  17. package/ios/Zcam1CameraFilmStyle.swift +191 -0
  18. package/ios/Zcam1CameraViewManager.m +86 -0
  19. package/ios/Zcam1Capture.h +13 -0
  20. package/ios/Zcam1Capture.mm +500 -0
  21. package/ios/Zcam1DepthData.swift +417 -0
  22. package/ios/Zcam1Sdk.h +16 -0
  23. package/ios/Zcam1Sdk.mm +66 -0
  24. package/ios/proving/Zcam1Proving.h +16 -0
  25. package/ios/proving/Zcam1Proving.mm +66 -0
  26. package/lib/module/NativeZcam1Capture.js +12 -0
  27. package/lib/module/NativeZcam1Capture.js.map +1 -0
  28. package/lib/module/NativeZcam1Sdk.js +7 -0
  29. package/lib/module/NativeZcam1Sdk.js.map +1 -0
  30. package/lib/module/bindings.js +51 -0
  31. package/lib/module/bindings.js.map +1 -0
  32. package/lib/module/camera.js +522 -0
  33. package/lib/module/camera.js.map +1 -0
  34. package/lib/module/capture.js +120 -0
  35. package/lib/module/capture.js.map +1 -0
  36. package/lib/module/common.js +35 -0
  37. package/lib/module/common.js.map +1 -0
  38. package/lib/module/generated/zcam1_c2pa_utils-ffi.js +43 -0
  39. package/lib/module/generated/zcam1_c2pa_utils-ffi.js.map +1 -0
  40. package/lib/module/generated/zcam1_c2pa_utils.js +1202 -0
  41. package/lib/module/generated/zcam1_c2pa_utils.js.map +1 -0
  42. package/lib/module/generated/zcam1_certs_utils-ffi.js +43 -0
  43. package/lib/module/generated/zcam1_certs_utils-ffi.js.map +1 -0
  44. package/lib/module/generated/zcam1_certs_utils.js +399 -0
  45. package/lib/module/generated/zcam1_certs_utils.js.map +1 -0
  46. package/lib/module/generated/zcam1_proving_utils-ffi.js +43 -0
  47. package/lib/module/generated/zcam1_proving_utils-ffi.js.map +1 -0
  48. package/lib/module/generated/zcam1_proving_utils.js +515 -0
  49. package/lib/module/generated/zcam1_proving_utils.js.map +1 -0
  50. package/lib/module/generated/zcam1_verify_utils-ffi.js +43 -0
  51. package/lib/module/generated/zcam1_verify_utils-ffi.js.map +1 -0
  52. package/lib/module/generated/zcam1_verify_utils.js +252 -0
  53. package/lib/module/generated/zcam1_verify_utils.js.map +1 -0
  54. package/lib/module/index.js +31 -0
  55. package/lib/module/index.js.map +1 -0
  56. package/lib/module/package.json +1 -0
  57. package/lib/module/picker.js +222 -0
  58. package/lib/module/picker.js.map +1 -0
  59. package/lib/module/proving/NativeZcam1Proving.js +7 -0
  60. package/lib/module/proving/NativeZcam1Proving.js.map +1 -0
  61. package/lib/module/proving/bindings.js +46 -0
  62. package/lib/module/proving/bindings.js.map +1 -0
  63. package/lib/module/proving/index.js +5 -0
  64. package/lib/module/proving/index.js.map +1 -0
  65. package/lib/module/proving/prove.js +346 -0
  66. package/lib/module/proving/prove.js.map +1 -0
  67. package/lib/module/utils.js +27 -0
  68. package/lib/module/utils.js.map +1 -0
  69. package/lib/module/verify.js +82 -0
  70. package/lib/module/verify.js.map +1 -0
  71. package/lib/typescript/package.json +1 -0
  72. package/lib/typescript/src/NativeZcam1Capture.d.ts +280 -0
  73. package/lib/typescript/src/NativeZcam1Capture.d.ts.map +1 -0
  74. package/lib/typescript/src/NativeZcam1Sdk.d.ts +8 -0
  75. package/lib/typescript/src/NativeZcam1Sdk.d.ts.map +1 -0
  76. package/lib/typescript/src/bindings.d.ts +14 -0
  77. package/lib/typescript/src/bindings.d.ts.map +1 -0
  78. package/lib/typescript/src/camera.d.ts +300 -0
  79. package/lib/typescript/src/camera.d.ts.map +1 -0
  80. package/lib/typescript/src/capture.d.ts +59 -0
  81. package/lib/typescript/src/capture.d.ts.map +1 -0
  82. package/lib/typescript/src/common.d.ts +10 -0
  83. package/lib/typescript/src/common.d.ts.map +1 -0
  84. package/lib/typescript/src/generated/zcam1_c2pa_utils-ffi.d.ts +175 -0
  85. package/lib/typescript/src/generated/zcam1_c2pa_utils-ffi.d.ts.map +1 -0
  86. package/lib/typescript/src/generated/zcam1_c2pa_utils.d.ts +811 -0
  87. package/lib/typescript/src/generated/zcam1_c2pa_utils.d.ts.map +1 -0
  88. package/lib/typescript/src/generated/zcam1_certs_utils-ffi.d.ts +82 -0
  89. package/lib/typescript/src/generated/zcam1_certs_utils-ffi.d.ts.map +1 -0
  90. package/lib/typescript/src/generated/zcam1_certs_utils.d.ts +413 -0
  91. package/lib/typescript/src/generated/zcam1_certs_utils.d.ts.map +1 -0
  92. package/lib/typescript/src/generated/zcam1_proving_utils-ffi.d.ts +153 -0
  93. package/lib/typescript/src/generated/zcam1_proving_utils-ffi.d.ts.map +1 -0
  94. package/lib/typescript/src/generated/zcam1_proving_utils.d.ts +321 -0
  95. package/lib/typescript/src/generated/zcam1_proving_utils.d.ts.map +1 -0
  96. package/lib/typescript/src/generated/zcam1_verify_utils-ffi.d.ts +84 -0
  97. package/lib/typescript/src/generated/zcam1_verify_utils-ffi.d.ts.map +1 -0
  98. package/lib/typescript/src/generated/zcam1_verify_utils.d.ts +286 -0
  99. package/lib/typescript/src/generated/zcam1_verify_utils.d.ts.map +1 -0
  100. package/lib/typescript/src/index.d.ts +29 -0
  101. package/lib/typescript/src/index.d.ts.map +1 -0
  102. package/lib/typescript/src/picker.d.ts +103 -0
  103. package/lib/typescript/src/picker.d.ts.map +1 -0
  104. package/lib/typescript/src/proving/NativeZcam1Proving.d.ts +8 -0
  105. package/lib/typescript/src/proving/NativeZcam1Proving.d.ts.map +1 -0
  106. package/lib/typescript/src/proving/bindings.d.ts +8 -0
  107. package/lib/typescript/src/proving/bindings.d.ts.map +1 -0
  108. package/lib/typescript/src/proving/index.d.ts +3 -0
  109. package/lib/typescript/src/proving/index.d.ts.map +1 -0
  110. package/lib/typescript/src/proving/prove.d.ts +74 -0
  111. package/lib/typescript/src/proving/prove.d.ts.map +1 -0
  112. package/lib/typescript/src/utils.d.ts +2 -0
  113. package/lib/typescript/src/utils.d.ts.map +1 -0
  114. package/lib/typescript/src/verify.d.ts +45 -0
  115. package/lib/typescript/src/verify.d.ts.map +1 -0
  116. package/package.json +118 -0
  117. package/src/NativeZcam1Capture.ts +335 -0
  118. package/src/NativeZcam1Sdk.ts +10 -0
  119. package/src/bindings.tsx +49 -0
  120. package/src/camera.tsx +705 -0
  121. package/src/capture.tsx +165 -0
  122. package/src/common.tsx +46 -0
  123. package/src/generated/zcam1_c2pa_utils-ffi.ts +456 -0
  124. package/src/generated/zcam1_c2pa_utils.ts +1866 -0
  125. package/src/generated/zcam1_certs_utils-ffi.ts +187 -0
  126. package/src/generated/zcam1_certs_utils.ts +549 -0
  127. package/src/generated/zcam1_proving_utils-ffi.ts +374 -0
  128. package/src/generated/zcam1_proving_utils.ts +804 -0
  129. package/src/generated/zcam1_verify_utils-ffi.ts +196 -0
  130. package/src/generated/zcam1_verify_utils.ts +372 -0
  131. package/src/index.ts +73 -0
  132. package/src/picker.tsx +342 -0
  133. package/src/proving/NativeZcam1Proving.ts +10 -0
  134. package/src/proving/bindings.tsx +50 -0
  135. package/src/proving/index.ts +8 -0
  136. package/src/proving/prove.tsx +492 -0
  137. package/src/utils.ts +38 -0
  138. package/src/verify.tsx +119 -0
  139. package/turbo.json +27 -0
@@ -0,0 +1,4091 @@
1
+ // This file was autogenerated by some hot garbage in the
2
+ // `uniffi-bindgen-react-native` crate. Trust me, you don't want to mess with
3
+ // it!
4
+ #include "zcam1_c2pa_utils.hpp"
5
+
6
+ #include "UniffiJsiTypes.h"
7
+ #include <iostream>
8
+ #include <map>
9
+ #include <stdexcept>
10
+ #include <thread>
11
+ #include <utility>
12
+
13
+ namespace react = facebook::react;
14
+ namespace jsi = facebook::jsi;
15
+
16
+ // Calling into Rust.
17
+ extern "C" {
18
+ typedef void (*UniffiRustFutureContinuationCallback)(uint64_t data,
19
+ int8_t poll_result);
20
+ typedef void (*UniffiForeignFutureFree)(uint64_t handle);
21
+ typedef void (*UniffiCallbackInterfaceFree)(uint64_t handle);
22
+ typedef struct UniffiForeignFuture {
23
+ uint64_t handle;
24
+ UniffiForeignFutureFree free;
25
+ } UniffiForeignFuture;
26
+ typedef struct UniffiForeignFutureStructU8 {
27
+ uint8_t return_value;
28
+ RustCallStatus call_status;
29
+ } UniffiForeignFutureStructU8;
30
+ typedef void (*UniffiForeignFutureCompleteU8)(
31
+ uint64_t callback_data, UniffiForeignFutureStructU8 result);
32
+ typedef struct UniffiForeignFutureStructI8 {
33
+ int8_t return_value;
34
+ RustCallStatus call_status;
35
+ } UniffiForeignFutureStructI8;
36
+ typedef void (*UniffiForeignFutureCompleteI8)(
37
+ uint64_t callback_data, UniffiForeignFutureStructI8 result);
38
+ typedef struct UniffiForeignFutureStructU16 {
39
+ uint16_t return_value;
40
+ RustCallStatus call_status;
41
+ } UniffiForeignFutureStructU16;
42
+ typedef void (*UniffiForeignFutureCompleteU16)(
43
+ uint64_t callback_data, UniffiForeignFutureStructU16 result);
44
+ typedef struct UniffiForeignFutureStructI16 {
45
+ int16_t return_value;
46
+ RustCallStatus call_status;
47
+ } UniffiForeignFutureStructI16;
48
+ typedef void (*UniffiForeignFutureCompleteI16)(
49
+ uint64_t callback_data, UniffiForeignFutureStructI16 result);
50
+ typedef struct UniffiForeignFutureStructU32 {
51
+ uint32_t return_value;
52
+ RustCallStatus call_status;
53
+ } UniffiForeignFutureStructU32;
54
+ typedef void (*UniffiForeignFutureCompleteU32)(
55
+ uint64_t callback_data, UniffiForeignFutureStructU32 result);
56
+ typedef struct UniffiForeignFutureStructI32 {
57
+ int32_t return_value;
58
+ RustCallStatus call_status;
59
+ } UniffiForeignFutureStructI32;
60
+ typedef void (*UniffiForeignFutureCompleteI32)(
61
+ uint64_t callback_data, UniffiForeignFutureStructI32 result);
62
+ typedef struct UniffiForeignFutureStructU64 {
63
+ uint64_t return_value;
64
+ RustCallStatus call_status;
65
+ } UniffiForeignFutureStructU64;
66
+ typedef void (*UniffiForeignFutureCompleteU64)(
67
+ uint64_t callback_data, UniffiForeignFutureStructU64 result);
68
+ typedef struct UniffiForeignFutureStructI64 {
69
+ int64_t return_value;
70
+ RustCallStatus call_status;
71
+ } UniffiForeignFutureStructI64;
72
+ typedef void (*UniffiForeignFutureCompleteI64)(
73
+ uint64_t callback_data, UniffiForeignFutureStructI64 result);
74
+ typedef struct UniffiForeignFutureStructF32 {
75
+ float return_value;
76
+ RustCallStatus call_status;
77
+ } UniffiForeignFutureStructF32;
78
+ typedef void (*UniffiForeignFutureCompleteF32)(
79
+ uint64_t callback_data, UniffiForeignFutureStructF32 result);
80
+ typedef struct UniffiForeignFutureStructF64 {
81
+ double return_value;
82
+ RustCallStatus call_status;
83
+ } UniffiForeignFutureStructF64;
84
+ typedef void (*UniffiForeignFutureCompleteF64)(
85
+ uint64_t callback_data, UniffiForeignFutureStructF64 result);
86
+ typedef struct UniffiForeignFutureStructPointer {
87
+ void *return_value;
88
+ RustCallStatus call_status;
89
+ } UniffiForeignFutureStructPointer;
90
+ typedef void (*UniffiForeignFutureCompletePointer)(
91
+ uint64_t callback_data, UniffiForeignFutureStructPointer result);
92
+ typedef struct UniffiForeignFutureStructRustBuffer {
93
+ RustBuffer return_value;
94
+ RustCallStatus call_status;
95
+ } UniffiForeignFutureStructRustBuffer;
96
+ typedef void (*UniffiForeignFutureCompleteRustBuffer)(
97
+ uint64_t callback_data, UniffiForeignFutureStructRustBuffer result);
98
+ typedef struct UniffiForeignFutureStructVoid {
99
+ RustCallStatus call_status;
100
+ } UniffiForeignFutureStructVoid;
101
+ typedef void (*UniffiForeignFutureCompleteVoid)(
102
+ uint64_t callback_data, UniffiForeignFutureStructVoid result);
103
+ void *uniffi_zcam1_c2pa_utils_fn_clone_manifest(void *ptr,
104
+ RustCallStatus *uniffi_out_err);
105
+ void uniffi_zcam1_c2pa_utils_fn_free_manifest(void *ptr,
106
+ RustCallStatus *uniffi_out_err);
107
+ RustBuffer uniffi_zcam1_c2pa_utils_fn_method_manifest_bindings(
108
+ void *ptr, RustCallStatus *uniffi_out_err);
109
+ RustBuffer uniffi_zcam1_c2pa_utils_fn_method_manifest_capture_metadata_action(
110
+ void *ptr, RustCallStatus *uniffi_out_err);
111
+ RustBuffer uniffi_zcam1_c2pa_utils_fn_method_manifest_proof(
112
+ void *ptr, RustCallStatus *uniffi_out_err);
113
+ void *
114
+ uniffi_zcam1_c2pa_utils_fn_clone_manifesteditor(void *ptr,
115
+ RustCallStatus *uniffi_out_err);
116
+ void uniffi_zcam1_c2pa_utils_fn_free_manifesteditor(
117
+ void *ptr, RustCallStatus *uniffi_out_err);
118
+ void *uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_from_manifest(
119
+ RustBuffer path, RustBuffer key_tag, RustBuffer certs,
120
+ RustCallStatus *uniffi_out_err);
121
+ void *uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_new(
122
+ RustBuffer path, RustBuffer key_tag, RustBuffer certs,
123
+ RustCallStatus *uniffi_out_err);
124
+ void uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_assertion(
125
+ void *ptr, RustBuffer label, RustBuffer data,
126
+ RustCallStatus *uniffi_out_err);
127
+ RustBuffer
128
+ uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_photo_metadata_action(
129
+ void *ptr, RustBuffer parameters, RustBuffer when,
130
+ RustCallStatus *uniffi_out_err);
131
+ void uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_title(
132
+ void *ptr, RustBuffer title, RustCallStatus *uniffi_out_err);
133
+ RustBuffer
134
+ uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_video_metadata_action(
135
+ void *ptr, RustBuffer parameters, RustBuffer when,
136
+ RustCallStatus *uniffi_out_err);
137
+ /*handle*/ uint64_t
138
+ uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_embed_manifest_to_file(
139
+ void *ptr, RustBuffer destination, RustBuffer format);
140
+ int8_t uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_remove_assertion(
141
+ void *ptr, RustBuffer label, RustCallStatus *uniffi_out_err);
142
+ void *
143
+ uniffi_zcam1_c2pa_utils_fn_clone_manifeststore(void *ptr,
144
+ RustCallStatus *uniffi_out_err);
145
+ void uniffi_zcam1_c2pa_utils_fn_free_manifeststore(
146
+ void *ptr, RustCallStatus *uniffi_out_err);
147
+ void *uniffi_zcam1_c2pa_utils_fn_method_manifeststore_active_manifest(
148
+ void *ptr, RustCallStatus *uniffi_out_err);
149
+ /*handle*/ uint64_t
150
+ uniffi_zcam1_c2pa_utils_fn_func_authenticity_status(RustBuffer path);
151
+ RustBuffer
152
+ uniffi_zcam1_c2pa_utils_fn_func_compute_hash(RustBuffer path,
153
+ RustCallStatus *uniffi_out_err);
154
+ RustBuffer uniffi_zcam1_c2pa_utils_fn_func_compute_hash_from_buffer(
155
+ RustBuffer buffer, RustBuffer format, RustCallStatus *uniffi_out_err);
156
+ void *uniffi_zcam1_c2pa_utils_fn_func_extract_manifest(
157
+ RustBuffer path, RustCallStatus *uniffi_out_err);
158
+ RustBuffer uniffi_zcam1_c2pa_utils_fn_func_format_from_path(
159
+ RustBuffer path, RustCallStatus *uniffi_out_err);
160
+ RustBuffer
161
+ ffi_zcam1_c2pa_utils_rustbuffer_alloc(uint64_t size,
162
+ RustCallStatus *uniffi_out_err);
163
+ RustBuffer
164
+ ffi_zcam1_c2pa_utils_rustbuffer_from_bytes(ForeignBytes bytes,
165
+ RustCallStatus *uniffi_out_err);
166
+ void ffi_zcam1_c2pa_utils_rustbuffer_free(RustBuffer buf,
167
+ RustCallStatus *uniffi_out_err);
168
+ RustBuffer
169
+ ffi_zcam1_c2pa_utils_rustbuffer_reserve(RustBuffer buf, uint64_t additional,
170
+ RustCallStatus *uniffi_out_err);
171
+ void ffi_zcam1_c2pa_utils_rust_future_poll_u8(
172
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
173
+ /*handle*/ uint64_t callback_data);
174
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_u8(
175
+ /*handle*/ uint64_t handle);
176
+ void ffi_zcam1_c2pa_utils_rust_future_free_u8(
177
+ /*handle*/ uint64_t handle);
178
+ uint8_t ffi_zcam1_c2pa_utils_rust_future_complete_u8(
179
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
180
+ void ffi_zcam1_c2pa_utils_rust_future_poll_i8(
181
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
182
+ /*handle*/ uint64_t callback_data);
183
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_i8(
184
+ /*handle*/ uint64_t handle);
185
+ void ffi_zcam1_c2pa_utils_rust_future_free_i8(
186
+ /*handle*/ uint64_t handle);
187
+ int8_t ffi_zcam1_c2pa_utils_rust_future_complete_i8(
188
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
189
+ void ffi_zcam1_c2pa_utils_rust_future_poll_u16(
190
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
191
+ /*handle*/ uint64_t callback_data);
192
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_u16(
193
+ /*handle*/ uint64_t handle);
194
+ void ffi_zcam1_c2pa_utils_rust_future_free_u16(
195
+ /*handle*/ uint64_t handle);
196
+ uint16_t ffi_zcam1_c2pa_utils_rust_future_complete_u16(
197
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
198
+ void ffi_zcam1_c2pa_utils_rust_future_poll_i16(
199
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
200
+ /*handle*/ uint64_t callback_data);
201
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_i16(
202
+ /*handle*/ uint64_t handle);
203
+ void ffi_zcam1_c2pa_utils_rust_future_free_i16(
204
+ /*handle*/ uint64_t handle);
205
+ int16_t ffi_zcam1_c2pa_utils_rust_future_complete_i16(
206
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
207
+ void ffi_zcam1_c2pa_utils_rust_future_poll_u32(
208
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
209
+ /*handle*/ uint64_t callback_data);
210
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_u32(
211
+ /*handle*/ uint64_t handle);
212
+ void ffi_zcam1_c2pa_utils_rust_future_free_u32(
213
+ /*handle*/ uint64_t handle);
214
+ uint32_t ffi_zcam1_c2pa_utils_rust_future_complete_u32(
215
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
216
+ void ffi_zcam1_c2pa_utils_rust_future_poll_i32(
217
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
218
+ /*handle*/ uint64_t callback_data);
219
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_i32(
220
+ /*handle*/ uint64_t handle);
221
+ void ffi_zcam1_c2pa_utils_rust_future_free_i32(
222
+ /*handle*/ uint64_t handle);
223
+ int32_t ffi_zcam1_c2pa_utils_rust_future_complete_i32(
224
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
225
+ void ffi_zcam1_c2pa_utils_rust_future_poll_u64(
226
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
227
+ /*handle*/ uint64_t callback_data);
228
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_u64(
229
+ /*handle*/ uint64_t handle);
230
+ void ffi_zcam1_c2pa_utils_rust_future_free_u64(
231
+ /*handle*/ uint64_t handle);
232
+ uint64_t ffi_zcam1_c2pa_utils_rust_future_complete_u64(
233
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
234
+ void ffi_zcam1_c2pa_utils_rust_future_poll_i64(
235
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
236
+ /*handle*/ uint64_t callback_data);
237
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_i64(
238
+ /*handle*/ uint64_t handle);
239
+ void ffi_zcam1_c2pa_utils_rust_future_free_i64(
240
+ /*handle*/ uint64_t handle);
241
+ int64_t ffi_zcam1_c2pa_utils_rust_future_complete_i64(
242
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
243
+ void ffi_zcam1_c2pa_utils_rust_future_poll_f32(
244
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
245
+ /*handle*/ uint64_t callback_data);
246
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_f32(
247
+ /*handle*/ uint64_t handle);
248
+ void ffi_zcam1_c2pa_utils_rust_future_free_f32(
249
+ /*handle*/ uint64_t handle);
250
+ float ffi_zcam1_c2pa_utils_rust_future_complete_f32(
251
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
252
+ void ffi_zcam1_c2pa_utils_rust_future_poll_f64(
253
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
254
+ /*handle*/ uint64_t callback_data);
255
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_f64(
256
+ /*handle*/ uint64_t handle);
257
+ void ffi_zcam1_c2pa_utils_rust_future_free_f64(
258
+ /*handle*/ uint64_t handle);
259
+ double ffi_zcam1_c2pa_utils_rust_future_complete_f64(
260
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
261
+ void ffi_zcam1_c2pa_utils_rust_future_poll_pointer(
262
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
263
+ /*handle*/ uint64_t callback_data);
264
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_pointer(
265
+ /*handle*/ uint64_t handle);
266
+ void ffi_zcam1_c2pa_utils_rust_future_free_pointer(
267
+ /*handle*/ uint64_t handle);
268
+ void *ffi_zcam1_c2pa_utils_rust_future_complete_pointer(
269
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
270
+ void ffi_zcam1_c2pa_utils_rust_future_poll_rust_buffer(
271
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
272
+ /*handle*/ uint64_t callback_data);
273
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_rust_buffer(
274
+ /*handle*/ uint64_t handle);
275
+ void ffi_zcam1_c2pa_utils_rust_future_free_rust_buffer(
276
+ /*handle*/ uint64_t handle);
277
+ RustBuffer ffi_zcam1_c2pa_utils_rust_future_complete_rust_buffer(
278
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
279
+ void ffi_zcam1_c2pa_utils_rust_future_poll_void(
280
+ /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
281
+ /*handle*/ uint64_t callback_data);
282
+ void ffi_zcam1_c2pa_utils_rust_future_cancel_void(
283
+ /*handle*/ uint64_t handle);
284
+ void ffi_zcam1_c2pa_utils_rust_future_free_void(
285
+ /*handle*/ uint64_t handle);
286
+ void ffi_zcam1_c2pa_utils_rust_future_complete_void(
287
+ /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
288
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_func_authenticity_status();
289
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_func_compute_hash();
290
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_func_compute_hash_from_buffer();
291
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_func_extract_manifest();
292
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_func_format_from_path();
293
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_method_manifest_bindings();
294
+ uint16_t
295
+ uniffi_zcam1_c2pa_utils_checksum_method_manifest_capture_metadata_action();
296
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_method_manifest_proof();
297
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_assertion();
298
+ uint16_t
299
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_photo_metadata_action();
300
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_title();
301
+ uint16_t
302
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_video_metadata_action();
303
+ uint16_t
304
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_embed_manifest_to_file();
305
+ uint16_t
306
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_remove_assertion();
307
+ uint16_t
308
+ uniffi_zcam1_c2pa_utils_checksum_method_manifeststore_active_manifest();
309
+ uint16_t
310
+ uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_from_manifest();
311
+ uint16_t uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_new();
312
+ uint32_t ffi_zcam1_c2pa_utils_uniffi_contract_version();
313
+ }
314
+
315
+ namespace uniffi::zcam1_c2pa_utils {
316
+ template <typename T> struct Bridging;
317
+
318
+ using namespace facebook;
319
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
320
+
321
+ template <typename T> struct Bridging<ReferenceHolder<T>> {
322
+ static jsi::Value jsNew(jsi::Runtime &rt) {
323
+ auto holder = jsi::Object(rt);
324
+ return holder;
325
+ }
326
+ static T fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
327
+ const jsi::Value &value) {
328
+ auto obj = value.asObject(rt);
329
+ if (obj.hasProperty(rt, "pointee")) {
330
+ auto pointee = obj.getProperty(rt, "pointee");
331
+ return uniffi::zcam1_c2pa_utils::Bridging<T>::fromJs(rt, callInvoker,
332
+ pointee);
333
+ }
334
+ throw jsi::JSError(rt,
335
+ "Expected ReferenceHolder to have a pointee property. "
336
+ "This is likely a bug in uniffi-bindgen-react-native");
337
+ }
338
+ };
339
+ } // namespace uniffi::zcam1_c2pa_utils
340
+ namespace uniffi::zcam1_c2pa_utils {
341
+ using namespace facebook;
342
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
343
+
344
+ template <> struct Bridging<RustBuffer> {
345
+ static RustBuffer rustbuffer_alloc(int32_t size) {
346
+ RustCallStatus status = {UNIFFI_CALL_STATUS_OK};
347
+ return ffi_zcam1_c2pa_utils_rustbuffer_alloc(size, &status);
348
+ }
349
+
350
+ static void rustbuffer_free(RustBuffer buf) {
351
+ RustCallStatus status = {UNIFFI_CALL_STATUS_OK};
352
+ ffi_zcam1_c2pa_utils_rustbuffer_free(buf, &status);
353
+ }
354
+
355
+ static RustBuffer rustbuffer_from_bytes(ForeignBytes bytes) {
356
+ RustCallStatus status = {UNIFFI_CALL_STATUS_OK};
357
+ return ffi_zcam1_c2pa_utils_rustbuffer_from_bytes(bytes, &status);
358
+ }
359
+
360
+ static RustBuffer fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker>,
361
+ const jsi::Value &value) {
362
+ try {
363
+ auto buffer =
364
+ uniffi_jsi::Bridging<jsi::ArrayBuffer>::value_to_arraybuffer(rt,
365
+ value);
366
+ auto bytes = ForeignBytes{
367
+ .len = static_cast<int32_t>(buffer.length(rt)),
368
+ .data = buffer.data(rt),
369
+ };
370
+
371
+ // This buffer is constructed from foreign bytes. Rust scaffolding copies
372
+ // the bytes, to make the RustBuffer.
373
+ auto buf = rustbuffer_from_bytes(bytes);
374
+ // Once it leaves this function, the buffer is immediately passed back
375
+ // into Rust, where it's used to deserialize into the Rust versions of the
376
+ // arguments. At that point, the copy is destroyed.
377
+ return buf;
378
+ } catch (const std::logic_error &e) {
379
+ throw jsi::JSError(rt, e.what());
380
+ }
381
+ }
382
+
383
+ static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker>,
384
+ RustBuffer buf) {
385
+ // We need to make a copy of the bytes from Rust's memory space into
386
+ // Javascripts memory space. We need to do this because the two languages
387
+ // manages memory very differently: a garbage collector needs to track all
388
+ // the memory at runtime, Rust is doing it all closer to compile time.
389
+ uint8_t *bytes = new uint8_t[buf.len];
390
+ std::memcpy(bytes, buf.data, buf.len);
391
+
392
+ // Construct an ArrayBuffer with copy of the bytes from the RustBuffer.
393
+ auto payload = std::make_shared<uniffi_jsi::CMutableBuffer>(
394
+ uniffi_jsi::CMutableBuffer((uint8_t *)bytes, buf.len));
395
+ auto arrayBuffer = jsi::ArrayBuffer(rt, payload);
396
+
397
+ // Once we have a Javascript version, we no longer need the Rust version, so
398
+ // we can call into Rust to tell it it's okay to free that memory.
399
+ rustbuffer_free(buf);
400
+
401
+ // Finally, return the ArrayBuffer.
402
+ return uniffi_jsi::Bridging<jsi::ArrayBuffer>::arraybuffer_to_value(
403
+ rt, arrayBuffer);
404
+ ;
405
+ }
406
+ };
407
+
408
+ } // namespace uniffi::zcam1_c2pa_utils
409
+
410
+ namespace uniffi::zcam1_c2pa_utils {
411
+ using namespace facebook;
412
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
413
+
414
+ template <> struct Bridging<RustCallStatus> {
415
+ static jsi::Value jsSuccess(jsi::Runtime &rt) {
416
+ auto statusObject = jsi::Object(rt);
417
+ statusObject.setProperty(rt, "code", jsi::Value(rt, UNIFFI_CALL_STATUS_OK));
418
+ return statusObject;
419
+ }
420
+ static RustCallStatus rustSuccess(jsi::Runtime &rt) {
421
+ return {UNIFFI_CALL_STATUS_OK};
422
+ }
423
+ static void copyIntoJs(jsi::Runtime &rt,
424
+ std::shared_ptr<CallInvoker> callInvoker,
425
+ const RustCallStatus status,
426
+ const jsi::Value &jsStatus) {
427
+ auto statusObject = jsStatus.asObject(rt);
428
+ if (status.error_buf.data != nullptr) {
429
+ auto rbuf = Bridging<RustBuffer>::toJs(rt, callInvoker, status.error_buf);
430
+ statusObject.setProperty(rt, "errorBuf", rbuf);
431
+ }
432
+ if (status.code != UNIFFI_CALL_STATUS_OK) {
433
+ auto code =
434
+ uniffi_jsi::Bridging<uint8_t>::toJs(rt, callInvoker, status.code);
435
+ statusObject.setProperty(rt, "code", code);
436
+ }
437
+ }
438
+
439
+ static RustCallStatus fromJs(jsi::Runtime &rt,
440
+ std::shared_ptr<CallInvoker> invoker,
441
+ const jsi::Value &jsStatus) {
442
+ RustCallStatus status;
443
+ auto statusObject = jsStatus.asObject(rt);
444
+ if (statusObject.hasProperty(rt, "errorBuf")) {
445
+ auto rbuf = statusObject.getProperty(rt, "errorBuf");
446
+ status.error_buf = Bridging<RustBuffer>::fromJs(rt, invoker, rbuf);
447
+ }
448
+ if (statusObject.hasProperty(rt, "code")) {
449
+ auto code = statusObject.getProperty(rt, "code");
450
+ status.code = uniffi_jsi::Bridging<uint8_t>::fromJs(rt, invoker, code);
451
+ }
452
+ return status;
453
+ }
454
+
455
+ static void copyFromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> invoker,
456
+ const jsi::Value &jsStatus, RustCallStatus *status) {
457
+ auto statusObject = jsStatus.asObject(rt);
458
+ if (statusObject.hasProperty(rt, "errorBuf")) {
459
+ auto rbuf = statusObject.getProperty(rt, "errorBuf");
460
+ status->error_buf = Bridging<RustBuffer>::fromJs(rt, invoker, rbuf);
461
+ }
462
+ if (statusObject.hasProperty(rt, "code")) {
463
+ auto code = statusObject.getProperty(rt, "code");
464
+ status->code = uniffi_jsi::Bridging<uint8_t>::fromJs(rt, invoker, code);
465
+ }
466
+ }
467
+ };
468
+
469
+ } // namespace uniffi::zcam1_c2pa_utils
470
+ // In other uniffi bindings, it is assumed that the foreign language holds on
471
+ // to the vtable, which the Rust just gets a pointer to.
472
+ // Here, we need to hold on to them, but also be able to clear them at just the
473
+ // right time so we can support hot-reloading.
474
+ namespace uniffi::zcam1_c2pa_utils::registry {
475
+ template <typename T> class VTableHolder {
476
+ public:
477
+ T vtable;
478
+ VTableHolder(T v) : vtable(v) {}
479
+ };
480
+
481
+ // Mutex to bind the storage and setting of vtable together.
482
+ // We declare it here, but the lock is taken by callers of the putTable
483
+ // method who are also sending a pointer to Rust.
484
+ static std::mutex vtableMutex;
485
+
486
+ // Registry to hold all vtables so they persist even when JS objects are GC'd.
487
+ // The only reason this exists is to prevent a dangling pointer in the
488
+ // Rust machinery: i.e. we don't need to access or write to this registry
489
+ // after startup.
490
+ // Registry to hold all vtables so they persist even when JS objects are GC'd.
491
+ // Maps string identifiers to vtable holders using type erasure
492
+ static std::unordered_map<std::string, std::shared_ptr<void>> vtableRegistry;
493
+
494
+ // Add a vtable to the registry with an identifier
495
+ template <typename T>
496
+ static T *putTable(std::string_view identifier, T vtable) {
497
+ auto holder = std::make_shared<VTableHolder<T>>(vtable);
498
+ // Store the raw pointer to the vtable before type erasure
499
+ T *rawPtr = &(holder->vtable);
500
+ // Store the holder using type erasure with the string identifier
501
+ vtableRegistry[std::string(identifier)] = std::shared_ptr<void>(holder);
502
+ return rawPtr;
503
+ }
504
+
505
+ // Clear the registry.
506
+ //
507
+ // Conceptually, this is called after teardown of the module (i.e. after
508
+ // teardown of the jsi::Runtime). However, because Rust is dropping callbacks
509
+ // because the Runtime is being torn down, we must keep the registry intact
510
+ // until after the runtime goes away.
511
+ //
512
+ // Therefore, in practice we should call this when the next runtime is
513
+ // being stood up.
514
+ static void clearRegistry() {
515
+ std::lock_guard<std::mutex> lock(vtableMutex);
516
+ vtableRegistry.clear();
517
+ }
518
+ } // namespace uniffi::zcam1_c2pa_utils::registry
519
+
520
+ // This calls into Rust.
521
+ // Implementation of callback function calling from Rust to JS
522
+ // RustFutureContinuationCallback
523
+
524
+ // Callback function:
525
+ // uniffi::zcam1_c2pa_utils::cb::rustfuturecontinuationcallback::UniffiRustFutureContinuationCallback
526
+ //
527
+ // We have the following constraints:
528
+ // - we need to pass a function pointer to Rust.
529
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
530
+ // - function pointers can't store state, so we can't use a lamda.
531
+ //
532
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
533
+ // function calls the lambda, which itself calls the `body` which then calls
534
+ // into JS.
535
+ //
536
+ // We then give the `callback` function pointer to Rust which will call the
537
+ // lambda sometime in the future.
538
+ namespace uniffi::zcam1_c2pa_utils::cb::rustfuturecontinuationcallback {
539
+ using namespace facebook;
540
+
541
+ // We need to store a lambda in a global so we can call it from
542
+ // a function pointer. The function pointer is passed to Rust.
543
+ static std::function<void(uint64_t, int8_t)> rsLambda = nullptr;
544
+
545
+ // This is the main body of the callback. It's called from the lambda,
546
+ // which itself is called from the callback function which is passed to Rust.
547
+ static void body(jsi::Runtime &rt,
548
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
549
+ std::shared_ptr<jsi::Value> callbackValue, uint64_t rs_data,
550
+ int8_t rs_pollResult) {
551
+
552
+ // Convert the arguments from Rust, into jsi::Values.
553
+ // We'll use the Bridging class to do this…
554
+ auto js_data = uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_data);
555
+ auto js_pollResult =
556
+ uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, rs_pollResult);
557
+
558
+ // Now we are ready to call the callback.
559
+ // We are already on the JS thread, because this `body` function was
560
+ // invoked from the CallInvoker.
561
+ try {
562
+ // Getting the callback function
563
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
564
+ auto uniffiResult = cb.call(rt, js_data, js_pollResult);
565
+
566
+ } catch (const jsi::JSError &error) {
567
+ std::cout << "Error in callback UniffiRustFutureContinuationCallback: "
568
+ << error.what() << std::endl;
569
+ throw error;
570
+ }
571
+ }
572
+
573
+ static void callback(uint64_t rs_data, int8_t rs_pollResult) {
574
+ // If the runtime has shutdown, then there is no point in trying to
575
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
576
+ //
577
+ // Answer: the module destructor calls into callback `cleanup` method,
578
+ // which nulls out the rsLamda.
579
+ //
580
+ // If rsLamda is null, then there is no runtime to call into.
581
+ if (rsLambda == nullptr) {
582
+ // This only occurs when destructors are calling into Rust free/drop,
583
+ // which causes the JS callback to be dropped.
584
+ return;
585
+ }
586
+
587
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
588
+ // are all in the lambda.
589
+ rsLambda(rs_data, rs_pollResult);
590
+ }
591
+
592
+ static UniffiRustFutureContinuationCallback
593
+ makeCallbackFunction( // uniffi::zcam1_c2pa_utils::cb::rustfuturecontinuationcallback
594
+ jsi::Runtime &rt,
595
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
596
+ const jsi::Value &value) {
597
+ if (rsLambda != nullptr) {
598
+ // `makeCallbackFunction` is called in two circumstances:
599
+ //
600
+ // 1. at startup, when initializing callback interface vtables.
601
+ // 2. when polling futures. This happens at least once per future that is
602
+ // exposed to Javascript. We know that this is always the same function,
603
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
604
+ //
605
+ // We can therefore return the callback function without making anything
606
+ // new if we've been initialized already.
607
+ return callback;
608
+ }
609
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
610
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
611
+ rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_data,
612
+ int8_t rs_pollResult) {
613
+ // We immediately make a lambda which will do the work of transforming the
614
+ // arguments into JSI values and calling the callback.
615
+ uniffi_runtime::UniffiCallFunc jsLambda =
616
+ [callInvoker, callbackValue, rs_data,
617
+ rs_pollResult](jsi::Runtime &rt) mutable {
618
+ body(rt, callInvoker, callbackValue, rs_data, rs_pollResult);
619
+ };
620
+ // We'll then call that lambda from the callInvoker which will
621
+ // look after calling it on the correct thread.
622
+
623
+ callInvoker->invokeNonBlocking(rt, jsLambda);
624
+ };
625
+ return callback;
626
+ }
627
+
628
+ // This method is called from the destructor of NativeZcam1C2paUtils, which only
629
+ // happens when the jsi::Runtime is being destroyed.
630
+ static void cleanup() {
631
+ // The lambda holds a reference to the the Runtime, so when this is nulled
632
+ // out, then the pointer will no longer be left dangling.
633
+ rsLambda = nullptr;
634
+ }
635
+ } // namespace uniffi::zcam1_c2pa_utils::cb::rustfuturecontinuationcallback
636
+ // Implementation of callback function calling from JS to Rust
637
+ // ForeignFutureFree, passed from Rust to JS as part of async callbacks.
638
+ namespace uniffi::zcam1_c2pa_utils {
639
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
640
+
641
+ template <> struct Bridging<UniffiForeignFutureFree> {
642
+ static jsi::Value toJs(jsi::Runtime &rt,
643
+ std::shared_ptr<CallInvoker> callInvoker,
644
+ UniffiForeignFutureFree rsCallback) {
645
+ return jsi::Function::createFromHostFunction(
646
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"), 1,
647
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
648
+ const jsi::Value *arguments,
649
+ size_t count) -> jsi::Value {
650
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
651
+ rsCallback);
652
+ });
653
+ }
654
+
655
+ static jsi::Value intoRust(jsi::Runtime &rt,
656
+ std::shared_ptr<CallInvoker> callInvoker,
657
+ const jsi::Value &thisValue,
658
+ const jsi::Value *args, size_t count,
659
+ UniffiForeignFutureFree func) {
660
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
661
+ // then call the rs_callback with those arguments.
662
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]));
663
+
664
+ return jsi::Value::undefined();
665
+ }
666
+ };
667
+ } // namespace uniffi::zcam1_c2pa_utils
668
+ // Implementation of free callback function CallbackInterfaceFree
669
+
670
+ // Callback function:
671
+ // uniffi::zcam1_c2pa_utils::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree
672
+ //
673
+ // We have the following constraints:
674
+ // - we need to pass a function pointer to Rust.
675
+ // - we need a jsi::Runtime and jsi::Function to call into JS.
676
+ // - function pointers can't store state, so we can't use a lamda.
677
+ //
678
+ // For this, we store a lambda as a global, as `rsLambda`. The `callback`
679
+ // function calls the lambda, which itself calls the `body` which then calls
680
+ // into JS.
681
+ //
682
+ // We then give the `callback` function pointer to Rust which will call the
683
+ // lambda sometime in the future.
684
+ namespace uniffi::zcam1_c2pa_utils::st::foreignfuture::foreignfuture::free {
685
+ using namespace facebook;
686
+
687
+ // We need to store a lambda in a global so we can call it from
688
+ // a function pointer. The function pointer is passed to Rust.
689
+ static std::function<void(uint64_t)> rsLambda = nullptr;
690
+
691
+ // This is the main body of the callback. It's called from the lambda,
692
+ // which itself is called from the callback function which is passed to Rust.
693
+ static void body(jsi::Runtime &rt,
694
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
695
+ std::shared_ptr<jsi::Value> callbackValue,
696
+ uint64_t rs_handle) {
697
+
698
+ // Convert the arguments from Rust, into jsi::Values.
699
+ // We'll use the Bridging class to do this…
700
+ auto js_handle =
701
+ uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_handle);
702
+
703
+ // Now we are ready to call the callback.
704
+ // We are already on the JS thread, because this `body` function was
705
+ // invoked from the CallInvoker.
706
+ try {
707
+ // Getting the callback function
708
+ auto cb = callbackValue->asObject(rt).asFunction(rt);
709
+ auto uniffiResult = cb.call(rt, js_handle);
710
+
711
+ } catch (const jsi::JSError &error) {
712
+ std::cout << "Error in callback UniffiCallbackInterfaceFree: "
713
+ << error.what() << std::endl;
714
+ throw error;
715
+ }
716
+ }
717
+
718
+ static void callback(uint64_t rs_handle) {
719
+ // If the runtime has shutdown, then there is no point in trying to
720
+ // call into Javascript. BUT how do we tell if the runtime has shutdown?
721
+ //
722
+ // Answer: the module destructor calls into callback `cleanup` method,
723
+ // which nulls out the rsLamda.
724
+ //
725
+ // If rsLamda is null, then there is no runtime to call into.
726
+ if (rsLambda == nullptr) {
727
+ // This only occurs when destructors are calling into Rust free/drop,
728
+ // which causes the JS callback to be dropped.
729
+ return;
730
+ }
731
+
732
+ // The runtime, the actual callback jsi::funtion, and the callInvoker
733
+ // are all in the lambda.
734
+ rsLambda(rs_handle);
735
+ }
736
+
737
+ static UniffiCallbackInterfaceFree
738
+ makeCallbackFunction( // uniffi::zcam1_c2pa_utils::st::foreignfuture::foreignfuture::free
739
+ jsi::Runtime &rt,
740
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
741
+ const jsi::Value &value) {
742
+ if (rsLambda != nullptr) {
743
+ // `makeCallbackFunction` is called in two circumstances:
744
+ //
745
+ // 1. at startup, when initializing callback interface vtables.
746
+ // 2. when polling futures. This happens at least once per future that is
747
+ // exposed to Javascript. We know that this is always the same function,
748
+ // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
749
+ //
750
+ // We can therefore return the callback function without making anything
751
+ // new if we've been initialized already.
752
+ return callback;
753
+ }
754
+ auto callbackFunction = value.asObject(rt).asFunction(rt);
755
+ auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
756
+ rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) {
757
+ // We immediately make a lambda which will do the work of transforming the
758
+ // arguments into JSI values and calling the callback.
759
+ uniffi_runtime::UniffiCallFunc jsLambda =
760
+ [callInvoker, callbackValue, rs_handle](jsi::Runtime &rt) mutable {
761
+ body(rt, callInvoker, callbackValue, rs_handle);
762
+ };
763
+ // We'll then call that lambda from the callInvoker which will
764
+ // look after calling it on the correct thread.
765
+
766
+ callInvoker->invokeNonBlocking(rt, jsLambda);
767
+ };
768
+ return callback;
769
+ }
770
+
771
+ // This method is called from the destructor of NativeZcam1C2paUtils, which only
772
+ // happens when the jsi::Runtime is being destroyed.
773
+ static void cleanup() {
774
+ // The lambda holds a reference to the the Runtime, so when this is nulled
775
+ // out, then the pointer will no longer be left dangling.
776
+ rsLambda = nullptr;
777
+ }
778
+ } // namespace uniffi::zcam1_c2pa_utils::st::foreignfuture::foreignfuture::free
779
+ namespace uniffi::zcam1_c2pa_utils {
780
+ using namespace facebook;
781
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
782
+
783
+ template <> struct Bridging<UniffiForeignFuture> {
784
+ static UniffiForeignFuture fromJs(jsi::Runtime &rt,
785
+ std::shared_ptr<CallInvoker> callInvoker,
786
+ const jsi::Value &jsValue) {
787
+ // Check if the input is an object
788
+ if (!jsValue.isObject()) {
789
+ throw jsi::JSError(rt, "Expected an object for UniffiForeignFuture");
790
+ }
791
+
792
+ // Get the object from the jsi::Value
793
+ auto jsObject = jsValue.getObject(rt);
794
+
795
+ // Create the vtable struct
796
+ UniffiForeignFuture rsObject;
797
+
798
+ // Create the vtable from the js callbacks.
799
+ rsObject.handle = uniffi_jsi::Bridging<uint64_t>::fromJs(
800
+ rt, callInvoker, jsObject.getProperty(rt, "handle"));
801
+ rsObject.free = uniffi::zcam1_c2pa_utils::st::foreignfuture::foreignfuture::
802
+ free::makeCallbackFunction(rt, callInvoker,
803
+ jsObject.getProperty(rt, "free"));
804
+
805
+ return rsObject;
806
+ }
807
+ };
808
+
809
+ } // namespace uniffi::zcam1_c2pa_utils
810
+ namespace uniffi::zcam1_c2pa_utils {
811
+ using namespace facebook;
812
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
813
+
814
+ template <> struct Bridging<UniffiForeignFutureStructU8> {
815
+ static UniffiForeignFutureStructU8
816
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
817
+ const jsi::Value &jsValue) {
818
+ // Check if the input is an object
819
+ if (!jsValue.isObject()) {
820
+ throw jsi::JSError(rt,
821
+ "Expected an object for UniffiForeignFutureStructU8");
822
+ }
823
+
824
+ // Get the object from the jsi::Value
825
+ auto jsObject = jsValue.getObject(rt);
826
+
827
+ // Create the vtable struct
828
+ UniffiForeignFutureStructU8 rsObject;
829
+
830
+ // Create the vtable from the js callbacks.
831
+ rsObject.return_value = uniffi_jsi::Bridging<uint8_t>::fromJs(
832
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
833
+ rsObject.call_status =
834
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
835
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
836
+
837
+ return rsObject;
838
+ }
839
+ };
840
+
841
+ } // namespace uniffi::zcam1_c2pa_utils
842
+ // Implementation of callback function calling from JS to Rust
843
+ // ForeignFutureCompleteU8, passed from Rust to JS as part of async callbacks.
844
+ namespace uniffi::zcam1_c2pa_utils {
845
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
846
+
847
+ template <> struct Bridging<UniffiForeignFutureCompleteU8> {
848
+ static jsi::Value toJs(jsi::Runtime &rt,
849
+ std::shared_ptr<CallInvoker> callInvoker,
850
+ UniffiForeignFutureCompleteU8 rsCallback) {
851
+ return jsi::Function::createFromHostFunction(
852
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU8"), 2,
853
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
854
+ const jsi::Value *arguments,
855
+ size_t count) -> jsi::Value {
856
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
857
+ rsCallback);
858
+ });
859
+ }
860
+
861
+ static jsi::Value intoRust(jsi::Runtime &rt,
862
+ std::shared_ptr<CallInvoker> callInvoker,
863
+ const jsi::Value &thisValue,
864
+ const jsi::Value *args, size_t count,
865
+ UniffiForeignFutureCompleteU8 func) {
866
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
867
+ // then call the rs_callback with those arguments.
868
+ func(
869
+ uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
870
+ uniffi::zcam1_c2pa_utils::Bridging<UniffiForeignFutureStructU8>::fromJs(
871
+ rt, callInvoker, args[1]));
872
+
873
+ return jsi::Value::undefined();
874
+ }
875
+ };
876
+ } // namespace uniffi::zcam1_c2pa_utils
877
+ namespace uniffi::zcam1_c2pa_utils {
878
+ using namespace facebook;
879
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
880
+
881
+ template <> struct Bridging<UniffiForeignFutureStructI8> {
882
+ static UniffiForeignFutureStructI8
883
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
884
+ const jsi::Value &jsValue) {
885
+ // Check if the input is an object
886
+ if (!jsValue.isObject()) {
887
+ throw jsi::JSError(rt,
888
+ "Expected an object for UniffiForeignFutureStructI8");
889
+ }
890
+
891
+ // Get the object from the jsi::Value
892
+ auto jsObject = jsValue.getObject(rt);
893
+
894
+ // Create the vtable struct
895
+ UniffiForeignFutureStructI8 rsObject;
896
+
897
+ // Create the vtable from the js callbacks.
898
+ rsObject.return_value = uniffi_jsi::Bridging<int8_t>::fromJs(
899
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
900
+ rsObject.call_status =
901
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
902
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
903
+
904
+ return rsObject;
905
+ }
906
+ };
907
+
908
+ } // namespace uniffi::zcam1_c2pa_utils
909
+ // Implementation of callback function calling from JS to Rust
910
+ // ForeignFutureCompleteI8, passed from Rust to JS as part of async callbacks.
911
+ namespace uniffi::zcam1_c2pa_utils {
912
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
913
+
914
+ template <> struct Bridging<UniffiForeignFutureCompleteI8> {
915
+ static jsi::Value toJs(jsi::Runtime &rt,
916
+ std::shared_ptr<CallInvoker> callInvoker,
917
+ UniffiForeignFutureCompleteI8 rsCallback) {
918
+ return jsi::Function::createFromHostFunction(
919
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI8"), 2,
920
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
921
+ const jsi::Value *arguments,
922
+ size_t count) -> jsi::Value {
923
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
924
+ rsCallback);
925
+ });
926
+ }
927
+
928
+ static jsi::Value intoRust(jsi::Runtime &rt,
929
+ std::shared_ptr<CallInvoker> callInvoker,
930
+ const jsi::Value &thisValue,
931
+ const jsi::Value *args, size_t count,
932
+ UniffiForeignFutureCompleteI8 func) {
933
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
934
+ // then call the rs_callback with those arguments.
935
+ func(
936
+ uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
937
+ uniffi::zcam1_c2pa_utils::Bridging<UniffiForeignFutureStructI8>::fromJs(
938
+ rt, callInvoker, args[1]));
939
+
940
+ return jsi::Value::undefined();
941
+ }
942
+ };
943
+ } // namespace uniffi::zcam1_c2pa_utils
944
+ namespace uniffi::zcam1_c2pa_utils {
945
+ using namespace facebook;
946
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
947
+
948
+ template <> struct Bridging<UniffiForeignFutureStructU16> {
949
+ static UniffiForeignFutureStructU16
950
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
951
+ const jsi::Value &jsValue) {
952
+ // Check if the input is an object
953
+ if (!jsValue.isObject()) {
954
+ throw jsi::JSError(rt,
955
+ "Expected an object for UniffiForeignFutureStructU16");
956
+ }
957
+
958
+ // Get the object from the jsi::Value
959
+ auto jsObject = jsValue.getObject(rt);
960
+
961
+ // Create the vtable struct
962
+ UniffiForeignFutureStructU16 rsObject;
963
+
964
+ // Create the vtable from the js callbacks.
965
+ rsObject.return_value = uniffi_jsi::Bridging<uint16_t>::fromJs(
966
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
967
+ rsObject.call_status =
968
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
969
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
970
+
971
+ return rsObject;
972
+ }
973
+ };
974
+
975
+ } // namespace uniffi::zcam1_c2pa_utils
976
+ // Implementation of callback function calling from JS to Rust
977
+ // ForeignFutureCompleteU16, passed from Rust to JS as part of async
978
+ // callbacks.
979
+ namespace uniffi::zcam1_c2pa_utils {
980
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
981
+
982
+ template <> struct Bridging<UniffiForeignFutureCompleteU16> {
983
+ static jsi::Value toJs(jsi::Runtime &rt,
984
+ std::shared_ptr<CallInvoker> callInvoker,
985
+ UniffiForeignFutureCompleteU16 rsCallback) {
986
+ return jsi::Function::createFromHostFunction(
987
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU16"), 2,
988
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
989
+ const jsi::Value *arguments,
990
+ size_t count) -> jsi::Value {
991
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
992
+ rsCallback);
993
+ });
994
+ }
995
+
996
+ static jsi::Value intoRust(jsi::Runtime &rt,
997
+ std::shared_ptr<CallInvoker> callInvoker,
998
+ const jsi::Value &thisValue,
999
+ const jsi::Value *args, size_t count,
1000
+ UniffiForeignFutureCompleteU16 func) {
1001
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1002
+ // then call the rs_callback with those arguments.
1003
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1004
+ uniffi::zcam1_c2pa_utils::Bridging<
1005
+ UniffiForeignFutureStructU16>::fromJs(rt, callInvoker, args[1]));
1006
+
1007
+ return jsi::Value::undefined();
1008
+ }
1009
+ };
1010
+ } // namespace uniffi::zcam1_c2pa_utils
1011
+ namespace uniffi::zcam1_c2pa_utils {
1012
+ using namespace facebook;
1013
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1014
+
1015
+ template <> struct Bridging<UniffiForeignFutureStructI16> {
1016
+ static UniffiForeignFutureStructI16
1017
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1018
+ const jsi::Value &jsValue) {
1019
+ // Check if the input is an object
1020
+ if (!jsValue.isObject()) {
1021
+ throw jsi::JSError(rt,
1022
+ "Expected an object for UniffiForeignFutureStructI16");
1023
+ }
1024
+
1025
+ // Get the object from the jsi::Value
1026
+ auto jsObject = jsValue.getObject(rt);
1027
+
1028
+ // Create the vtable struct
1029
+ UniffiForeignFutureStructI16 rsObject;
1030
+
1031
+ // Create the vtable from the js callbacks.
1032
+ rsObject.return_value = uniffi_jsi::Bridging<int16_t>::fromJs(
1033
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
1034
+ rsObject.call_status =
1035
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1036
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1037
+
1038
+ return rsObject;
1039
+ }
1040
+ };
1041
+
1042
+ } // namespace uniffi::zcam1_c2pa_utils
1043
+ // Implementation of callback function calling from JS to Rust
1044
+ // ForeignFutureCompleteI16, passed from Rust to JS as part of async
1045
+ // callbacks.
1046
+ namespace uniffi::zcam1_c2pa_utils {
1047
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1048
+
1049
+ template <> struct Bridging<UniffiForeignFutureCompleteI16> {
1050
+ static jsi::Value toJs(jsi::Runtime &rt,
1051
+ std::shared_ptr<CallInvoker> callInvoker,
1052
+ UniffiForeignFutureCompleteI16 rsCallback) {
1053
+ return jsi::Function::createFromHostFunction(
1054
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI16"), 2,
1055
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1056
+ const jsi::Value *arguments,
1057
+ size_t count) -> jsi::Value {
1058
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1059
+ rsCallback);
1060
+ });
1061
+ }
1062
+
1063
+ static jsi::Value intoRust(jsi::Runtime &rt,
1064
+ std::shared_ptr<CallInvoker> callInvoker,
1065
+ const jsi::Value &thisValue,
1066
+ const jsi::Value *args, size_t count,
1067
+ UniffiForeignFutureCompleteI16 func) {
1068
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1069
+ // then call the rs_callback with those arguments.
1070
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1071
+ uniffi::zcam1_c2pa_utils::Bridging<
1072
+ UniffiForeignFutureStructI16>::fromJs(rt, callInvoker, args[1]));
1073
+
1074
+ return jsi::Value::undefined();
1075
+ }
1076
+ };
1077
+ } // namespace uniffi::zcam1_c2pa_utils
1078
+ namespace uniffi::zcam1_c2pa_utils {
1079
+ using namespace facebook;
1080
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1081
+
1082
+ template <> struct Bridging<UniffiForeignFutureStructU32> {
1083
+ static UniffiForeignFutureStructU32
1084
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1085
+ const jsi::Value &jsValue) {
1086
+ // Check if the input is an object
1087
+ if (!jsValue.isObject()) {
1088
+ throw jsi::JSError(rt,
1089
+ "Expected an object for UniffiForeignFutureStructU32");
1090
+ }
1091
+
1092
+ // Get the object from the jsi::Value
1093
+ auto jsObject = jsValue.getObject(rt);
1094
+
1095
+ // Create the vtable struct
1096
+ UniffiForeignFutureStructU32 rsObject;
1097
+
1098
+ // Create the vtable from the js callbacks.
1099
+ rsObject.return_value = uniffi_jsi::Bridging<uint32_t>::fromJs(
1100
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
1101
+ rsObject.call_status =
1102
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1103
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1104
+
1105
+ return rsObject;
1106
+ }
1107
+ };
1108
+
1109
+ } // namespace uniffi::zcam1_c2pa_utils
1110
+ // Implementation of callback function calling from JS to Rust
1111
+ // ForeignFutureCompleteU32, passed from Rust to JS as part of async
1112
+ // callbacks.
1113
+ namespace uniffi::zcam1_c2pa_utils {
1114
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1115
+
1116
+ template <> struct Bridging<UniffiForeignFutureCompleteU32> {
1117
+ static jsi::Value toJs(jsi::Runtime &rt,
1118
+ std::shared_ptr<CallInvoker> callInvoker,
1119
+ UniffiForeignFutureCompleteU32 rsCallback) {
1120
+ return jsi::Function::createFromHostFunction(
1121
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU32"), 2,
1122
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1123
+ const jsi::Value *arguments,
1124
+ size_t count) -> jsi::Value {
1125
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1126
+ rsCallback);
1127
+ });
1128
+ }
1129
+
1130
+ static jsi::Value intoRust(jsi::Runtime &rt,
1131
+ std::shared_ptr<CallInvoker> callInvoker,
1132
+ const jsi::Value &thisValue,
1133
+ const jsi::Value *args, size_t count,
1134
+ UniffiForeignFutureCompleteU32 func) {
1135
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1136
+ // then call the rs_callback with those arguments.
1137
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1138
+ uniffi::zcam1_c2pa_utils::Bridging<
1139
+ UniffiForeignFutureStructU32>::fromJs(rt, callInvoker, args[1]));
1140
+
1141
+ return jsi::Value::undefined();
1142
+ }
1143
+ };
1144
+ } // namespace uniffi::zcam1_c2pa_utils
1145
+ namespace uniffi::zcam1_c2pa_utils {
1146
+ using namespace facebook;
1147
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1148
+
1149
+ template <> struct Bridging<UniffiForeignFutureStructI32> {
1150
+ static UniffiForeignFutureStructI32
1151
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1152
+ const jsi::Value &jsValue) {
1153
+ // Check if the input is an object
1154
+ if (!jsValue.isObject()) {
1155
+ throw jsi::JSError(rt,
1156
+ "Expected an object for UniffiForeignFutureStructI32");
1157
+ }
1158
+
1159
+ // Get the object from the jsi::Value
1160
+ auto jsObject = jsValue.getObject(rt);
1161
+
1162
+ // Create the vtable struct
1163
+ UniffiForeignFutureStructI32 rsObject;
1164
+
1165
+ // Create the vtable from the js callbacks.
1166
+ rsObject.return_value = uniffi_jsi::Bridging<int32_t>::fromJs(
1167
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
1168
+ rsObject.call_status =
1169
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1170
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1171
+
1172
+ return rsObject;
1173
+ }
1174
+ };
1175
+
1176
+ } // namespace uniffi::zcam1_c2pa_utils
1177
+ // Implementation of callback function calling from JS to Rust
1178
+ // ForeignFutureCompleteI32, passed from Rust to JS as part of async
1179
+ // callbacks.
1180
+ namespace uniffi::zcam1_c2pa_utils {
1181
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1182
+
1183
+ template <> struct Bridging<UniffiForeignFutureCompleteI32> {
1184
+ static jsi::Value toJs(jsi::Runtime &rt,
1185
+ std::shared_ptr<CallInvoker> callInvoker,
1186
+ UniffiForeignFutureCompleteI32 rsCallback) {
1187
+ return jsi::Function::createFromHostFunction(
1188
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI32"), 2,
1189
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1190
+ const jsi::Value *arguments,
1191
+ size_t count) -> jsi::Value {
1192
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1193
+ rsCallback);
1194
+ });
1195
+ }
1196
+
1197
+ static jsi::Value intoRust(jsi::Runtime &rt,
1198
+ std::shared_ptr<CallInvoker> callInvoker,
1199
+ const jsi::Value &thisValue,
1200
+ const jsi::Value *args, size_t count,
1201
+ UniffiForeignFutureCompleteI32 func) {
1202
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1203
+ // then call the rs_callback with those arguments.
1204
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1205
+ uniffi::zcam1_c2pa_utils::Bridging<
1206
+ UniffiForeignFutureStructI32>::fromJs(rt, callInvoker, args[1]));
1207
+
1208
+ return jsi::Value::undefined();
1209
+ }
1210
+ };
1211
+ } // namespace uniffi::zcam1_c2pa_utils
1212
+ namespace uniffi::zcam1_c2pa_utils {
1213
+ using namespace facebook;
1214
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1215
+
1216
+ template <> struct Bridging<UniffiForeignFutureStructU64> {
1217
+ static UniffiForeignFutureStructU64
1218
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1219
+ const jsi::Value &jsValue) {
1220
+ // Check if the input is an object
1221
+ if (!jsValue.isObject()) {
1222
+ throw jsi::JSError(rt,
1223
+ "Expected an object for UniffiForeignFutureStructU64");
1224
+ }
1225
+
1226
+ // Get the object from the jsi::Value
1227
+ auto jsObject = jsValue.getObject(rt);
1228
+
1229
+ // Create the vtable struct
1230
+ UniffiForeignFutureStructU64 rsObject;
1231
+
1232
+ // Create the vtable from the js callbacks.
1233
+ rsObject.return_value = uniffi_jsi::Bridging<uint64_t>::fromJs(
1234
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
1235
+ rsObject.call_status =
1236
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1237
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1238
+
1239
+ return rsObject;
1240
+ }
1241
+ };
1242
+
1243
+ } // namespace uniffi::zcam1_c2pa_utils
1244
+ // Implementation of callback function calling from JS to Rust
1245
+ // ForeignFutureCompleteU64, passed from Rust to JS as part of async
1246
+ // callbacks.
1247
+ namespace uniffi::zcam1_c2pa_utils {
1248
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1249
+
1250
+ template <> struct Bridging<UniffiForeignFutureCompleteU64> {
1251
+ static jsi::Value toJs(jsi::Runtime &rt,
1252
+ std::shared_ptr<CallInvoker> callInvoker,
1253
+ UniffiForeignFutureCompleteU64 rsCallback) {
1254
+ return jsi::Function::createFromHostFunction(
1255
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU64"), 2,
1256
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1257
+ const jsi::Value *arguments,
1258
+ size_t count) -> jsi::Value {
1259
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1260
+ rsCallback);
1261
+ });
1262
+ }
1263
+
1264
+ static jsi::Value intoRust(jsi::Runtime &rt,
1265
+ std::shared_ptr<CallInvoker> callInvoker,
1266
+ const jsi::Value &thisValue,
1267
+ const jsi::Value *args, size_t count,
1268
+ UniffiForeignFutureCompleteU64 func) {
1269
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1270
+ // then call the rs_callback with those arguments.
1271
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1272
+ uniffi::zcam1_c2pa_utils::Bridging<
1273
+ UniffiForeignFutureStructU64>::fromJs(rt, callInvoker, args[1]));
1274
+
1275
+ return jsi::Value::undefined();
1276
+ }
1277
+ };
1278
+ } // namespace uniffi::zcam1_c2pa_utils
1279
+ namespace uniffi::zcam1_c2pa_utils {
1280
+ using namespace facebook;
1281
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1282
+
1283
+ template <> struct Bridging<UniffiForeignFutureStructI64> {
1284
+ static UniffiForeignFutureStructI64
1285
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1286
+ const jsi::Value &jsValue) {
1287
+ // Check if the input is an object
1288
+ if (!jsValue.isObject()) {
1289
+ throw jsi::JSError(rt,
1290
+ "Expected an object for UniffiForeignFutureStructI64");
1291
+ }
1292
+
1293
+ // Get the object from the jsi::Value
1294
+ auto jsObject = jsValue.getObject(rt);
1295
+
1296
+ // Create the vtable struct
1297
+ UniffiForeignFutureStructI64 rsObject;
1298
+
1299
+ // Create the vtable from the js callbacks.
1300
+ rsObject.return_value = uniffi_jsi::Bridging<int64_t>::fromJs(
1301
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
1302
+ rsObject.call_status =
1303
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1304
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1305
+
1306
+ return rsObject;
1307
+ }
1308
+ };
1309
+
1310
+ } // namespace uniffi::zcam1_c2pa_utils
1311
+ // Implementation of callback function calling from JS to Rust
1312
+ // ForeignFutureCompleteI64, passed from Rust to JS as part of async
1313
+ // callbacks.
1314
+ namespace uniffi::zcam1_c2pa_utils {
1315
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1316
+
1317
+ template <> struct Bridging<UniffiForeignFutureCompleteI64> {
1318
+ static jsi::Value toJs(jsi::Runtime &rt,
1319
+ std::shared_ptr<CallInvoker> callInvoker,
1320
+ UniffiForeignFutureCompleteI64 rsCallback) {
1321
+ return jsi::Function::createFromHostFunction(
1322
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI64"), 2,
1323
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1324
+ const jsi::Value *arguments,
1325
+ size_t count) -> jsi::Value {
1326
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1327
+ rsCallback);
1328
+ });
1329
+ }
1330
+
1331
+ static jsi::Value intoRust(jsi::Runtime &rt,
1332
+ std::shared_ptr<CallInvoker> callInvoker,
1333
+ const jsi::Value &thisValue,
1334
+ const jsi::Value *args, size_t count,
1335
+ UniffiForeignFutureCompleteI64 func) {
1336
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1337
+ // then call the rs_callback with those arguments.
1338
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1339
+ uniffi::zcam1_c2pa_utils::Bridging<
1340
+ UniffiForeignFutureStructI64>::fromJs(rt, callInvoker, args[1]));
1341
+
1342
+ return jsi::Value::undefined();
1343
+ }
1344
+ };
1345
+ } // namespace uniffi::zcam1_c2pa_utils
1346
+ namespace uniffi::zcam1_c2pa_utils {
1347
+ using namespace facebook;
1348
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1349
+
1350
+ template <> struct Bridging<UniffiForeignFutureStructF32> {
1351
+ static UniffiForeignFutureStructF32
1352
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1353
+ const jsi::Value &jsValue) {
1354
+ // Check if the input is an object
1355
+ if (!jsValue.isObject()) {
1356
+ throw jsi::JSError(rt,
1357
+ "Expected an object for UniffiForeignFutureStructF32");
1358
+ }
1359
+
1360
+ // Get the object from the jsi::Value
1361
+ auto jsObject = jsValue.getObject(rt);
1362
+
1363
+ // Create the vtable struct
1364
+ UniffiForeignFutureStructF32 rsObject;
1365
+
1366
+ // Create the vtable from the js callbacks.
1367
+ rsObject.return_value = uniffi_jsi::Bridging<float>::fromJs(
1368
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
1369
+ rsObject.call_status =
1370
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1371
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1372
+
1373
+ return rsObject;
1374
+ }
1375
+ };
1376
+
1377
+ } // namespace uniffi::zcam1_c2pa_utils
1378
+ // Implementation of callback function calling from JS to Rust
1379
+ // ForeignFutureCompleteF32, passed from Rust to JS as part of async
1380
+ // callbacks.
1381
+ namespace uniffi::zcam1_c2pa_utils {
1382
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1383
+
1384
+ template <> struct Bridging<UniffiForeignFutureCompleteF32> {
1385
+ static jsi::Value toJs(jsi::Runtime &rt,
1386
+ std::shared_ptr<CallInvoker> callInvoker,
1387
+ UniffiForeignFutureCompleteF32 rsCallback) {
1388
+ return jsi::Function::createFromHostFunction(
1389
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteF32"), 2,
1390
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1391
+ const jsi::Value *arguments,
1392
+ size_t count) -> jsi::Value {
1393
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1394
+ rsCallback);
1395
+ });
1396
+ }
1397
+
1398
+ static jsi::Value intoRust(jsi::Runtime &rt,
1399
+ std::shared_ptr<CallInvoker> callInvoker,
1400
+ const jsi::Value &thisValue,
1401
+ const jsi::Value *args, size_t count,
1402
+ UniffiForeignFutureCompleteF32 func) {
1403
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1404
+ // then call the rs_callback with those arguments.
1405
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1406
+ uniffi::zcam1_c2pa_utils::Bridging<
1407
+ UniffiForeignFutureStructF32>::fromJs(rt, callInvoker, args[1]));
1408
+
1409
+ return jsi::Value::undefined();
1410
+ }
1411
+ };
1412
+ } // namespace uniffi::zcam1_c2pa_utils
1413
+ namespace uniffi::zcam1_c2pa_utils {
1414
+ using namespace facebook;
1415
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1416
+
1417
+ template <> struct Bridging<UniffiForeignFutureStructF64> {
1418
+ static UniffiForeignFutureStructF64
1419
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1420
+ const jsi::Value &jsValue) {
1421
+ // Check if the input is an object
1422
+ if (!jsValue.isObject()) {
1423
+ throw jsi::JSError(rt,
1424
+ "Expected an object for UniffiForeignFutureStructF64");
1425
+ }
1426
+
1427
+ // Get the object from the jsi::Value
1428
+ auto jsObject = jsValue.getObject(rt);
1429
+
1430
+ // Create the vtable struct
1431
+ UniffiForeignFutureStructF64 rsObject;
1432
+
1433
+ // Create the vtable from the js callbacks.
1434
+ rsObject.return_value = uniffi_jsi::Bridging<double>::fromJs(
1435
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
1436
+ rsObject.call_status =
1437
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1438
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1439
+
1440
+ return rsObject;
1441
+ }
1442
+ };
1443
+
1444
+ } // namespace uniffi::zcam1_c2pa_utils
1445
+ // Implementation of callback function calling from JS to Rust
1446
+ // ForeignFutureCompleteF64, passed from Rust to JS as part of async
1447
+ // callbacks.
1448
+ namespace uniffi::zcam1_c2pa_utils {
1449
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1450
+
1451
+ template <> struct Bridging<UniffiForeignFutureCompleteF64> {
1452
+ static jsi::Value toJs(jsi::Runtime &rt,
1453
+ std::shared_ptr<CallInvoker> callInvoker,
1454
+ UniffiForeignFutureCompleteF64 rsCallback) {
1455
+ return jsi::Function::createFromHostFunction(
1456
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteF64"), 2,
1457
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1458
+ const jsi::Value *arguments,
1459
+ size_t count) -> jsi::Value {
1460
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1461
+ rsCallback);
1462
+ });
1463
+ }
1464
+
1465
+ static jsi::Value intoRust(jsi::Runtime &rt,
1466
+ std::shared_ptr<CallInvoker> callInvoker,
1467
+ const jsi::Value &thisValue,
1468
+ const jsi::Value *args, size_t count,
1469
+ UniffiForeignFutureCompleteF64 func) {
1470
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1471
+ // then call the rs_callback with those arguments.
1472
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1473
+ uniffi::zcam1_c2pa_utils::Bridging<
1474
+ UniffiForeignFutureStructF64>::fromJs(rt, callInvoker, args[1]));
1475
+
1476
+ return jsi::Value::undefined();
1477
+ }
1478
+ };
1479
+ } // namespace uniffi::zcam1_c2pa_utils
1480
+ namespace uniffi::zcam1_c2pa_utils {
1481
+ using namespace facebook;
1482
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1483
+
1484
+ template <> struct Bridging<UniffiForeignFutureStructPointer> {
1485
+ static UniffiForeignFutureStructPointer
1486
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1487
+ const jsi::Value &jsValue) {
1488
+ // Check if the input is an object
1489
+ if (!jsValue.isObject()) {
1490
+ throw jsi::JSError(
1491
+ rt, "Expected an object for UniffiForeignFutureStructPointer");
1492
+ }
1493
+
1494
+ // Get the object from the jsi::Value
1495
+ auto jsObject = jsValue.getObject(rt);
1496
+
1497
+ // Create the vtable struct
1498
+ UniffiForeignFutureStructPointer rsObject;
1499
+
1500
+ // Create the vtable from the js callbacks.
1501
+ rsObject.return_value = uniffi_jsi::Bridging<void *>::fromJs(
1502
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
1503
+ rsObject.call_status =
1504
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1505
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1506
+
1507
+ return rsObject;
1508
+ }
1509
+ };
1510
+
1511
+ } // namespace uniffi::zcam1_c2pa_utils
1512
+ // Implementation of callback function calling from JS to Rust
1513
+ // ForeignFutureCompletePointer, passed from Rust to JS as part of async
1514
+ // callbacks.
1515
+ namespace uniffi::zcam1_c2pa_utils {
1516
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1517
+
1518
+ template <> struct Bridging<UniffiForeignFutureCompletePointer> {
1519
+ static jsi::Value toJs(jsi::Runtime &rt,
1520
+ std::shared_ptr<CallInvoker> callInvoker,
1521
+ UniffiForeignFutureCompletePointer rsCallback) {
1522
+ return jsi::Function::createFromHostFunction(
1523
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"), 2,
1524
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1525
+ const jsi::Value *arguments,
1526
+ size_t count) -> jsi::Value {
1527
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1528
+ rsCallback);
1529
+ });
1530
+ }
1531
+
1532
+ static jsi::Value intoRust(jsi::Runtime &rt,
1533
+ std::shared_ptr<CallInvoker> callInvoker,
1534
+ const jsi::Value &thisValue,
1535
+ const jsi::Value *args, size_t count,
1536
+ UniffiForeignFutureCompletePointer func) {
1537
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1538
+ // then call the rs_callback with those arguments.
1539
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1540
+ uniffi::zcam1_c2pa_utils::Bridging<
1541
+ UniffiForeignFutureStructPointer>::fromJs(rt, callInvoker,
1542
+ args[1]));
1543
+
1544
+ return jsi::Value::undefined();
1545
+ }
1546
+ };
1547
+ } // namespace uniffi::zcam1_c2pa_utils
1548
+ namespace uniffi::zcam1_c2pa_utils {
1549
+ using namespace facebook;
1550
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1551
+
1552
+ template <> struct Bridging<UniffiForeignFutureStructRustBuffer> {
1553
+ static UniffiForeignFutureStructRustBuffer
1554
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1555
+ const jsi::Value &jsValue) {
1556
+ // Check if the input is an object
1557
+ if (!jsValue.isObject()) {
1558
+ throw jsi::JSError(
1559
+ rt, "Expected an object for UniffiForeignFutureStructRustBuffer");
1560
+ }
1561
+
1562
+ // Get the object from the jsi::Value
1563
+ auto jsObject = jsValue.getObject(rt);
1564
+
1565
+ // Create the vtable struct
1566
+ UniffiForeignFutureStructRustBuffer rsObject;
1567
+
1568
+ // Create the vtable from the js callbacks.
1569
+ rsObject.return_value =
1570
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
1571
+ rt, callInvoker, jsObject.getProperty(rt, "returnValue"));
1572
+ rsObject.call_status =
1573
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1574
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1575
+
1576
+ return rsObject;
1577
+ }
1578
+ };
1579
+
1580
+ } // namespace uniffi::zcam1_c2pa_utils
1581
+ // Implementation of callback function calling from JS to Rust
1582
+ // ForeignFutureCompleteRustBuffer, passed from Rust to JS as part of async
1583
+ // callbacks.
1584
+ namespace uniffi::zcam1_c2pa_utils {
1585
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1586
+
1587
+ template <> struct Bridging<UniffiForeignFutureCompleteRustBuffer> {
1588
+ static jsi::Value toJs(jsi::Runtime &rt,
1589
+ std::shared_ptr<CallInvoker> callInvoker,
1590
+ UniffiForeignFutureCompleteRustBuffer rsCallback) {
1591
+ return jsi::Function::createFromHostFunction(
1592
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteRustBuffer"),
1593
+ 2,
1594
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1595
+ const jsi::Value *arguments,
1596
+ size_t count) -> jsi::Value {
1597
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1598
+ rsCallback);
1599
+ });
1600
+ }
1601
+
1602
+ static jsi::Value intoRust(jsi::Runtime &rt,
1603
+ std::shared_ptr<CallInvoker> callInvoker,
1604
+ const jsi::Value &thisValue,
1605
+ const jsi::Value *args, size_t count,
1606
+ UniffiForeignFutureCompleteRustBuffer func) {
1607
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1608
+ // then call the rs_callback with those arguments.
1609
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1610
+ uniffi::zcam1_c2pa_utils::Bridging<
1611
+ UniffiForeignFutureStructRustBuffer>::fromJs(rt, callInvoker,
1612
+ args[1]));
1613
+
1614
+ return jsi::Value::undefined();
1615
+ }
1616
+ };
1617
+ } // namespace uniffi::zcam1_c2pa_utils
1618
+ namespace uniffi::zcam1_c2pa_utils {
1619
+ using namespace facebook;
1620
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1621
+
1622
+ template <> struct Bridging<UniffiForeignFutureStructVoid> {
1623
+ static UniffiForeignFutureStructVoid
1624
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1625
+ const jsi::Value &jsValue) {
1626
+ // Check if the input is an object
1627
+ if (!jsValue.isObject()) {
1628
+ throw jsi::JSError(
1629
+ rt, "Expected an object for UniffiForeignFutureStructVoid");
1630
+ }
1631
+
1632
+ // Get the object from the jsi::Value
1633
+ auto jsObject = jsValue.getObject(rt);
1634
+
1635
+ // Create the vtable struct
1636
+ UniffiForeignFutureStructVoid rsObject;
1637
+
1638
+ // Create the vtable from the js callbacks.
1639
+ rsObject.call_status =
1640
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::fromJs(
1641
+ rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
1642
+
1643
+ return rsObject;
1644
+ }
1645
+ };
1646
+
1647
+ } // namespace uniffi::zcam1_c2pa_utils
1648
+ // Implementation of callback function calling from JS to Rust
1649
+ // ForeignFutureCompleteVoid, passed from Rust to JS as part of async
1650
+ // callbacks.
1651
+ namespace uniffi::zcam1_c2pa_utils {
1652
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1653
+
1654
+ template <> struct Bridging<UniffiForeignFutureCompleteVoid> {
1655
+ static jsi::Value toJs(jsi::Runtime &rt,
1656
+ std::shared_ptr<CallInvoker> callInvoker,
1657
+ UniffiForeignFutureCompleteVoid rsCallback) {
1658
+ return jsi::Function::createFromHostFunction(
1659
+ rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteVoid"), 2,
1660
+ [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1661
+ const jsi::Value *arguments,
1662
+ size_t count) -> jsi::Value {
1663
+ return intoRust(rt, callInvoker, thisValue, arguments, count,
1664
+ rsCallback);
1665
+ });
1666
+ }
1667
+
1668
+ static jsi::Value intoRust(jsi::Runtime &rt,
1669
+ std::shared_ptr<CallInvoker> callInvoker,
1670
+ const jsi::Value &thisValue,
1671
+ const jsi::Value *args, size_t count,
1672
+ UniffiForeignFutureCompleteVoid func) {
1673
+ // Convert the arguments into the Rust, with Bridging<T>::fromJs,
1674
+ // then call the rs_callback with those arguments.
1675
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1676
+ uniffi::zcam1_c2pa_utils::Bridging<
1677
+ UniffiForeignFutureStructVoid>::fromJs(rt, callInvoker, args[1]));
1678
+
1679
+ return jsi::Value::undefined();
1680
+ }
1681
+ };
1682
+ } // namespace uniffi::zcam1_c2pa_utils
1683
+
1684
+ namespace uniffi::zcam1_c2pa_utils {
1685
+ using namespace facebook;
1686
+ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
1687
+
1688
+ template <> struct Bridging<UniffiRustFutureContinuationCallback> {
1689
+ static UniffiRustFutureContinuationCallback
1690
+ fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1691
+ const jsi::Value &value) {
1692
+ try {
1693
+ return uniffi::zcam1_c2pa_utils::cb::rustfuturecontinuationcallback::
1694
+ makeCallbackFunction(rt, callInvoker, value);
1695
+ } catch (const std::logic_error &e) {
1696
+ throw jsi::JSError(rt, e.what());
1697
+ }
1698
+ }
1699
+ };
1700
+
1701
+ } // namespace uniffi::zcam1_c2pa_utils
1702
+
1703
+ NativeZcam1C2paUtils::NativeZcam1C2paUtils(
1704
+ jsi::Runtime &rt,
1705
+ std::shared_ptr<uniffi_runtime::UniffiCallInvoker> invoker)
1706
+ : callInvoker(invoker), props() {
1707
+ // Map from Javascript names to the cpp names
1708
+ props["ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length"] =
1709
+ jsi::Function::createFromHostFunction(
1710
+ rt,
1711
+ jsi::PropNameID::forAscii(
1712
+ rt, "ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length"),
1713
+ 1,
1714
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1715
+ const jsi::Value *args, size_t count) -> jsi::Value {
1716
+ return this->cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(
1717
+ rt, thisVal, args, count);
1718
+ });
1719
+ props["ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer"] =
1720
+ jsi::Function::createFromHostFunction(
1721
+ rt,
1722
+ jsi::PropNameID::forAscii(
1723
+ rt, "ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer"),
1724
+ 1,
1725
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1726
+ const jsi::Value *args, size_t count) -> jsi::Value {
1727
+ return this->cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(
1728
+ rt, thisVal, args, count);
1729
+ });
1730
+ props["ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string"] =
1731
+ jsi::Function::createFromHostFunction(
1732
+ rt,
1733
+ jsi::PropNameID::forAscii(
1734
+ rt, "ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string"),
1735
+ 1,
1736
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1737
+ const jsi::Value *args, size_t count) -> jsi::Value {
1738
+ return this->cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
1739
+ rt, thisVal, args, count);
1740
+ });
1741
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_clone_manifest"] =
1742
+ jsi::Function::createFromHostFunction(
1743
+ rt,
1744
+ jsi::PropNameID::forAscii(
1745
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_clone_manifest"),
1746
+ 1,
1747
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1748
+ const jsi::Value *args, size_t count) -> jsi::Value {
1749
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_clone_manifest(
1750
+ rt, thisVal, args, count);
1751
+ });
1752
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_free_manifest"] =
1753
+ jsi::Function::createFromHostFunction(
1754
+ rt,
1755
+ jsi::PropNameID::forAscii(
1756
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_free_manifest"),
1757
+ 1,
1758
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1759
+ const jsi::Value *args, size_t count) -> jsi::Value {
1760
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_free_manifest(
1761
+ rt, thisVal, args, count);
1762
+ });
1763
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifest_bindings"] =
1764
+ jsi::Function::createFromHostFunction(
1765
+ rt,
1766
+ jsi::PropNameID::forAscii(
1767
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifest_bindings"),
1768
+ 1,
1769
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1770
+ const jsi::Value *args, size_t count) -> jsi::Value {
1771
+ return this
1772
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifest_bindings(
1773
+ rt, thisVal, args, count);
1774
+ });
1775
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifest_capture_metadata_"
1776
+ "action"] = jsi::Function::createFromHostFunction(
1777
+ rt,
1778
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_method_"
1779
+ "manifest_capture_metadata_action"),
1780
+ 1,
1781
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1782
+ const jsi::Value *args, size_t count) -> jsi::Value {
1783
+ return this
1784
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifest_capture_metadata_action(
1785
+ rt, thisVal, args, count);
1786
+ });
1787
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifest_proof"] =
1788
+ jsi::Function::createFromHostFunction(
1789
+ rt,
1790
+ jsi::PropNameID::forAscii(
1791
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifest_proof"),
1792
+ 1,
1793
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1794
+ const jsi::Value *args, size_t count) -> jsi::Value {
1795
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifest_proof(
1796
+ rt, thisVal, args, count);
1797
+ });
1798
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_clone_manifesteditor"] =
1799
+ jsi::Function::createFromHostFunction(
1800
+ rt,
1801
+ jsi::PropNameID::forAscii(
1802
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_clone_manifesteditor"),
1803
+ 1,
1804
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1805
+ const jsi::Value *args, size_t count) -> jsi::Value {
1806
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_clone_manifesteditor(
1807
+ rt, thisVal, args, count);
1808
+ });
1809
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_free_manifesteditor"] =
1810
+ jsi::Function::createFromHostFunction(
1811
+ rt,
1812
+ jsi::PropNameID::forAscii(
1813
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_free_manifesteditor"),
1814
+ 1,
1815
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1816
+ const jsi::Value *args, size_t count) -> jsi::Value {
1817
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_free_manifesteditor(
1818
+ rt, thisVal, args, count);
1819
+ });
1820
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_from_"
1821
+ "manifest"] = jsi::Function::createFromHostFunction(
1822
+ rt,
1823
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_"
1824
+ "constructor_manifesteditor_from_manifest"),
1825
+ 3,
1826
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1827
+ const jsi::Value *args, size_t count) -> jsi::Value {
1828
+ return this
1829
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_from_manifest(
1830
+ rt, thisVal, args, count);
1831
+ });
1832
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_new"] =
1833
+ jsi::Function::createFromHostFunction(
1834
+ rt,
1835
+ jsi::PropNameID::forAscii(
1836
+ rt,
1837
+ "ubrn_uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_new"),
1838
+ 3,
1839
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1840
+ const jsi::Value *args, size_t count) -> jsi::Value {
1841
+ return this
1842
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_new(
1843
+ rt, thisVal, args, count);
1844
+ });
1845
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_assertion"] =
1846
+ jsi::Function::createFromHostFunction(
1847
+ rt,
1848
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_"
1849
+ "method_manifesteditor_add_assertion"),
1850
+ 3,
1851
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1852
+ const jsi::Value *args, size_t count) -> jsi::Value {
1853
+ return this
1854
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_assertion(
1855
+ rt, thisVal, args, count);
1856
+ });
1857
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_photo_"
1858
+ "metadata_action"] = jsi::Function::createFromHostFunction(
1859
+ rt,
1860
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_method_"
1861
+ "manifesteditor_add_photo_metadata_action"),
1862
+ 3,
1863
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1864
+ const jsi::Value *args, size_t count) -> jsi::Value {
1865
+ return this
1866
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_photo_metadata_action(
1867
+ rt, thisVal, args, count);
1868
+ });
1869
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_title"] =
1870
+ jsi::Function::createFromHostFunction(
1871
+ rt,
1872
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_"
1873
+ "method_manifesteditor_add_title"),
1874
+ 2,
1875
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1876
+ const jsi::Value *args, size_t count) -> jsi::Value {
1877
+ return this
1878
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_title(
1879
+ rt, thisVal, args, count);
1880
+ });
1881
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_video_"
1882
+ "metadata_action"] = jsi::Function::createFromHostFunction(
1883
+ rt,
1884
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_method_"
1885
+ "manifesteditor_add_video_metadata_action"),
1886
+ 3,
1887
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1888
+ const jsi::Value *args, size_t count) -> jsi::Value {
1889
+ return this
1890
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_video_metadata_action(
1891
+ rt, thisVal, args, count);
1892
+ });
1893
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_embed_manifest_"
1894
+ "to_file"] = jsi::Function::createFromHostFunction(
1895
+ rt,
1896
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_method_"
1897
+ "manifesteditor_embed_manifest_to_file"),
1898
+ 3,
1899
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1900
+ const jsi::Value *args, size_t count) -> jsi::Value {
1901
+ return this
1902
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_embed_manifest_to_file(
1903
+ rt, thisVal, args, count);
1904
+ });
1905
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_remove_"
1906
+ "assertion"] = jsi::Function::createFromHostFunction(
1907
+ rt,
1908
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_method_"
1909
+ "manifesteditor_remove_assertion"),
1910
+ 2,
1911
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1912
+ const jsi::Value *args, size_t count) -> jsi::Value {
1913
+ return this
1914
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_remove_assertion(
1915
+ rt, thisVal, args, count);
1916
+ });
1917
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_clone_manifeststore"] =
1918
+ jsi::Function::createFromHostFunction(
1919
+ rt,
1920
+ jsi::PropNameID::forAscii(
1921
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_clone_manifeststore"),
1922
+ 1,
1923
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1924
+ const jsi::Value *args, size_t count) -> jsi::Value {
1925
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_clone_manifeststore(
1926
+ rt, thisVal, args, count);
1927
+ });
1928
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_free_manifeststore"] =
1929
+ jsi::Function::createFromHostFunction(
1930
+ rt,
1931
+ jsi::PropNameID::forAscii(
1932
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_free_manifeststore"),
1933
+ 1,
1934
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1935
+ const jsi::Value *args, size_t count) -> jsi::Value {
1936
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_free_manifeststore(
1937
+ rt, thisVal, args, count);
1938
+ });
1939
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_method_manifeststore_active_"
1940
+ "manifest"] = jsi::Function::createFromHostFunction(
1941
+ rt,
1942
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_method_"
1943
+ "manifeststore_active_manifest"),
1944
+ 1,
1945
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1946
+ const jsi::Value *args, size_t count) -> jsi::Value {
1947
+ return this
1948
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_method_manifeststore_active_manifest(
1949
+ rt, thisVal, args, count);
1950
+ });
1951
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_func_authenticity_status"] =
1952
+ jsi::Function::createFromHostFunction(
1953
+ rt,
1954
+ jsi::PropNameID::forAscii(
1955
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_func_authenticity_status"),
1956
+ 1,
1957
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1958
+ const jsi::Value *args, size_t count) -> jsi::Value {
1959
+ return this
1960
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_func_authenticity_status(
1961
+ rt, thisVal, args, count);
1962
+ });
1963
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_func_compute_hash"] =
1964
+ jsi::Function::createFromHostFunction(
1965
+ rt,
1966
+ jsi::PropNameID::forAscii(
1967
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_func_compute_hash"),
1968
+ 1,
1969
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1970
+ const jsi::Value *args, size_t count) -> jsi::Value {
1971
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_func_compute_hash(
1972
+ rt, thisVal, args, count);
1973
+ });
1974
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_func_compute_hash_from_buffer"] =
1975
+ jsi::Function::createFromHostFunction(
1976
+ rt,
1977
+ jsi::PropNameID::forAscii(
1978
+ rt,
1979
+ "ubrn_uniffi_zcam1_c2pa_utils_fn_func_compute_hash_from_buffer"),
1980
+ 2,
1981
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1982
+ const jsi::Value *args, size_t count) -> jsi::Value {
1983
+ return this
1984
+ ->cpp_uniffi_zcam1_c2pa_utils_fn_func_compute_hash_from_buffer(
1985
+ rt, thisVal, args, count);
1986
+ });
1987
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_func_extract_manifest"] =
1988
+ jsi::Function::createFromHostFunction(
1989
+ rt,
1990
+ jsi::PropNameID::forAscii(
1991
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_func_extract_manifest"),
1992
+ 1,
1993
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1994
+ const jsi::Value *args, size_t count) -> jsi::Value {
1995
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_func_extract_manifest(
1996
+ rt, thisVal, args, count);
1997
+ });
1998
+ props["ubrn_uniffi_zcam1_c2pa_utils_fn_func_format_from_path"] =
1999
+ jsi::Function::createFromHostFunction(
2000
+ rt,
2001
+ jsi::PropNameID::forAscii(
2002
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_fn_func_format_from_path"),
2003
+ 1,
2004
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2005
+ const jsi::Value *args, size_t count) -> jsi::Value {
2006
+ return this->cpp_uniffi_zcam1_c2pa_utils_fn_func_format_from_path(
2007
+ rt, thisVal, args, count);
2008
+ });
2009
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_u8"] =
2010
+ jsi::Function::createFromHostFunction(
2011
+ rt,
2012
+ jsi::PropNameID::forAscii(
2013
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_u8"),
2014
+ 3,
2015
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2016
+ const jsi::Value *args, size_t count) -> jsi::Value {
2017
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_u8(
2018
+ rt, thisVal, args, count);
2019
+ });
2020
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_u8"] =
2021
+ jsi::Function::createFromHostFunction(
2022
+ rt,
2023
+ jsi::PropNameID::forAscii(
2024
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_u8"),
2025
+ 1,
2026
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2027
+ const jsi::Value *args, size_t count) -> jsi::Value {
2028
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_u8(
2029
+ rt, thisVal, args, count);
2030
+ });
2031
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_u8"] =
2032
+ jsi::Function::createFromHostFunction(
2033
+ rt,
2034
+ jsi::PropNameID::forAscii(
2035
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_u8"),
2036
+ 1,
2037
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2038
+ const jsi::Value *args, size_t count) -> jsi::Value {
2039
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_u8(
2040
+ rt, thisVal, args, count);
2041
+ });
2042
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_u8"] =
2043
+ jsi::Function::createFromHostFunction(
2044
+ rt,
2045
+ jsi::PropNameID::forAscii(
2046
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_u8"),
2047
+ 1,
2048
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2049
+ const jsi::Value *args, size_t count) -> jsi::Value {
2050
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_u8(
2051
+ rt, thisVal, args, count);
2052
+ });
2053
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_i8"] =
2054
+ jsi::Function::createFromHostFunction(
2055
+ rt,
2056
+ jsi::PropNameID::forAscii(
2057
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_i8"),
2058
+ 3,
2059
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2060
+ const jsi::Value *args, size_t count) -> jsi::Value {
2061
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_i8(
2062
+ rt, thisVal, args, count);
2063
+ });
2064
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_i8"] =
2065
+ jsi::Function::createFromHostFunction(
2066
+ rt,
2067
+ jsi::PropNameID::forAscii(
2068
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_i8"),
2069
+ 1,
2070
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2071
+ const jsi::Value *args, size_t count) -> jsi::Value {
2072
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_i8(
2073
+ rt, thisVal, args, count);
2074
+ });
2075
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_i8"] =
2076
+ jsi::Function::createFromHostFunction(
2077
+ rt,
2078
+ jsi::PropNameID::forAscii(
2079
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_i8"),
2080
+ 1,
2081
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2082
+ const jsi::Value *args, size_t count) -> jsi::Value {
2083
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_i8(
2084
+ rt, thisVal, args, count);
2085
+ });
2086
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_i8"] =
2087
+ jsi::Function::createFromHostFunction(
2088
+ rt,
2089
+ jsi::PropNameID::forAscii(
2090
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_i8"),
2091
+ 1,
2092
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2093
+ const jsi::Value *args, size_t count) -> jsi::Value {
2094
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_i8(
2095
+ rt, thisVal, args, count);
2096
+ });
2097
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_u16"] =
2098
+ jsi::Function::createFromHostFunction(
2099
+ rt,
2100
+ jsi::PropNameID::forAscii(
2101
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_u16"),
2102
+ 3,
2103
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2104
+ const jsi::Value *args, size_t count) -> jsi::Value {
2105
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_u16(
2106
+ rt, thisVal, args, count);
2107
+ });
2108
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_u16"] =
2109
+ jsi::Function::createFromHostFunction(
2110
+ rt,
2111
+ jsi::PropNameID::forAscii(
2112
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_u16"),
2113
+ 1,
2114
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2115
+ const jsi::Value *args, size_t count) -> jsi::Value {
2116
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_u16(
2117
+ rt, thisVal, args, count);
2118
+ });
2119
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_u16"] =
2120
+ jsi::Function::createFromHostFunction(
2121
+ rt,
2122
+ jsi::PropNameID::forAscii(
2123
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_u16"),
2124
+ 1,
2125
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2126
+ const jsi::Value *args, size_t count) -> jsi::Value {
2127
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_u16(
2128
+ rt, thisVal, args, count);
2129
+ });
2130
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_u16"] =
2131
+ jsi::Function::createFromHostFunction(
2132
+ rt,
2133
+ jsi::PropNameID::forAscii(
2134
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_u16"),
2135
+ 1,
2136
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2137
+ const jsi::Value *args, size_t count) -> jsi::Value {
2138
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_u16(
2139
+ rt, thisVal, args, count);
2140
+ });
2141
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_i16"] =
2142
+ jsi::Function::createFromHostFunction(
2143
+ rt,
2144
+ jsi::PropNameID::forAscii(
2145
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_i16"),
2146
+ 3,
2147
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2148
+ const jsi::Value *args, size_t count) -> jsi::Value {
2149
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_i16(
2150
+ rt, thisVal, args, count);
2151
+ });
2152
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_i16"] =
2153
+ jsi::Function::createFromHostFunction(
2154
+ rt,
2155
+ jsi::PropNameID::forAscii(
2156
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_i16"),
2157
+ 1,
2158
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2159
+ const jsi::Value *args, size_t count) -> jsi::Value {
2160
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_i16(
2161
+ rt, thisVal, args, count);
2162
+ });
2163
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_i16"] =
2164
+ jsi::Function::createFromHostFunction(
2165
+ rt,
2166
+ jsi::PropNameID::forAscii(
2167
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_i16"),
2168
+ 1,
2169
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2170
+ const jsi::Value *args, size_t count) -> jsi::Value {
2171
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_i16(
2172
+ rt, thisVal, args, count);
2173
+ });
2174
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_i16"] =
2175
+ jsi::Function::createFromHostFunction(
2176
+ rt,
2177
+ jsi::PropNameID::forAscii(
2178
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_i16"),
2179
+ 1,
2180
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2181
+ const jsi::Value *args, size_t count) -> jsi::Value {
2182
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_i16(
2183
+ rt, thisVal, args, count);
2184
+ });
2185
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_u32"] =
2186
+ jsi::Function::createFromHostFunction(
2187
+ rt,
2188
+ jsi::PropNameID::forAscii(
2189
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_u32"),
2190
+ 3,
2191
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2192
+ const jsi::Value *args, size_t count) -> jsi::Value {
2193
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_u32(
2194
+ rt, thisVal, args, count);
2195
+ });
2196
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_u32"] =
2197
+ jsi::Function::createFromHostFunction(
2198
+ rt,
2199
+ jsi::PropNameID::forAscii(
2200
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_u32"),
2201
+ 1,
2202
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2203
+ const jsi::Value *args, size_t count) -> jsi::Value {
2204
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_u32(
2205
+ rt, thisVal, args, count);
2206
+ });
2207
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_u32"] =
2208
+ jsi::Function::createFromHostFunction(
2209
+ rt,
2210
+ jsi::PropNameID::forAscii(
2211
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_u32"),
2212
+ 1,
2213
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2214
+ const jsi::Value *args, size_t count) -> jsi::Value {
2215
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_u32(
2216
+ rt, thisVal, args, count);
2217
+ });
2218
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_u32"] =
2219
+ jsi::Function::createFromHostFunction(
2220
+ rt,
2221
+ jsi::PropNameID::forAscii(
2222
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_u32"),
2223
+ 1,
2224
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2225
+ const jsi::Value *args, size_t count) -> jsi::Value {
2226
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_u32(
2227
+ rt, thisVal, args, count);
2228
+ });
2229
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_i32"] =
2230
+ jsi::Function::createFromHostFunction(
2231
+ rt,
2232
+ jsi::PropNameID::forAscii(
2233
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_i32"),
2234
+ 3,
2235
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2236
+ const jsi::Value *args, size_t count) -> jsi::Value {
2237
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_i32(
2238
+ rt, thisVal, args, count);
2239
+ });
2240
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_i32"] =
2241
+ jsi::Function::createFromHostFunction(
2242
+ rt,
2243
+ jsi::PropNameID::forAscii(
2244
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_i32"),
2245
+ 1,
2246
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2247
+ const jsi::Value *args, size_t count) -> jsi::Value {
2248
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_i32(
2249
+ rt, thisVal, args, count);
2250
+ });
2251
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_i32"] =
2252
+ jsi::Function::createFromHostFunction(
2253
+ rt,
2254
+ jsi::PropNameID::forAscii(
2255
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_i32"),
2256
+ 1,
2257
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2258
+ const jsi::Value *args, size_t count) -> jsi::Value {
2259
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_i32(
2260
+ rt, thisVal, args, count);
2261
+ });
2262
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_i32"] =
2263
+ jsi::Function::createFromHostFunction(
2264
+ rt,
2265
+ jsi::PropNameID::forAscii(
2266
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_i32"),
2267
+ 1,
2268
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2269
+ const jsi::Value *args, size_t count) -> jsi::Value {
2270
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_i32(
2271
+ rt, thisVal, args, count);
2272
+ });
2273
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_u64"] =
2274
+ jsi::Function::createFromHostFunction(
2275
+ rt,
2276
+ jsi::PropNameID::forAscii(
2277
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_u64"),
2278
+ 3,
2279
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2280
+ const jsi::Value *args, size_t count) -> jsi::Value {
2281
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_u64(
2282
+ rt, thisVal, args, count);
2283
+ });
2284
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_u64"] =
2285
+ jsi::Function::createFromHostFunction(
2286
+ rt,
2287
+ jsi::PropNameID::forAscii(
2288
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_u64"),
2289
+ 1,
2290
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2291
+ const jsi::Value *args, size_t count) -> jsi::Value {
2292
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_u64(
2293
+ rt, thisVal, args, count);
2294
+ });
2295
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_u64"] =
2296
+ jsi::Function::createFromHostFunction(
2297
+ rt,
2298
+ jsi::PropNameID::forAscii(
2299
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_u64"),
2300
+ 1,
2301
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2302
+ const jsi::Value *args, size_t count) -> jsi::Value {
2303
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_u64(
2304
+ rt, thisVal, args, count);
2305
+ });
2306
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_u64"] =
2307
+ jsi::Function::createFromHostFunction(
2308
+ rt,
2309
+ jsi::PropNameID::forAscii(
2310
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_u64"),
2311
+ 1,
2312
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2313
+ const jsi::Value *args, size_t count) -> jsi::Value {
2314
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_u64(
2315
+ rt, thisVal, args, count);
2316
+ });
2317
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_i64"] =
2318
+ jsi::Function::createFromHostFunction(
2319
+ rt,
2320
+ jsi::PropNameID::forAscii(
2321
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_i64"),
2322
+ 3,
2323
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2324
+ const jsi::Value *args, size_t count) -> jsi::Value {
2325
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_i64(
2326
+ rt, thisVal, args, count);
2327
+ });
2328
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_i64"] =
2329
+ jsi::Function::createFromHostFunction(
2330
+ rt,
2331
+ jsi::PropNameID::forAscii(
2332
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_i64"),
2333
+ 1,
2334
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2335
+ const jsi::Value *args, size_t count) -> jsi::Value {
2336
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_i64(
2337
+ rt, thisVal, args, count);
2338
+ });
2339
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_i64"] =
2340
+ jsi::Function::createFromHostFunction(
2341
+ rt,
2342
+ jsi::PropNameID::forAscii(
2343
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_i64"),
2344
+ 1,
2345
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2346
+ const jsi::Value *args, size_t count) -> jsi::Value {
2347
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_i64(
2348
+ rt, thisVal, args, count);
2349
+ });
2350
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_i64"] =
2351
+ jsi::Function::createFromHostFunction(
2352
+ rt,
2353
+ jsi::PropNameID::forAscii(
2354
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_i64"),
2355
+ 1,
2356
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2357
+ const jsi::Value *args, size_t count) -> jsi::Value {
2358
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_i64(
2359
+ rt, thisVal, args, count);
2360
+ });
2361
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_f32"] =
2362
+ jsi::Function::createFromHostFunction(
2363
+ rt,
2364
+ jsi::PropNameID::forAscii(
2365
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_f32"),
2366
+ 3,
2367
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2368
+ const jsi::Value *args, size_t count) -> jsi::Value {
2369
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_f32(
2370
+ rt, thisVal, args, count);
2371
+ });
2372
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_f32"] =
2373
+ jsi::Function::createFromHostFunction(
2374
+ rt,
2375
+ jsi::PropNameID::forAscii(
2376
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_f32"),
2377
+ 1,
2378
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2379
+ const jsi::Value *args, size_t count) -> jsi::Value {
2380
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_f32(
2381
+ rt, thisVal, args, count);
2382
+ });
2383
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_f32"] =
2384
+ jsi::Function::createFromHostFunction(
2385
+ rt,
2386
+ jsi::PropNameID::forAscii(
2387
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_f32"),
2388
+ 1,
2389
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2390
+ const jsi::Value *args, size_t count) -> jsi::Value {
2391
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_f32(
2392
+ rt, thisVal, args, count);
2393
+ });
2394
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_f32"] =
2395
+ jsi::Function::createFromHostFunction(
2396
+ rt,
2397
+ jsi::PropNameID::forAscii(
2398
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_f32"),
2399
+ 1,
2400
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2401
+ const jsi::Value *args, size_t count) -> jsi::Value {
2402
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_f32(
2403
+ rt, thisVal, args, count);
2404
+ });
2405
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_f64"] =
2406
+ jsi::Function::createFromHostFunction(
2407
+ rt,
2408
+ jsi::PropNameID::forAscii(
2409
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_f64"),
2410
+ 3,
2411
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2412
+ const jsi::Value *args, size_t count) -> jsi::Value {
2413
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_f64(
2414
+ rt, thisVal, args, count);
2415
+ });
2416
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_f64"] =
2417
+ jsi::Function::createFromHostFunction(
2418
+ rt,
2419
+ jsi::PropNameID::forAscii(
2420
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_f64"),
2421
+ 1,
2422
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2423
+ const jsi::Value *args, size_t count) -> jsi::Value {
2424
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_f64(
2425
+ rt, thisVal, args, count);
2426
+ });
2427
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_f64"] =
2428
+ jsi::Function::createFromHostFunction(
2429
+ rt,
2430
+ jsi::PropNameID::forAscii(
2431
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_f64"),
2432
+ 1,
2433
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2434
+ const jsi::Value *args, size_t count) -> jsi::Value {
2435
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_f64(
2436
+ rt, thisVal, args, count);
2437
+ });
2438
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_f64"] =
2439
+ jsi::Function::createFromHostFunction(
2440
+ rt,
2441
+ jsi::PropNameID::forAscii(
2442
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_f64"),
2443
+ 1,
2444
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2445
+ const jsi::Value *args, size_t count) -> jsi::Value {
2446
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_f64(
2447
+ rt, thisVal, args, count);
2448
+ });
2449
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_pointer"] =
2450
+ jsi::Function::createFromHostFunction(
2451
+ rt,
2452
+ jsi::PropNameID::forAscii(
2453
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_pointer"),
2454
+ 3,
2455
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2456
+ const jsi::Value *args, size_t count) -> jsi::Value {
2457
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_pointer(
2458
+ rt, thisVal, args, count);
2459
+ });
2460
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_pointer"] =
2461
+ jsi::Function::createFromHostFunction(
2462
+ rt,
2463
+ jsi::PropNameID::forAscii(
2464
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_pointer"),
2465
+ 1,
2466
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2467
+ const jsi::Value *args, size_t count) -> jsi::Value {
2468
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_pointer(
2469
+ rt, thisVal, args, count);
2470
+ });
2471
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_pointer"] =
2472
+ jsi::Function::createFromHostFunction(
2473
+ rt,
2474
+ jsi::PropNameID::forAscii(
2475
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_pointer"),
2476
+ 1,
2477
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2478
+ const jsi::Value *args, size_t count) -> jsi::Value {
2479
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_pointer(
2480
+ rt, thisVal, args, count);
2481
+ });
2482
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_pointer"] =
2483
+ jsi::Function::createFromHostFunction(
2484
+ rt,
2485
+ jsi::PropNameID::forAscii(
2486
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_pointer"),
2487
+ 1,
2488
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2489
+ const jsi::Value *args, size_t count) -> jsi::Value {
2490
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_pointer(
2491
+ rt, thisVal, args, count);
2492
+ });
2493
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_rust_buffer"] =
2494
+ jsi::Function::createFromHostFunction(
2495
+ rt,
2496
+ jsi::PropNameID::forAscii(
2497
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_rust_buffer"),
2498
+ 3,
2499
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2500
+ const jsi::Value *args, size_t count) -> jsi::Value {
2501
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_rust_buffer(
2502
+ rt, thisVal, args, count);
2503
+ });
2504
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_rust_buffer"] =
2505
+ jsi::Function::createFromHostFunction(
2506
+ rt,
2507
+ jsi::PropNameID::forAscii(
2508
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_rust_buffer"),
2509
+ 1,
2510
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2511
+ const jsi::Value *args, size_t count) -> jsi::Value {
2512
+ return this
2513
+ ->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_rust_buffer(
2514
+ rt, thisVal, args, count);
2515
+ });
2516
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_rust_buffer"] =
2517
+ jsi::Function::createFromHostFunction(
2518
+ rt,
2519
+ jsi::PropNameID::forAscii(
2520
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_rust_buffer"),
2521
+ 1,
2522
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2523
+ const jsi::Value *args, size_t count) -> jsi::Value {
2524
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_rust_buffer(
2525
+ rt, thisVal, args, count);
2526
+ });
2527
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_rust_buffer"] =
2528
+ jsi::Function::createFromHostFunction(
2529
+ rt,
2530
+ jsi::PropNameID::forAscii(
2531
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_rust_buffer"),
2532
+ 1,
2533
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2534
+ const jsi::Value *args, size_t count) -> jsi::Value {
2535
+ return this
2536
+ ->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_rust_buffer(
2537
+ rt, thisVal, args, count);
2538
+ });
2539
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_void"] =
2540
+ jsi::Function::createFromHostFunction(
2541
+ rt,
2542
+ jsi::PropNameID::forAscii(
2543
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_poll_void"),
2544
+ 3,
2545
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2546
+ const jsi::Value *args, size_t count) -> jsi::Value {
2547
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_poll_void(
2548
+ rt, thisVal, args, count);
2549
+ });
2550
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_void"] =
2551
+ jsi::Function::createFromHostFunction(
2552
+ rt,
2553
+ jsi::PropNameID::forAscii(
2554
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_cancel_void"),
2555
+ 1,
2556
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2557
+ const jsi::Value *args, size_t count) -> jsi::Value {
2558
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_void(
2559
+ rt, thisVal, args, count);
2560
+ });
2561
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_free_void"] =
2562
+ jsi::Function::createFromHostFunction(
2563
+ rt,
2564
+ jsi::PropNameID::forAscii(
2565
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_free_void"),
2566
+ 1,
2567
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2568
+ const jsi::Value *args, size_t count) -> jsi::Value {
2569
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_free_void(
2570
+ rt, thisVal, args, count);
2571
+ });
2572
+ props["ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_void"] =
2573
+ jsi::Function::createFromHostFunction(
2574
+ rt,
2575
+ jsi::PropNameID::forAscii(
2576
+ rt, "ubrn_ffi_zcam1_c2pa_utils_rust_future_complete_void"),
2577
+ 1,
2578
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2579
+ const jsi::Value *args, size_t count) -> jsi::Value {
2580
+ return this->cpp_ffi_zcam1_c2pa_utils_rust_future_complete_void(
2581
+ rt, thisVal, args, count);
2582
+ });
2583
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_func_authenticity_status"] =
2584
+ jsi::Function::createFromHostFunction(
2585
+ rt,
2586
+ jsi::PropNameID::forAscii(
2587
+ rt,
2588
+ "ubrn_uniffi_zcam1_c2pa_utils_checksum_func_authenticity_status"),
2589
+ 0,
2590
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2591
+ const jsi::Value *args, size_t count) -> jsi::Value {
2592
+ return this
2593
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_func_authenticity_status(
2594
+ rt, thisVal, args, count);
2595
+ });
2596
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_func_compute_hash"] =
2597
+ jsi::Function::createFromHostFunction(
2598
+ rt,
2599
+ jsi::PropNameID::forAscii(
2600
+ rt, "ubrn_uniffi_zcam1_c2pa_utils_checksum_func_compute_hash"),
2601
+ 0,
2602
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2603
+ const jsi::Value *args, size_t count) -> jsi::Value {
2604
+ return this->cpp_uniffi_zcam1_c2pa_utils_checksum_func_compute_hash(
2605
+ rt, thisVal, args, count);
2606
+ });
2607
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_func_compute_hash_from_buffer"] =
2608
+ jsi::Function::createFromHostFunction(
2609
+ rt,
2610
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_checksum_"
2611
+ "func_compute_hash_from_buffer"),
2612
+ 0,
2613
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2614
+ const jsi::Value *args, size_t count) -> jsi::Value {
2615
+ return this
2616
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_func_compute_hash_from_buffer(
2617
+ rt, thisVal, args, count);
2618
+ });
2619
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_func_extract_manifest"] =
2620
+ jsi::Function::createFromHostFunction(
2621
+ rt,
2622
+ jsi::PropNameID::forAscii(
2623
+ rt,
2624
+ "ubrn_uniffi_zcam1_c2pa_utils_checksum_func_extract_manifest"),
2625
+ 0,
2626
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2627
+ const jsi::Value *args, size_t count) -> jsi::Value {
2628
+ return this
2629
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_func_extract_manifest(
2630
+ rt, thisVal, args, count);
2631
+ });
2632
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_func_format_from_path"] =
2633
+ jsi::Function::createFromHostFunction(
2634
+ rt,
2635
+ jsi::PropNameID::forAscii(
2636
+ rt,
2637
+ "ubrn_uniffi_zcam1_c2pa_utils_checksum_func_format_from_path"),
2638
+ 0,
2639
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2640
+ const jsi::Value *args, size_t count) -> jsi::Value {
2641
+ return this
2642
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_func_format_from_path(
2643
+ rt, thisVal, args, count);
2644
+ });
2645
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifest_bindings"] =
2646
+ jsi::Function::createFromHostFunction(
2647
+ rt,
2648
+ jsi::PropNameID::forAscii(
2649
+ rt,
2650
+ "ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifest_bindings"),
2651
+ 0,
2652
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2653
+ const jsi::Value *args, size_t count) -> jsi::Value {
2654
+ return this
2655
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifest_bindings(
2656
+ rt, thisVal, args, count);
2657
+ });
2658
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifest_capture_"
2659
+ "metadata_action"] = jsi::Function::createFromHostFunction(
2660
+ rt,
2661
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_checksum_"
2662
+ "method_manifest_capture_metadata_action"),
2663
+ 0,
2664
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2665
+ const jsi::Value *args, size_t count) -> jsi::Value {
2666
+ return this
2667
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifest_capture_metadata_action(
2668
+ rt, thisVal, args, count);
2669
+ });
2670
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifest_proof"] =
2671
+ jsi::Function::createFromHostFunction(
2672
+ rt,
2673
+ jsi::PropNameID::forAscii(
2674
+ rt,
2675
+ "ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifest_proof"),
2676
+ 0,
2677
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2678
+ const jsi::Value *args, size_t count) -> jsi::Value {
2679
+ return this
2680
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifest_proof(
2681
+ rt, thisVal, args, count);
2682
+ });
2683
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_"
2684
+ "assertion"] = jsi::Function::createFromHostFunction(
2685
+ rt,
2686
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_checksum_"
2687
+ "method_manifesteditor_add_assertion"),
2688
+ 0,
2689
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2690
+ const jsi::Value *args, size_t count) -> jsi::Value {
2691
+ return this
2692
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_assertion(
2693
+ rt, thisVal, args, count);
2694
+ });
2695
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_photo_"
2696
+ "metadata_action"] = jsi::Function::createFromHostFunction(
2697
+ rt,
2698
+ jsi::PropNameID::forAscii(rt,
2699
+ "ubrn_uniffi_zcam1_c2pa_utils_checksum_method_"
2700
+ "manifesteditor_add_photo_metadata_action"),
2701
+ 0,
2702
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2703
+ const jsi::Value *args, size_t count) -> jsi::Value {
2704
+ return this
2705
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_photo_metadata_action(
2706
+ rt, thisVal, args, count);
2707
+ });
2708
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_"
2709
+ "title"] = jsi::Function::createFromHostFunction(
2710
+ rt,
2711
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_checksum_"
2712
+ "method_manifesteditor_add_title"),
2713
+ 0,
2714
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2715
+ const jsi::Value *args, size_t count) -> jsi::Value {
2716
+ return this
2717
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_title(
2718
+ rt, thisVal, args, count);
2719
+ });
2720
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_video_"
2721
+ "metadata_action"] = jsi::Function::createFromHostFunction(
2722
+ rt,
2723
+ jsi::PropNameID::forAscii(rt,
2724
+ "ubrn_uniffi_zcam1_c2pa_utils_checksum_method_"
2725
+ "manifesteditor_add_video_metadata_action"),
2726
+ 0,
2727
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2728
+ const jsi::Value *args, size_t count) -> jsi::Value {
2729
+ return this
2730
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_video_metadata_action(
2731
+ rt, thisVal, args, count);
2732
+ });
2733
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_embed_"
2734
+ "manifest_to_file"] = jsi::Function::createFromHostFunction(
2735
+ rt,
2736
+ jsi::PropNameID::forAscii(rt,
2737
+ "ubrn_uniffi_zcam1_c2pa_utils_checksum_method_"
2738
+ "manifesteditor_embed_manifest_to_file"),
2739
+ 0,
2740
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2741
+ const jsi::Value *args, size_t count) -> jsi::Value {
2742
+ return this
2743
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_embed_manifest_to_file(
2744
+ rt, thisVal, args, count);
2745
+ });
2746
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_remove_"
2747
+ "assertion"] = jsi::Function::createFromHostFunction(
2748
+ rt,
2749
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_checksum_"
2750
+ "method_manifesteditor_remove_assertion"),
2751
+ 0,
2752
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2753
+ const jsi::Value *args, size_t count) -> jsi::Value {
2754
+ return this
2755
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_remove_assertion(
2756
+ rt, thisVal, args, count);
2757
+ });
2758
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_method_manifeststore_active_"
2759
+ "manifest"] = jsi::Function::createFromHostFunction(
2760
+ rt,
2761
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_checksum_"
2762
+ "method_manifeststore_active_manifest"),
2763
+ 0,
2764
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2765
+ const jsi::Value *args, size_t count) -> jsi::Value {
2766
+ return this
2767
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifeststore_active_manifest(
2768
+ rt, thisVal, args, count);
2769
+ });
2770
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_from_"
2771
+ "manifest"] = jsi::Function::createFromHostFunction(
2772
+ rt,
2773
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_checksum_"
2774
+ "constructor_manifesteditor_from_manifest"),
2775
+ 0,
2776
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2777
+ const jsi::Value *args, size_t count) -> jsi::Value {
2778
+ return this
2779
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_from_manifest(
2780
+ rt, thisVal, args, count);
2781
+ });
2782
+ props["ubrn_uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_"
2783
+ "new"] = jsi::Function::createFromHostFunction(
2784
+ rt,
2785
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_zcam1_c2pa_utils_checksum_"
2786
+ "constructor_manifesteditor_new"),
2787
+ 0,
2788
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2789
+ const jsi::Value *args, size_t count) -> jsi::Value {
2790
+ return this
2791
+ ->cpp_uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_new(
2792
+ rt, thisVal, args, count);
2793
+ });
2794
+ props["ubrn_ffi_zcam1_c2pa_utils_uniffi_contract_version"] =
2795
+ jsi::Function::createFromHostFunction(
2796
+ rt,
2797
+ jsi::PropNameID::forAscii(
2798
+ rt, "ubrn_ffi_zcam1_c2pa_utils_uniffi_contract_version"),
2799
+ 0,
2800
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2801
+ const jsi::Value *args, size_t count) -> jsi::Value {
2802
+ return this->cpp_ffi_zcam1_c2pa_utils_uniffi_contract_version(
2803
+ rt, thisVal, args, count);
2804
+ });
2805
+ props["ubrn_uniffi_internal_fn_method_manifest_ffi__bless_pointer"] =
2806
+ jsi::Function::createFromHostFunction(
2807
+ rt,
2808
+ jsi::PropNameID::forAscii(
2809
+ rt, "ubrn_uniffi_internal_fn_method_manifest_ffi__bless_pointer"),
2810
+ 1,
2811
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2812
+ const jsi::Value *args, size_t count) -> jsi::Value {
2813
+ return this
2814
+ ->cpp_uniffi_internal_fn_method_manifest_ffi__bless_pointer(
2815
+ rt, thisVal, args, count);
2816
+ });
2817
+ props["ubrn_uniffi_internal_fn_method_manifesteditor_ffi__bless_pointer"] =
2818
+ jsi::Function::createFromHostFunction(
2819
+ rt,
2820
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_"
2821
+ "manifesteditor_ffi__bless_pointer"),
2822
+ 1,
2823
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2824
+ const jsi::Value *args, size_t count) -> jsi::Value {
2825
+ return this
2826
+ ->cpp_uniffi_internal_fn_method_manifesteditor_ffi__bless_pointer(
2827
+ rt, thisVal, args, count);
2828
+ });
2829
+ props["ubrn_uniffi_internal_fn_method_manifeststore_ffi__bless_pointer"] =
2830
+ jsi::Function::createFromHostFunction(
2831
+ rt,
2832
+ jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_"
2833
+ "manifeststore_ffi__bless_pointer"),
2834
+ 1,
2835
+ [this](jsi::Runtime &rt, const jsi::Value &thisVal,
2836
+ const jsi::Value *args, size_t count) -> jsi::Value {
2837
+ return this
2838
+ ->cpp_uniffi_internal_fn_method_manifeststore_ffi__bless_pointer(
2839
+ rt, thisVal, args, count);
2840
+ });
2841
+ }
2842
+
2843
+ void NativeZcam1C2paUtils::registerModule(
2844
+ jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> callInvoker) {
2845
+ auto invoker =
2846
+ std::make_shared<uniffi_runtime::UniffiCallInvoker>(callInvoker);
2847
+ auto tm = std::make_shared<NativeZcam1C2paUtils>(rt, invoker);
2848
+ auto obj = rt.global().createFromHostObject(rt, tm);
2849
+ rt.global().setProperty(rt, "NativeZcam1C2paUtils", obj);
2850
+ }
2851
+
2852
+ void NativeZcam1C2paUtils::unregisterModule(jsi::Runtime &rt) {
2853
+ uniffi::zcam1_c2pa_utils::registry::clearRegistry();
2854
+ }
2855
+
2856
+ jsi::Value NativeZcam1C2paUtils::get(jsi::Runtime &rt,
2857
+ const jsi::PropNameID &name) {
2858
+ try {
2859
+ return jsi::Value(rt, props.at(name.utf8(rt)));
2860
+ } catch (std::out_of_range &e) {
2861
+ return jsi::Value::undefined();
2862
+ }
2863
+ }
2864
+
2865
+ std::vector<jsi::PropNameID>
2866
+ NativeZcam1C2paUtils::getPropertyNames(jsi::Runtime &rt) {
2867
+ std::vector<jsi::PropNameID> rval;
2868
+ for (auto &[key, value] : props) {
2869
+ rval.push_back(jsi::PropNameID::forUtf8(rt, key));
2870
+ }
2871
+ return rval;
2872
+ }
2873
+
2874
+ void NativeZcam1C2paUtils::set(jsi::Runtime &rt, const jsi::PropNameID &name,
2875
+ const jsi::Value &value) {
2876
+ props.insert_or_assign(name.utf8(rt), &value);
2877
+ }
2878
+
2879
+ NativeZcam1C2paUtils::~NativeZcam1C2paUtils() {
2880
+ // Cleanup for callback function RustFutureContinuationCallback
2881
+ uniffi::zcam1_c2pa_utils::cb::rustfuturecontinuationcallback::cleanup();
2882
+ // Cleanup for "free" callback function CallbackInterfaceFree
2883
+ uniffi::zcam1_c2pa_utils::st::foreignfuture::foreignfuture::free::cleanup();
2884
+ }
2885
+
2886
+ // Utility functions for serialization/deserialization of strings.
2887
+ jsi::Value
2888
+ NativeZcam1C2paUtils::cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(
2889
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2890
+ size_t count) {
2891
+ return uniffi_jsi::Bridging<std::string>::string_to_bytelength(rt, args[0]);
2892
+ }
2893
+
2894
+ jsi::Value
2895
+ NativeZcam1C2paUtils::cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(
2896
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2897
+ size_t count) {
2898
+ return uniffi_jsi::Bridging<std::string>::string_to_arraybuffer(rt, args[0]);
2899
+ }
2900
+
2901
+ jsi::Value
2902
+ NativeZcam1C2paUtils::cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
2903
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2904
+ size_t count) {
2905
+ return uniffi_jsi::Bridging<std::string>::arraybuffer_to_string(rt, args[0]);
2906
+ }
2907
+ jsi::Value
2908
+ NativeZcam1C2paUtils::cpp_uniffi_internal_fn_method_manifest_ffi__bless_pointer(
2909
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2910
+ size_t count) {
2911
+ auto pointer =
2912
+ uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
2913
+ auto static destructor = [](uint64_t p) {
2914
+ auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
2915
+ RustCallStatus status = {0};
2916
+ uniffi_zcam1_c2pa_utils_fn_free_manifest(pointer, &status);
2917
+ };
2918
+ auto ptrObj =
2919
+ std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
2920
+ auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
2921
+ return jsi::Value(rt, obj);
2922
+ }
2923
+ jsi::Value NativeZcam1C2paUtils::
2924
+ cpp_uniffi_internal_fn_method_manifesteditor_ffi__bless_pointer(
2925
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2926
+ size_t count) {
2927
+ auto pointer =
2928
+ uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
2929
+ auto static destructor = [](uint64_t p) {
2930
+ auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
2931
+ RustCallStatus status = {0};
2932
+ uniffi_zcam1_c2pa_utils_fn_free_manifesteditor(pointer, &status);
2933
+ };
2934
+ auto ptrObj =
2935
+ std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
2936
+ auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
2937
+ return jsi::Value(rt, obj);
2938
+ }
2939
+ jsi::Value NativeZcam1C2paUtils::
2940
+ cpp_uniffi_internal_fn_method_manifeststore_ffi__bless_pointer(
2941
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2942
+ size_t count) {
2943
+ auto pointer =
2944
+ uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
2945
+ auto static destructor = [](uint64_t p) {
2946
+ auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
2947
+ RustCallStatus status = {0};
2948
+ uniffi_zcam1_c2pa_utils_fn_free_manifeststore(pointer, &status);
2949
+ };
2950
+ auto ptrObj =
2951
+ std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
2952
+ auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
2953
+ return jsi::Value(rt, obj);
2954
+ }
2955
+
2956
+ // Methods calling directly into the uniffi generated C API of the Rust crate.
2957
+ jsi::Value NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_clone_manifest(
2958
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2959
+ size_t count) {
2960
+ RustCallStatus status =
2961
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
2962
+ auto value = uniffi_zcam1_c2pa_utils_fn_clone_manifest(
2963
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
2964
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
2965
+ rt, callInvoker, status, args[count - 1]);
2966
+
2967
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
2968
+ }
2969
+ jsi::Value NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_free_manifest(
2970
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2971
+ size_t count) {
2972
+ RustCallStatus status =
2973
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
2974
+ uniffi_zcam1_c2pa_utils_fn_free_manifest(
2975
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
2976
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
2977
+ rt, callInvoker, status, args[count - 1]);
2978
+
2979
+ return jsi::Value::undefined();
2980
+ }
2981
+ jsi::Value
2982
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_method_manifest_bindings(
2983
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2984
+ size_t count) {
2985
+ RustCallStatus status =
2986
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
2987
+ auto value = uniffi_zcam1_c2pa_utils_fn_method_manifest_bindings(
2988
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
2989
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
2990
+ rt, callInvoker, status, args[count - 1]);
2991
+
2992
+ return uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::toJs(rt, callInvoker,
2993
+ value);
2994
+ }
2995
+ jsi::Value NativeZcam1C2paUtils::
2996
+ cpp_uniffi_zcam1_c2pa_utils_fn_method_manifest_capture_metadata_action(
2997
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2998
+ size_t count) {
2999
+ RustCallStatus status =
3000
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3001
+ auto value =
3002
+ uniffi_zcam1_c2pa_utils_fn_method_manifest_capture_metadata_action(
3003
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
3004
+ &status);
3005
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3006
+ rt, callInvoker, status, args[count - 1]);
3007
+
3008
+ return uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::toJs(rt, callInvoker,
3009
+ value);
3010
+ }
3011
+ jsi::Value
3012
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_method_manifest_proof(
3013
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3014
+ size_t count) {
3015
+ RustCallStatus status =
3016
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3017
+ auto value = uniffi_zcam1_c2pa_utils_fn_method_manifest_proof(
3018
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
3019
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3020
+ rt, callInvoker, status, args[count - 1]);
3021
+
3022
+ return uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::toJs(rt, callInvoker,
3023
+ value);
3024
+ }
3025
+ jsi::Value
3026
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_clone_manifesteditor(
3027
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3028
+ size_t count) {
3029
+ RustCallStatus status =
3030
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3031
+ auto value = uniffi_zcam1_c2pa_utils_fn_clone_manifesteditor(
3032
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
3033
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3034
+ rt, callInvoker, status, args[count - 1]);
3035
+
3036
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
3037
+ }
3038
+ jsi::Value
3039
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_free_manifesteditor(
3040
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3041
+ size_t count) {
3042
+ RustCallStatus status =
3043
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3044
+ uniffi_zcam1_c2pa_utils_fn_free_manifesteditor(
3045
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
3046
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3047
+ rt, callInvoker, status, args[count - 1]);
3048
+
3049
+ return jsi::Value::undefined();
3050
+ }
3051
+ jsi::Value NativeZcam1C2paUtils::
3052
+ cpp_uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_from_manifest(
3053
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3054
+ size_t count) {
3055
+ RustCallStatus status =
3056
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3057
+ auto value =
3058
+ uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_from_manifest(
3059
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3060
+ rt, callInvoker, args[0]),
3061
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3062
+ rt, callInvoker, args[1]),
3063
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3064
+ rt, callInvoker, args[2]),
3065
+ &status);
3066
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3067
+ rt, callInvoker, status, args[count - 1]);
3068
+
3069
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
3070
+ }
3071
+ jsi::Value NativeZcam1C2paUtils::
3072
+ cpp_uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_new(
3073
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3074
+ size_t count) {
3075
+ RustCallStatus status =
3076
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3077
+ auto value = uniffi_zcam1_c2pa_utils_fn_constructor_manifesteditor_new(
3078
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3079
+ args[0]),
3080
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3081
+ args[1]),
3082
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3083
+ args[2]),
3084
+ &status);
3085
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3086
+ rt, callInvoker, status, args[count - 1]);
3087
+
3088
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
3089
+ }
3090
+ jsi::Value NativeZcam1C2paUtils::
3091
+ cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_assertion(
3092
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3093
+ size_t count) {
3094
+ RustCallStatus status =
3095
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3096
+ uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_assertion(
3097
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
3098
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3099
+ args[1]),
3100
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3101
+ args[2]),
3102
+ &status);
3103
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3104
+ rt, callInvoker, status, args[count - 1]);
3105
+
3106
+ return jsi::Value::undefined();
3107
+ }
3108
+ jsi::Value NativeZcam1C2paUtils::
3109
+ cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_photo_metadata_action(
3110
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3111
+ size_t count) {
3112
+ RustCallStatus status =
3113
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3114
+ auto value =
3115
+ uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_photo_metadata_action(
3116
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
3117
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3118
+ rt, callInvoker, args[1]),
3119
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3120
+ rt, callInvoker, args[2]),
3121
+ &status);
3122
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3123
+ rt, callInvoker, status, args[count - 1]);
3124
+
3125
+ return uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::toJs(rt, callInvoker,
3126
+ value);
3127
+ }
3128
+ jsi::Value NativeZcam1C2paUtils::
3129
+ cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_title(
3130
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3131
+ size_t count) {
3132
+ RustCallStatus status =
3133
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3134
+ uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_title(
3135
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
3136
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3137
+ args[1]),
3138
+ &status);
3139
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3140
+ rt, callInvoker, status, args[count - 1]);
3141
+
3142
+ return jsi::Value::undefined();
3143
+ }
3144
+ jsi::Value NativeZcam1C2paUtils::
3145
+ cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_video_metadata_action(
3146
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3147
+ size_t count) {
3148
+ RustCallStatus status =
3149
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3150
+ auto value =
3151
+ uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_add_video_metadata_action(
3152
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
3153
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3154
+ rt, callInvoker, args[1]),
3155
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3156
+ rt, callInvoker, args[2]),
3157
+ &status);
3158
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3159
+ rt, callInvoker, status, args[count - 1]);
3160
+
3161
+ return uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::toJs(rt, callInvoker,
3162
+ value);
3163
+ }
3164
+ jsi::Value NativeZcam1C2paUtils::
3165
+ cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_embed_manifest_to_file(
3166
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3167
+ size_t count) {
3168
+ auto value =
3169
+ uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_embed_manifest_to_file(
3170
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
3171
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3172
+ rt, callInvoker, args[1]),
3173
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3174
+ rt, callInvoker, args[2]));
3175
+
3176
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
3177
+ value);
3178
+ }
3179
+ jsi::Value NativeZcam1C2paUtils::
3180
+ cpp_uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_remove_assertion(
3181
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3182
+ size_t count) {
3183
+ RustCallStatus status =
3184
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3185
+ auto value =
3186
+ uniffi_zcam1_c2pa_utils_fn_method_manifesteditor_remove_assertion(
3187
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
3188
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(
3189
+ rt, callInvoker, args[1]),
3190
+ &status);
3191
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3192
+ rt, callInvoker, status, args[count - 1]);
3193
+
3194
+ return uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, value);
3195
+ }
3196
+ jsi::Value
3197
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_clone_manifeststore(
3198
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3199
+ size_t count) {
3200
+ RustCallStatus status =
3201
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3202
+ auto value = uniffi_zcam1_c2pa_utils_fn_clone_manifeststore(
3203
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
3204
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3205
+ rt, callInvoker, status, args[count - 1]);
3206
+
3207
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
3208
+ }
3209
+ jsi::Value
3210
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_free_manifeststore(
3211
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3212
+ size_t count) {
3213
+ RustCallStatus status =
3214
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3215
+ uniffi_zcam1_c2pa_utils_fn_free_manifeststore(
3216
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
3217
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3218
+ rt, callInvoker, status, args[count - 1]);
3219
+
3220
+ return jsi::Value::undefined();
3221
+ }
3222
+ jsi::Value NativeZcam1C2paUtils::
3223
+ cpp_uniffi_zcam1_c2pa_utils_fn_method_manifeststore_active_manifest(
3224
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3225
+ size_t count) {
3226
+ RustCallStatus status =
3227
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3228
+ auto value = uniffi_zcam1_c2pa_utils_fn_method_manifeststore_active_manifest(
3229
+ uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
3230
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3231
+ rt, callInvoker, status, args[count - 1]);
3232
+
3233
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
3234
+ }
3235
+ jsi::Value
3236
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_func_authenticity_status(
3237
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3238
+ size_t count) {
3239
+ auto value = uniffi_zcam1_c2pa_utils_fn_func_authenticity_status(
3240
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3241
+ args[0]));
3242
+
3243
+ return uniffi_jsi::Bridging</*handle*/ uint64_t>::toJs(rt, callInvoker,
3244
+ value);
3245
+ }
3246
+ jsi::Value
3247
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_func_compute_hash(
3248
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3249
+ size_t count) {
3250
+ RustCallStatus status =
3251
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3252
+ auto value = uniffi_zcam1_c2pa_utils_fn_func_compute_hash(
3253
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3254
+ args[0]),
3255
+ &status);
3256
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3257
+ rt, callInvoker, status, args[count - 1]);
3258
+
3259
+ return uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::toJs(rt, callInvoker,
3260
+ value);
3261
+ }
3262
+ jsi::Value NativeZcam1C2paUtils::
3263
+ cpp_uniffi_zcam1_c2pa_utils_fn_func_compute_hash_from_buffer(
3264
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3265
+ size_t count) {
3266
+ RustCallStatus status =
3267
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3268
+ auto value = uniffi_zcam1_c2pa_utils_fn_func_compute_hash_from_buffer(
3269
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3270
+ args[0]),
3271
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3272
+ args[1]),
3273
+ &status);
3274
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3275
+ rt, callInvoker, status, args[count - 1]);
3276
+
3277
+ return uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::toJs(rt, callInvoker,
3278
+ value);
3279
+ }
3280
+ jsi::Value
3281
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_func_extract_manifest(
3282
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3283
+ size_t count) {
3284
+ RustCallStatus status =
3285
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3286
+ auto value = uniffi_zcam1_c2pa_utils_fn_func_extract_manifest(
3287
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3288
+ args[0]),
3289
+ &status);
3290
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3291
+ rt, callInvoker, status, args[count - 1]);
3292
+
3293
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
3294
+ }
3295
+ jsi::Value
3296
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_fn_func_format_from_path(
3297
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3298
+ size_t count) {
3299
+ RustCallStatus status =
3300
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3301
+ auto value = uniffi_zcam1_c2pa_utils_fn_func_format_from_path(
3302
+ uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::fromJs(rt, callInvoker,
3303
+ args[0]),
3304
+ &status);
3305
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3306
+ rt, callInvoker, status, args[count - 1]);
3307
+
3308
+ return uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::toJs(rt, callInvoker,
3309
+ value);
3310
+ }
3311
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_u8(
3312
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3313
+ size_t count) {
3314
+ ffi_zcam1_c2pa_utils_rust_future_poll_u8(
3315
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3316
+ args[0]),
3317
+ uniffi::zcam1_c2pa_utils::Bridging<
3318
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3319
+ args[1]),
3320
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3321
+ args[2]));
3322
+
3323
+ return jsi::Value::undefined();
3324
+ }
3325
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_u8(
3326
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3327
+ size_t count) {
3328
+ ffi_zcam1_c2pa_utils_rust_future_cancel_u8(
3329
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3330
+ args[0]));
3331
+
3332
+ return jsi::Value::undefined();
3333
+ }
3334
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_u8(
3335
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3336
+ size_t count) {
3337
+ ffi_zcam1_c2pa_utils_rust_future_free_u8(
3338
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3339
+ args[0]));
3340
+
3341
+ return jsi::Value::undefined();
3342
+ }
3343
+ jsi::Value
3344
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_u8(
3345
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3346
+ size_t count) {
3347
+ RustCallStatus status =
3348
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3349
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_u8(
3350
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3351
+ args[0]),
3352
+ &status);
3353
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3354
+ rt, callInvoker, status, args[count - 1]);
3355
+
3356
+ return uniffi_jsi::Bridging<uint8_t>::toJs(rt, callInvoker, value);
3357
+ }
3358
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_i8(
3359
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3360
+ size_t count) {
3361
+ ffi_zcam1_c2pa_utils_rust_future_poll_i8(
3362
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3363
+ args[0]),
3364
+ uniffi::zcam1_c2pa_utils::Bridging<
3365
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3366
+ args[1]),
3367
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3368
+ args[2]));
3369
+
3370
+ return jsi::Value::undefined();
3371
+ }
3372
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_i8(
3373
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3374
+ size_t count) {
3375
+ ffi_zcam1_c2pa_utils_rust_future_cancel_i8(
3376
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3377
+ args[0]));
3378
+
3379
+ return jsi::Value::undefined();
3380
+ }
3381
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_i8(
3382
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3383
+ size_t count) {
3384
+ ffi_zcam1_c2pa_utils_rust_future_free_i8(
3385
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3386
+ args[0]));
3387
+
3388
+ return jsi::Value::undefined();
3389
+ }
3390
+ jsi::Value
3391
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_i8(
3392
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3393
+ size_t count) {
3394
+ RustCallStatus status =
3395
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3396
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_i8(
3397
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3398
+ args[0]),
3399
+ &status);
3400
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3401
+ rt, callInvoker, status, args[count - 1]);
3402
+
3403
+ return uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, value);
3404
+ }
3405
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_u16(
3406
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3407
+ size_t count) {
3408
+ ffi_zcam1_c2pa_utils_rust_future_poll_u16(
3409
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3410
+ args[0]),
3411
+ uniffi::zcam1_c2pa_utils::Bridging<
3412
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3413
+ args[1]),
3414
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3415
+ args[2]));
3416
+
3417
+ return jsi::Value::undefined();
3418
+ }
3419
+ jsi::Value
3420
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_u16(
3421
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3422
+ size_t count) {
3423
+ ffi_zcam1_c2pa_utils_rust_future_cancel_u16(
3424
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3425
+ args[0]));
3426
+
3427
+ return jsi::Value::undefined();
3428
+ }
3429
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_u16(
3430
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3431
+ size_t count) {
3432
+ ffi_zcam1_c2pa_utils_rust_future_free_u16(
3433
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3434
+ args[0]));
3435
+
3436
+ return jsi::Value::undefined();
3437
+ }
3438
+ jsi::Value
3439
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_u16(
3440
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3441
+ size_t count) {
3442
+ RustCallStatus status =
3443
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3444
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_u16(
3445
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3446
+ args[0]),
3447
+ &status);
3448
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3449
+ rt, callInvoker, status, args[count - 1]);
3450
+
3451
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
3452
+ }
3453
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_i16(
3454
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3455
+ size_t count) {
3456
+ ffi_zcam1_c2pa_utils_rust_future_poll_i16(
3457
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3458
+ args[0]),
3459
+ uniffi::zcam1_c2pa_utils::Bridging<
3460
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3461
+ args[1]),
3462
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3463
+ args[2]));
3464
+
3465
+ return jsi::Value::undefined();
3466
+ }
3467
+ jsi::Value
3468
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_i16(
3469
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3470
+ size_t count) {
3471
+ ffi_zcam1_c2pa_utils_rust_future_cancel_i16(
3472
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3473
+ args[0]));
3474
+
3475
+ return jsi::Value::undefined();
3476
+ }
3477
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_i16(
3478
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3479
+ size_t count) {
3480
+ ffi_zcam1_c2pa_utils_rust_future_free_i16(
3481
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3482
+ args[0]));
3483
+
3484
+ return jsi::Value::undefined();
3485
+ }
3486
+ jsi::Value
3487
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_i16(
3488
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3489
+ size_t count) {
3490
+ RustCallStatus status =
3491
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3492
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_i16(
3493
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3494
+ args[0]),
3495
+ &status);
3496
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3497
+ rt, callInvoker, status, args[count - 1]);
3498
+
3499
+ return uniffi_jsi::Bridging<int16_t>::toJs(rt, callInvoker, value);
3500
+ }
3501
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_u32(
3502
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3503
+ size_t count) {
3504
+ ffi_zcam1_c2pa_utils_rust_future_poll_u32(
3505
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3506
+ args[0]),
3507
+ uniffi::zcam1_c2pa_utils::Bridging<
3508
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3509
+ args[1]),
3510
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3511
+ args[2]));
3512
+
3513
+ return jsi::Value::undefined();
3514
+ }
3515
+ jsi::Value
3516
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_u32(
3517
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3518
+ size_t count) {
3519
+ ffi_zcam1_c2pa_utils_rust_future_cancel_u32(
3520
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3521
+ args[0]));
3522
+
3523
+ return jsi::Value::undefined();
3524
+ }
3525
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_u32(
3526
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3527
+ size_t count) {
3528
+ ffi_zcam1_c2pa_utils_rust_future_free_u32(
3529
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3530
+ args[0]));
3531
+
3532
+ return jsi::Value::undefined();
3533
+ }
3534
+ jsi::Value
3535
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_u32(
3536
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3537
+ size_t count) {
3538
+ RustCallStatus status =
3539
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3540
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_u32(
3541
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3542
+ args[0]),
3543
+ &status);
3544
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3545
+ rt, callInvoker, status, args[count - 1]);
3546
+
3547
+ return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
3548
+ }
3549
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_i32(
3550
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3551
+ size_t count) {
3552
+ ffi_zcam1_c2pa_utils_rust_future_poll_i32(
3553
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3554
+ args[0]),
3555
+ uniffi::zcam1_c2pa_utils::Bridging<
3556
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3557
+ args[1]),
3558
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3559
+ args[2]));
3560
+
3561
+ return jsi::Value::undefined();
3562
+ }
3563
+ jsi::Value
3564
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_i32(
3565
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3566
+ size_t count) {
3567
+ ffi_zcam1_c2pa_utils_rust_future_cancel_i32(
3568
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3569
+ args[0]));
3570
+
3571
+ return jsi::Value::undefined();
3572
+ }
3573
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_i32(
3574
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3575
+ size_t count) {
3576
+ ffi_zcam1_c2pa_utils_rust_future_free_i32(
3577
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3578
+ args[0]));
3579
+
3580
+ return jsi::Value::undefined();
3581
+ }
3582
+ jsi::Value
3583
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_i32(
3584
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3585
+ size_t count) {
3586
+ RustCallStatus status =
3587
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3588
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_i32(
3589
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3590
+ args[0]),
3591
+ &status);
3592
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3593
+ rt, callInvoker, status, args[count - 1]);
3594
+
3595
+ return uniffi_jsi::Bridging<int32_t>::toJs(rt, callInvoker, value);
3596
+ }
3597
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_u64(
3598
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3599
+ size_t count) {
3600
+ ffi_zcam1_c2pa_utils_rust_future_poll_u64(
3601
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3602
+ args[0]),
3603
+ uniffi::zcam1_c2pa_utils::Bridging<
3604
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3605
+ args[1]),
3606
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3607
+ args[2]));
3608
+
3609
+ return jsi::Value::undefined();
3610
+ }
3611
+ jsi::Value
3612
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_u64(
3613
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3614
+ size_t count) {
3615
+ ffi_zcam1_c2pa_utils_rust_future_cancel_u64(
3616
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3617
+ args[0]));
3618
+
3619
+ return jsi::Value::undefined();
3620
+ }
3621
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_u64(
3622
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3623
+ size_t count) {
3624
+ ffi_zcam1_c2pa_utils_rust_future_free_u64(
3625
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3626
+ args[0]));
3627
+
3628
+ return jsi::Value::undefined();
3629
+ }
3630
+ jsi::Value
3631
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_u64(
3632
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3633
+ size_t count) {
3634
+ RustCallStatus status =
3635
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3636
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_u64(
3637
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3638
+ args[0]),
3639
+ &status);
3640
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3641
+ rt, callInvoker, status, args[count - 1]);
3642
+
3643
+ return uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, value);
3644
+ }
3645
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_i64(
3646
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3647
+ size_t count) {
3648
+ ffi_zcam1_c2pa_utils_rust_future_poll_i64(
3649
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3650
+ args[0]),
3651
+ uniffi::zcam1_c2pa_utils::Bridging<
3652
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3653
+ args[1]),
3654
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3655
+ args[2]));
3656
+
3657
+ return jsi::Value::undefined();
3658
+ }
3659
+ jsi::Value
3660
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_i64(
3661
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3662
+ size_t count) {
3663
+ ffi_zcam1_c2pa_utils_rust_future_cancel_i64(
3664
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3665
+ args[0]));
3666
+
3667
+ return jsi::Value::undefined();
3668
+ }
3669
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_i64(
3670
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3671
+ size_t count) {
3672
+ ffi_zcam1_c2pa_utils_rust_future_free_i64(
3673
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3674
+ args[0]));
3675
+
3676
+ return jsi::Value::undefined();
3677
+ }
3678
+ jsi::Value
3679
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_i64(
3680
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3681
+ size_t count) {
3682
+ RustCallStatus status =
3683
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3684
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_i64(
3685
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3686
+ args[0]),
3687
+ &status);
3688
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3689
+ rt, callInvoker, status, args[count - 1]);
3690
+
3691
+ return uniffi_jsi::Bridging<int64_t>::toJs(rt, callInvoker, value);
3692
+ }
3693
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_f32(
3694
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3695
+ size_t count) {
3696
+ ffi_zcam1_c2pa_utils_rust_future_poll_f32(
3697
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3698
+ args[0]),
3699
+ uniffi::zcam1_c2pa_utils::Bridging<
3700
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3701
+ args[1]),
3702
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3703
+ args[2]));
3704
+
3705
+ return jsi::Value::undefined();
3706
+ }
3707
+ jsi::Value
3708
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_f32(
3709
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3710
+ size_t count) {
3711
+ ffi_zcam1_c2pa_utils_rust_future_cancel_f32(
3712
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3713
+ args[0]));
3714
+
3715
+ return jsi::Value::undefined();
3716
+ }
3717
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_f32(
3718
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3719
+ size_t count) {
3720
+ ffi_zcam1_c2pa_utils_rust_future_free_f32(
3721
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3722
+ args[0]));
3723
+
3724
+ return jsi::Value::undefined();
3725
+ }
3726
+ jsi::Value
3727
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_f32(
3728
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3729
+ size_t count) {
3730
+ RustCallStatus status =
3731
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3732
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_f32(
3733
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3734
+ args[0]),
3735
+ &status);
3736
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3737
+ rt, callInvoker, status, args[count - 1]);
3738
+
3739
+ return uniffi_jsi::Bridging<float>::toJs(rt, callInvoker, value);
3740
+ }
3741
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_f64(
3742
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3743
+ size_t count) {
3744
+ ffi_zcam1_c2pa_utils_rust_future_poll_f64(
3745
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3746
+ args[0]),
3747
+ uniffi::zcam1_c2pa_utils::Bridging<
3748
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3749
+ args[1]),
3750
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3751
+ args[2]));
3752
+
3753
+ return jsi::Value::undefined();
3754
+ }
3755
+ jsi::Value
3756
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_f64(
3757
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3758
+ size_t count) {
3759
+ ffi_zcam1_c2pa_utils_rust_future_cancel_f64(
3760
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3761
+ args[0]));
3762
+
3763
+ return jsi::Value::undefined();
3764
+ }
3765
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_f64(
3766
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3767
+ size_t count) {
3768
+ ffi_zcam1_c2pa_utils_rust_future_free_f64(
3769
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3770
+ args[0]));
3771
+
3772
+ return jsi::Value::undefined();
3773
+ }
3774
+ jsi::Value
3775
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_f64(
3776
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3777
+ size_t count) {
3778
+ RustCallStatus status =
3779
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3780
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_f64(
3781
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3782
+ args[0]),
3783
+ &status);
3784
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3785
+ rt, callInvoker, status, args[count - 1]);
3786
+
3787
+ return uniffi_jsi::Bridging<double>::toJs(rt, callInvoker, value);
3788
+ }
3789
+ jsi::Value
3790
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_pointer(
3791
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3792
+ size_t count) {
3793
+ ffi_zcam1_c2pa_utils_rust_future_poll_pointer(
3794
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3795
+ args[0]),
3796
+ uniffi::zcam1_c2pa_utils::Bridging<
3797
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3798
+ args[1]),
3799
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3800
+ args[2]));
3801
+
3802
+ return jsi::Value::undefined();
3803
+ }
3804
+ jsi::Value
3805
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_pointer(
3806
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3807
+ size_t count) {
3808
+ ffi_zcam1_c2pa_utils_rust_future_cancel_pointer(
3809
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3810
+ args[0]));
3811
+
3812
+ return jsi::Value::undefined();
3813
+ }
3814
+ jsi::Value
3815
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_pointer(
3816
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3817
+ size_t count) {
3818
+ ffi_zcam1_c2pa_utils_rust_future_free_pointer(
3819
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3820
+ args[0]));
3821
+
3822
+ return jsi::Value::undefined();
3823
+ }
3824
+ jsi::Value
3825
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_pointer(
3826
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3827
+ size_t count) {
3828
+ RustCallStatus status =
3829
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3830
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_pointer(
3831
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3832
+ args[0]),
3833
+ &status);
3834
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3835
+ rt, callInvoker, status, args[count - 1]);
3836
+
3837
+ return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
3838
+ }
3839
+ jsi::Value
3840
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_rust_buffer(
3841
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3842
+ size_t count) {
3843
+ ffi_zcam1_c2pa_utils_rust_future_poll_rust_buffer(
3844
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3845
+ args[0]),
3846
+ uniffi::zcam1_c2pa_utils::Bridging<
3847
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3848
+ args[1]),
3849
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3850
+ args[2]));
3851
+
3852
+ return jsi::Value::undefined();
3853
+ }
3854
+ jsi::Value
3855
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_rust_buffer(
3856
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3857
+ size_t count) {
3858
+ ffi_zcam1_c2pa_utils_rust_future_cancel_rust_buffer(
3859
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3860
+ args[0]));
3861
+
3862
+ return jsi::Value::undefined();
3863
+ }
3864
+ jsi::Value
3865
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_rust_buffer(
3866
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3867
+ size_t count) {
3868
+ ffi_zcam1_c2pa_utils_rust_future_free_rust_buffer(
3869
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3870
+ args[0]));
3871
+
3872
+ return jsi::Value::undefined();
3873
+ }
3874
+ jsi::Value
3875
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_rust_buffer(
3876
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3877
+ size_t count) {
3878
+ RustCallStatus status =
3879
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3880
+ auto value = ffi_zcam1_c2pa_utils_rust_future_complete_rust_buffer(
3881
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3882
+ args[0]),
3883
+ &status);
3884
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3885
+ rt, callInvoker, status, args[count - 1]);
3886
+
3887
+ return uniffi::zcam1_c2pa_utils::Bridging<RustBuffer>::toJs(rt, callInvoker,
3888
+ value);
3889
+ }
3890
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_poll_void(
3891
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3892
+ size_t count) {
3893
+ ffi_zcam1_c2pa_utils_rust_future_poll_void(
3894
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3895
+ args[0]),
3896
+ uniffi::zcam1_c2pa_utils::Bridging<
3897
+ UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker,
3898
+ args[1]),
3899
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3900
+ args[2]));
3901
+
3902
+ return jsi::Value::undefined();
3903
+ }
3904
+ jsi::Value
3905
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_cancel_void(
3906
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3907
+ size_t count) {
3908
+ ffi_zcam1_c2pa_utils_rust_future_cancel_void(
3909
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3910
+ args[0]));
3911
+
3912
+ return jsi::Value::undefined();
3913
+ }
3914
+ jsi::Value NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_free_void(
3915
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3916
+ size_t count) {
3917
+ ffi_zcam1_c2pa_utils_rust_future_free_void(
3918
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3919
+ args[0]));
3920
+
3921
+ return jsi::Value::undefined();
3922
+ }
3923
+ jsi::Value
3924
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_rust_future_complete_void(
3925
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3926
+ size_t count) {
3927
+ RustCallStatus status =
3928
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::rustSuccess(rt);
3929
+ ffi_zcam1_c2pa_utils_rust_future_complete_void(
3930
+ uniffi_jsi::Bridging</*handle*/ uint64_t>::fromJs(rt, callInvoker,
3931
+ args[0]),
3932
+ &status);
3933
+ uniffi::zcam1_c2pa_utils::Bridging<RustCallStatus>::copyIntoJs(
3934
+ rt, callInvoker, status, args[count - 1]);
3935
+
3936
+ return jsi::Value::undefined();
3937
+ }
3938
+ jsi::Value NativeZcam1C2paUtils::
3939
+ cpp_uniffi_zcam1_c2pa_utils_checksum_func_authenticity_status(
3940
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3941
+ size_t count) {
3942
+ auto value = uniffi_zcam1_c2pa_utils_checksum_func_authenticity_status();
3943
+
3944
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
3945
+ }
3946
+ jsi::Value
3947
+ NativeZcam1C2paUtils::cpp_uniffi_zcam1_c2pa_utils_checksum_func_compute_hash(
3948
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3949
+ size_t count) {
3950
+ auto value = uniffi_zcam1_c2pa_utils_checksum_func_compute_hash();
3951
+
3952
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
3953
+ }
3954
+ jsi::Value NativeZcam1C2paUtils::
3955
+ cpp_uniffi_zcam1_c2pa_utils_checksum_func_compute_hash_from_buffer(
3956
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3957
+ size_t count) {
3958
+ auto value = uniffi_zcam1_c2pa_utils_checksum_func_compute_hash_from_buffer();
3959
+
3960
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
3961
+ }
3962
+ jsi::Value NativeZcam1C2paUtils::
3963
+ cpp_uniffi_zcam1_c2pa_utils_checksum_func_extract_manifest(
3964
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3965
+ size_t count) {
3966
+ auto value = uniffi_zcam1_c2pa_utils_checksum_func_extract_manifest();
3967
+
3968
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
3969
+ }
3970
+ jsi::Value NativeZcam1C2paUtils::
3971
+ cpp_uniffi_zcam1_c2pa_utils_checksum_func_format_from_path(
3972
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3973
+ size_t count) {
3974
+ auto value = uniffi_zcam1_c2pa_utils_checksum_func_format_from_path();
3975
+
3976
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
3977
+ }
3978
+ jsi::Value NativeZcam1C2paUtils::
3979
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifest_bindings(
3980
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3981
+ size_t count) {
3982
+ auto value = uniffi_zcam1_c2pa_utils_checksum_method_manifest_bindings();
3983
+
3984
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
3985
+ }
3986
+ jsi::Value NativeZcam1C2paUtils::
3987
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifest_capture_metadata_action(
3988
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3989
+ size_t count) {
3990
+ auto value =
3991
+ uniffi_zcam1_c2pa_utils_checksum_method_manifest_capture_metadata_action();
3992
+
3993
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
3994
+ }
3995
+ jsi::Value NativeZcam1C2paUtils::
3996
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifest_proof(
3997
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
3998
+ size_t count) {
3999
+ auto value = uniffi_zcam1_c2pa_utils_checksum_method_manifest_proof();
4000
+
4001
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4002
+ }
4003
+ jsi::Value NativeZcam1C2paUtils::
4004
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_assertion(
4005
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4006
+ size_t count) {
4007
+ auto value =
4008
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_assertion();
4009
+
4010
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4011
+ }
4012
+ jsi::Value NativeZcam1C2paUtils::
4013
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_photo_metadata_action(
4014
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4015
+ size_t count) {
4016
+ auto value =
4017
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_photo_metadata_action();
4018
+
4019
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4020
+ }
4021
+ jsi::Value NativeZcam1C2paUtils::
4022
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_title(
4023
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4024
+ size_t count) {
4025
+ auto value =
4026
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_title();
4027
+
4028
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4029
+ }
4030
+ jsi::Value NativeZcam1C2paUtils::
4031
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_video_metadata_action(
4032
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4033
+ size_t count) {
4034
+ auto value =
4035
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_add_video_metadata_action();
4036
+
4037
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4038
+ }
4039
+ jsi::Value NativeZcam1C2paUtils::
4040
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_embed_manifest_to_file(
4041
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4042
+ size_t count) {
4043
+ auto value =
4044
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_embed_manifest_to_file();
4045
+
4046
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4047
+ }
4048
+ jsi::Value NativeZcam1C2paUtils::
4049
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_remove_assertion(
4050
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4051
+ size_t count) {
4052
+ auto value =
4053
+ uniffi_zcam1_c2pa_utils_checksum_method_manifesteditor_remove_assertion();
4054
+
4055
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4056
+ }
4057
+ jsi::Value NativeZcam1C2paUtils::
4058
+ cpp_uniffi_zcam1_c2pa_utils_checksum_method_manifeststore_active_manifest(
4059
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4060
+ size_t count) {
4061
+ auto value =
4062
+ uniffi_zcam1_c2pa_utils_checksum_method_manifeststore_active_manifest();
4063
+
4064
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4065
+ }
4066
+ jsi::Value NativeZcam1C2paUtils::
4067
+ cpp_uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_from_manifest(
4068
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4069
+ size_t count) {
4070
+ auto value =
4071
+ uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_from_manifest();
4072
+
4073
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4074
+ }
4075
+ jsi::Value NativeZcam1C2paUtils::
4076
+ cpp_uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_new(
4077
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4078
+ size_t count) {
4079
+ auto value =
4080
+ uniffi_zcam1_c2pa_utils_checksum_constructor_manifesteditor_new();
4081
+
4082
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
4083
+ }
4084
+ jsi::Value
4085
+ NativeZcam1C2paUtils::cpp_ffi_zcam1_c2pa_utils_uniffi_contract_version(
4086
+ jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
4087
+ size_t count) {
4088
+ auto value = ffi_zcam1_c2pa_utils_uniffi_contract_version();
4089
+
4090
+ return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
4091
+ }