@dittolive/ditto 4.5.0 → 4.5.1-experimental.aarch64-linux.1.aarch64
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.
- package/README.md +2 -2
- package/node/ditto.cjs.js +2 -9620
- package/node/{ditto.linux-x64.node → ditto.linux-arm64.node} +0 -0
- package/package.json +38 -34
- package/types/ditto.d.ts +0 -2
- package/web/ditto.es6.js +1 -1
- package/web/ditto.umd.js +1 -1
- package/web/ditto.wasm +0 -0
- package/DittoReactNative.podspec +0 -27
- package/node/ditto.darwin-arm64.node +0 -0
- package/node/ditto.darwin-x64.node +0 -0
- package/node/ditto.linux-arm.node +0 -0
- package/node/ditto.win32-x64.node +0 -0
- package/node/transports.darwin-arm64.node +0 -0
- package/node/transports.darwin-x64.node +0 -0
- package/react-native/android/CMakeLists.txt +0 -37
- package/react-native/android/build.gradle +0 -203
- package/react-native/android/cpp-adapter.cpp +0 -254
- package/react-native/android/gradle.properties +0 -5
- package/react-native/android/src/main/AndroidManifest.xml +0 -4
- package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKModule.java +0 -85
- package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKPackage.java +0 -28
- package/react-native/boost/boost/assert.hpp +0 -85
- package/react-native/boost/boost/config/abi/borland_prefix.hpp +0 -27
- package/react-native/boost/boost/config/abi/borland_suffix.hpp +0 -12
- package/react-native/boost/boost/config/abi/msvc_prefix.hpp +0 -22
- package/react-native/boost/boost/config/abi/msvc_suffix.hpp +0 -8
- package/react-native/boost/boost/config/abi_prefix.hpp +0 -25
- package/react-native/boost/boost/config/abi_suffix.hpp +0 -25
- package/react-native/boost/boost/config/assert_cxx03.hpp +0 -211
- package/react-native/boost/boost/config/assert_cxx11.hpp +0 -209
- package/react-native/boost/boost/config/assert_cxx14.hpp +0 -47
- package/react-native/boost/boost/config/assert_cxx17.hpp +0 -62
- package/react-native/boost/boost/config/assert_cxx20.hpp +0 -59
- package/react-native/boost/boost/config/assert_cxx98.hpp +0 -23
- package/react-native/boost/boost/config/auto_link.hpp +0 -525
- package/react-native/boost/boost/config/compiler/borland.hpp +0 -339
- package/react-native/boost/boost/config/compiler/clang.hpp +0 -366
- package/react-native/boost/boost/config/compiler/clang_version.hpp +0 -83
- package/react-native/boost/boost/config/compiler/codegear.hpp +0 -385
- package/react-native/boost/boost/config/compiler/comeau.hpp +0 -59
- package/react-native/boost/boost/config/compiler/common_edg.hpp +0 -183
- package/react-native/boost/boost/config/compiler/compaq_cxx.hpp +0 -19
- package/react-native/boost/boost/config/compiler/cray.hpp +0 -446
- package/react-native/boost/boost/config/compiler/diab.hpp +0 -26
- package/react-native/boost/boost/config/compiler/digitalmars.hpp +0 -143
- package/react-native/boost/boost/config/compiler/gcc.hpp +0 -383
- package/react-native/boost/boost/config/compiler/gcc_xml.hpp +0 -114
- package/react-native/boost/boost/config/compiler/greenhills.hpp +0 -28
- package/react-native/boost/boost/config/compiler/hp_acc.hpp +0 -149
- package/react-native/boost/boost/config/compiler/intel.hpp +0 -577
- package/react-native/boost/boost/config/compiler/kai.hpp +0 -33
- package/react-native/boost/boost/config/compiler/metrowerks.hpp +0 -198
- package/react-native/boost/boost/config/compiler/mpw.hpp +0 -140
- package/react-native/boost/boost/config/compiler/nvcc.hpp +0 -61
- package/react-native/boost/boost/config/compiler/pathscale.hpp +0 -138
- package/react-native/boost/boost/config/compiler/pgi.hpp +0 -23
- package/react-native/boost/boost/config/compiler/sgi_mipspro.hpp +0 -29
- package/react-native/boost/boost/config/compiler/sunpro_cc.hpp +0 -222
- package/react-native/boost/boost/config/compiler/vacpp.hpp +0 -186
- package/react-native/boost/boost/config/compiler/visualc.hpp +0 -391
- package/react-native/boost/boost/config/compiler/xlcpp.hpp +0 -299
- package/react-native/boost/boost/config/compiler/xlcpp_zos.hpp +0 -173
- package/react-native/boost/boost/config/detail/cxx_composite.hpp +0 -203
- package/react-native/boost/boost/config/detail/posix_features.hpp +0 -95
- package/react-native/boost/boost/config/detail/select_compiler_config.hpp +0 -157
- package/react-native/boost/boost/config/detail/select_platform_config.hpp +0 -147
- package/react-native/boost/boost/config/detail/select_stdlib_config.hpp +0 -121
- package/react-native/boost/boost/config/detail/suffix.hpp +0 -1294
- package/react-native/boost/boost/config/header_deprecated.hpp +0 -26
- package/react-native/boost/boost/config/helper_macros.hpp +0 -37
- package/react-native/boost/boost/config/no_tr1/cmath.hpp +0 -28
- package/react-native/boost/boost/config/no_tr1/complex.hpp +0 -28
- package/react-native/boost/boost/config/no_tr1/functional.hpp +0 -28
- package/react-native/boost/boost/config/no_tr1/memory.hpp +0 -28
- package/react-native/boost/boost/config/no_tr1/utility.hpp +0 -28
- package/react-native/boost/boost/config/platform/aix.hpp +0 -33
- package/react-native/boost/boost/config/platform/amigaos.hpp +0 -15
- package/react-native/boost/boost/config/platform/beos.hpp +0 -26
- package/react-native/boost/boost/config/platform/bsd.hpp +0 -83
- package/react-native/boost/boost/config/platform/cloudabi.hpp +0 -18
- package/react-native/boost/boost/config/platform/cray.hpp +0 -18
- package/react-native/boost/boost/config/platform/cygwin.hpp +0 -71
- package/react-native/boost/boost/config/platform/haiku.hpp +0 -31
- package/react-native/boost/boost/config/platform/hpux.hpp +0 -87
- package/react-native/boost/boost/config/platform/irix.hpp +0 -31
- package/react-native/boost/boost/config/platform/linux.hpp +0 -106
- package/react-native/boost/boost/config/platform/macos.hpp +0 -87
- package/react-native/boost/boost/config/platform/qnxnto.hpp +0 -31
- package/react-native/boost/boost/config/platform/solaris.hpp +0 -31
- package/react-native/boost/boost/config/platform/symbian.hpp +0 -97
- package/react-native/boost/boost/config/platform/vms.hpp +0 -25
- package/react-native/boost/boost/config/platform/vxworks.hpp +0 -422
- package/react-native/boost/boost/config/platform/wasm.hpp +0 -23
- package/react-native/boost/boost/config/platform/win32.hpp +0 -90
- package/react-native/boost/boost/config/platform/zos.hpp +0 -32
- package/react-native/boost/boost/config/pragma_message.hpp +0 -31
- package/react-native/boost/boost/config/requires_threads.hpp +0 -92
- package/react-native/boost/boost/config/stdlib/dinkumware.hpp +0 -324
- package/react-native/boost/boost/config/stdlib/libcomo.hpp +0 -93
- package/react-native/boost/boost/config/stdlib/libcpp.hpp +0 -180
- package/react-native/boost/boost/config/stdlib/libstdcpp3.hpp +0 -482
- package/react-native/boost/boost/config/stdlib/modena.hpp +0 -79
- package/react-native/boost/boost/config/stdlib/msl.hpp +0 -98
- package/react-native/boost/boost/config/stdlib/roguewave.hpp +0 -208
- package/react-native/boost/boost/config/stdlib/sgi.hpp +0 -168
- package/react-native/boost/boost/config/stdlib/stlport.hpp +0 -258
- package/react-native/boost/boost/config/stdlib/vacpp.hpp +0 -74
- package/react-native/boost/boost/config/stdlib/xlcpp_zos.hpp +0 -61
- package/react-native/boost/boost/config/user.hpp +0 -133
- package/react-native/boost/boost/config/warning_disable.hpp +0 -47
- package/react-native/boost/boost/config/workaround.hpp +0 -305
- package/react-native/boost/boost/config.hpp +0 -67
- package/react-native/boost/boost/cstdint.hpp +0 -556
- package/react-native/boost/boost/intrusive_ptr.hpp +0 -18
- package/react-native/boost/boost/smart_ptr/detail/atomic_count.hpp +0 -103
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc.hpp +0 -79
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_atomic.hpp +0 -63
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp +0 -88
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_nt.hpp +0 -66
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_pt.hpp +0 -104
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_spin.hpp +0 -69
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_std_atomic.hpp +0 -67
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_sync.hpp +0 -72
- package/react-native/boost/boost/smart_ptr/detail/atomic_count_win32.hpp +0 -70
- package/react-native/boost/boost/smart_ptr/detail/local_counted_base.hpp +0 -148
- package/react-native/boost/boost/smart_ptr/detail/local_sp_deleter.hpp +0 -91
- package/react-native/boost/boost/smart_ptr/detail/operator_bool.hpp +0 -64
- package/react-native/boost/boost/smart_ptr/detail/requires_cxx11.hpp +0 -23
- package/react-native/boost/boost/smart_ptr/detail/shared_count.hpp +0 -707
- package/react-native/boost/boost/smart_ptr/detail/sp_convertible.hpp +0 -92
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base.hpp +0 -92
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +0 -163
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_aix.hpp +0 -152
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +0 -185
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_atomic.hpp +0 -148
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +0 -170
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +0 -200
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +0 -194
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +0 -179
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +0 -186
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_nt.hpp +0 -119
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp +0 -147
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +0 -174
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_spin.hpp +0 -141
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +0 -147
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_sync.hpp +0 -165
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +0 -163
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_base_w32.hpp +0 -140
- package/react-native/boost/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -309
- package/react-native/boost/boost/smart_ptr/detail/sp_disable_deprecated.hpp +0 -40
- package/react-native/boost/boost/smart_ptr/detail/sp_forward.hpp +0 -52
- package/react-native/boost/boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp +0 -27
- package/react-native/boost/boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp +0 -69
- package/react-native/boost/boost/smart_ptr/detail/sp_interlocked.hpp +0 -173
- package/react-native/boost/boost/smart_ptr/detail/sp_noexcept.hpp +0 -48
- package/react-native/boost/boost/smart_ptr/detail/sp_nullptr_t.hpp +0 -45
- package/react-native/boost/boost/smart_ptr/detail/sp_obsolete.hpp +0 -32
- package/react-native/boost/boost/smart_ptr/detail/sp_thread_pause.hpp +0 -51
- package/react-native/boost/boost/smart_ptr/detail/sp_thread_sleep.hpp +0 -104
- package/react-native/boost/boost/smart_ptr/detail/sp_thread_yield.hpp +0 -100
- package/react-native/boost/boost/smart_ptr/detail/sp_typeinfo_.hpp +0 -58
- package/react-native/boost/boost/smart_ptr/detail/sp_win32_sleep.hpp +0 -49
- package/react-native/boost/boost/smart_ptr/intrusive_ptr.hpp +0 -409
- package/react-native/boost/boost/smart_ptr/intrusive_ref_counter.hpp +0 -188
- package/react-native/cpp/include/Attachment.h +0 -16
- package/react-native/cpp/include/Authentication.h +0 -23
- package/react-native/cpp/include/Collection.h +0 -13
- package/react-native/cpp/include/DQL.h +0 -21
- package/react-native/cpp/include/Document.h +0 -17
- package/react-native/cpp/include/Identity.h +0 -17
- package/react-native/cpp/include/Lifecycle.h +0 -16
- package/react-native/cpp/include/LiveQuery.h +0 -17
- package/react-native/cpp/include/Logger.h +0 -22
- package/react-native/cpp/include/Misc.h +0 -26
- package/react-native/cpp/include/Presence.h +0 -14
- package/react-native/cpp/include/RetainableState.h +0 -24
- package/react-native/cpp/include/SmallPeerInfo.h +0 -17
- package/react-native/cpp/include/Transports.h +0 -25
- package/react-native/cpp/include/TypedArray.hpp +0 -167
- package/react-native/cpp/include/Utils.h +0 -61
- package/react-native/cpp/include/main.h +0 -10
- package/react-native/cpp/src/Attachment.cpp +0 -86
- package/react-native/cpp/src/Authentication.cpp +0 -224
- package/react-native/cpp/src/Collection.cpp +0 -54
- package/react-native/cpp/src/DQL.cpp +0 -254
- package/react-native/cpp/src/Document.cpp +0 -146
- package/react-native/cpp/src/Identity.cpp +0 -123
- package/react-native/cpp/src/Lifecycle.cpp +0 -75
- package/react-native/cpp/src/LiveQuery.cpp +0 -64
- package/react-native/cpp/src/Logger.cpp +0 -200
- package/react-native/cpp/src/Misc.cpp +0 -271
- package/react-native/cpp/src/Presence.cpp +0 -77
- package/react-native/cpp/src/RetainableState.cpp +0 -15
- package/react-native/cpp/src/SmallPeerInfo.cpp +0 -108
- package/react-native/cpp/src/Transports.cpp +0 -270
- package/react-native/cpp/src/TypedArray.cpp +0 -303
- package/react-native/cpp/src/Utils.cpp +0 -138
- package/react-native/cpp/src/main.cpp +0 -149
- package/react-native/dittoffi/dittoffi.h +0 -4698
- package/react-native/dittoffi/ifaddrs.cpp +0 -385
- package/react-native/dittoffi/ifaddrs.h +0 -206
- package/react-native/ios/DittoRNSDK.h +0 -7
- package/react-native/ios/DittoRNSDK.mm +0 -107
- package/react-native/ios/YeetJSIUtils.h +0 -60
- package/react-native/ios/YeetJSIUtils.mm +0 -196
- package/react-native/lib/commonjs/ditto.rn.js +0 -93
- package/react-native/lib/commonjs/ditto.rn.js.map +0 -1
- package/react-native/lib/commonjs/index.js +0 -14
- package/react-native/lib/commonjs/index.js.map +0 -1
- package/react-native/lib/module/ditto.rn.js +0 -83
- package/react-native/lib/module/ditto.rn.js.map +0 -1
- package/react-native/lib/module/index.js +0 -13
- package/react-native/lib/module/index.js.map +0 -1
- package/react-native/lib/typescript/ditto.rn.d.ts +0 -15
- package/react-native/lib/typescript/ditto.rn.d.ts.map +0 -1
- package/react-native/lib/typescript/index.d.ts +0 -1
- package/react-native/lib/typescript/index.d.ts.map +0 -1
- package/react-native/scripts/ruby/include_local_boost.rb +0 -78
- package/react-native/src/ditto.rn.ts +0 -91
- package/react-native/src/environment/environment.fallback.ts +0 -4
- package/react-native/src/index.ts +0 -26
- package/react-native/src/sources/@cbor-redux.ts +0 -2
- package/react-native/src/sources/@ditto.core.ts +0 -1
- package/react-native/src/sources/@environment.ts +0 -2
- package/react-native/src/sources/attachment-fetch-event.ts +0 -54
- package/react-native/src/sources/attachment-fetcher-manager.ts +0 -129
- package/react-native/src/sources/attachment-fetcher.ts +0 -124
- package/react-native/src/sources/attachment-token.ts +0 -48
- package/react-native/src/sources/attachment.ts +0 -59
- package/react-native/src/sources/augment.ts +0 -89
- package/react-native/src/sources/authenticator.ts +0 -314
- package/react-native/src/sources/base-pending-cursor-operation.ts +0 -237
- package/react-native/src/sources/base-pending-id-specific-operation.ts +0 -109
- package/react-native/src/sources/bridge.ts +0 -549
- package/react-native/src/sources/build-time-constants.ts +0 -4
- package/react-native/src/sources/cbor.ts +0 -35
- package/react-native/src/sources/collection-interface.ts +0 -67
- package/react-native/src/sources/collection.ts +0 -212
- package/react-native/src/sources/collections-event.ts +0 -99
- package/react-native/src/sources/counter.ts +0 -77
- package/react-native/src/sources/ditto.ts +0 -945
- package/react-native/src/sources/document-id.ts +0 -159
- package/react-native/src/sources/document-path.ts +0 -303
- package/react-native/src/sources/document.ts +0 -192
- package/react-native/src/sources/epilogue.ts +0 -24
- package/react-native/src/sources/error-codes.ts +0 -52
- package/react-native/src/sources/error.ts +0 -203
- package/react-native/src/sources/essentials.ts +0 -53
- package/react-native/src/sources/ffi-error.ts +0 -117
- package/react-native/src/sources/ffi.ts +0 -1972
- package/react-native/src/sources/identity.ts +0 -163
- package/react-native/src/sources/init.ts +0 -70
- package/react-native/src/sources/internal.ts +0 -113
- package/react-native/src/sources/keep-alive.ts +0 -69
- package/react-native/src/sources/key-path.ts +0 -195
- package/react-native/src/sources/live-query-event.ts +0 -208
- package/react-native/src/sources/live-query-manager.ts +0 -101
- package/react-native/src/sources/live-query.ts +0 -164
- package/react-native/src/sources/logger.ts +0 -196
- package/react-native/src/sources/observer-manager.ts +0 -175
- package/react-native/src/sources/observer.ts +0 -77
- package/react-native/src/sources/pending-collections-operation.ts +0 -232
- package/react-native/src/sources/pending-cursor-operation.ts +0 -218
- package/react-native/src/sources/pending-id-specific-operation.ts +0 -216
- package/react-native/src/sources/presence-manager.ts +0 -160
- package/react-native/src/sources/presence.ts +0 -238
- package/react-native/src/sources/query-result-item.ts +0 -116
- package/react-native/src/sources/query-result.ts +0 -55
- package/react-native/src/sources/register.ts +0 -92
- package/react-native/src/sources/small-peer-info.ts +0 -176
- package/react-native/src/sources/static-tcp-client.ts +0 -6
- package/react-native/src/sources/store-observer.ts +0 -176
- package/react-native/src/sources/store.ts +0 -365
- package/react-native/src/sources/subscription-manager.ts +0 -98
- package/react-native/src/sources/subscription.ts +0 -88
- package/react-native/src/sources/sync-subscription.ts +0 -90
- package/react-native/src/sources/sync.ts +0 -495
- package/react-native/src/sources/test-helpers.ts +0 -24
- package/react-native/src/sources/transport-conditions-manager.ts +0 -104
- package/react-native/src/sources/transport-config.ts +0 -428
- package/react-native/src/sources/update-result.ts +0 -66
- package/react-native/src/sources/update-results-map.ts +0 -57
- package/react-native/src/sources/websocket-client.ts +0 -6
- package/react-native/src/sources/write-transaction-collection.ts +0 -122
- package/react-native/src/sources/write-transaction-pending-cursor-operation.ts +0 -101
- package/react-native/src/sources/write-transaction-pending-id-specific-operation.ts +0 -72
- package/react-native/src/sources/write-transaction.ts +0 -119
- package/react-native.config.js +0 -9
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#ifndef Attachment_H
|
|
2
|
-
#define Attachment_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi
|
|
9
|
-
{
|
|
10
|
-
Function ditto_cancel_resolve_attachment(Runtime &runtime);
|
|
11
|
-
Function ditto_free_attachment_handle(Runtime &runtime);
|
|
12
|
-
Function ditto_get_complete_attachment_path(Runtime &runtime);
|
|
13
|
-
Function ditto_new_attachment_from_bytes(Runtime &runtime);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
#endif /* Attachment_H */
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#ifndef Authentication_H
|
|
2
|
-
#define Authentication_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi
|
|
9
|
-
{
|
|
10
|
-
Function ditto_auth_client_set_validity_listener(Runtime &runtime);
|
|
11
|
-
Function ditto_auth_client_is_web_valid(Runtime &runtime);
|
|
12
|
-
Function ditto_auth_client_is_x509_valid(Runtime &runtime);
|
|
13
|
-
Function ditto_auth_client_get_app_id(Runtime &runtime);
|
|
14
|
-
Function ditto_auth_client_get_site_id(Runtime &runtime);
|
|
15
|
-
Function ditto_auth_client_make_login_provider(Runtime &runtime);
|
|
16
|
-
Function ditto_auth_set_login_provider(Runtime &runtime);
|
|
17
|
-
Function ditto_auth_client_login_with_token(Runtime &runtime);
|
|
18
|
-
Function ditto_auth_client_login_with_credentials(Runtime &runtime);
|
|
19
|
-
Function ditto_auth_client_logout(Runtime &runtime);
|
|
20
|
-
Function ditto_auth_client_user_id(Runtime &runtime);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
#endif /* Authentication_H */
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#ifndef DQL_H
|
|
2
|
-
#define DQL_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi {
|
|
9
|
-
Function dittoffi_try_experimental_register_change_observer_str_detached(Runtime &runtime);
|
|
10
|
-
Function dittoffi_try_experimental_add_dql_subscription(Runtime &runtime);
|
|
11
|
-
Function dittoffi_try_experimental_remove_dql_subscription(Runtime &runtime);
|
|
12
|
-
Function dittoffi_try_experimental_exec_statement_str(Runtime &runtime);
|
|
13
|
-
Function ditto_dql_response_result_count(Runtime &runtime);
|
|
14
|
-
Function ditto_dql_response_result_at(Runtime &runtime);
|
|
15
|
-
Function ditto_dql_response_affected_document_id_count(Runtime &runtime);
|
|
16
|
-
Function ditto_dql_response_affected_document_id_at(Runtime &runtime);
|
|
17
|
-
Function ditto_result_cbor(Runtime &runtime);
|
|
18
|
-
Function ditto_result_json(Runtime &runtime);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
#endif /* DQL_H */
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#ifndef Document_H
|
|
2
|
-
#define Document_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi
|
|
9
|
-
{
|
|
10
|
-
Function ditto_document_id_query_compatible(Runtime &runtime);
|
|
11
|
-
Function ditto_document_id(Runtime &runtime);
|
|
12
|
-
Function ditto_document_free(Runtime &runtime);
|
|
13
|
-
Function ditto_document_get_cbor_with_path_type(Runtime &runtime);
|
|
14
|
-
Function ditto_validate_document_id(Runtime &runtime);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
#endif /* Document_H */
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#ifndef Identity_H
|
|
2
|
-
#define Identity_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi
|
|
9
|
-
{
|
|
10
|
-
Function ditto_identity_config_make_online_playground(Runtime &runtime);
|
|
11
|
-
Function ditto_identity_config_make_offline_playground(Runtime &runtime);
|
|
12
|
-
Function ditto_identity_config_make_manual_v0(Runtime &runtime);
|
|
13
|
-
Function ditto_identity_config_make_shared_key(Runtime &runtime);
|
|
14
|
-
Function ditto_identity_config_make_online_with_authentication(Runtime &runtime);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
#endif /* Identity_H */
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#ifndef Lifecycle_H
|
|
2
|
-
#define Lifecycle_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi
|
|
9
|
-
{
|
|
10
|
-
Function uninitialized_ditto_make(Runtime &runtime);
|
|
11
|
-
Function ditto_shutdown(Runtime &runtime);
|
|
12
|
-
Function ditto_free(Runtime &runtime);
|
|
13
|
-
Function ditto_make(Runtime &runtime);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
#endif /* Document_H */
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#ifndef LiveQuery_H
|
|
2
|
-
#define LiveQuery_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi
|
|
9
|
-
{
|
|
10
|
-
Function ditto_live_query_signal_available_next(Runtime &runtime);
|
|
11
|
-
Function ditto_live_query_start(Runtime &runtime);
|
|
12
|
-
Function ditto_live_query_stop(Runtime &runtime);
|
|
13
|
-
Function ditto_live_query_register_str_detached(Runtime &runtime);
|
|
14
|
-
void v_live_query_update(void *ctx, c_cb_params_t params);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
#endif /* LiveQuery_H */
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
#ifndef Logger_H
|
|
4
|
-
#define Logger_H
|
|
5
|
-
|
|
6
|
-
#include <jsi/jsi.h>
|
|
7
|
-
|
|
8
|
-
using namespace facebook::jsi;
|
|
9
|
-
|
|
10
|
-
namespace sharedjsi
|
|
11
|
-
{
|
|
12
|
-
Function ditto_log(Runtime &runtime);
|
|
13
|
-
Function ditto_logger_set_log_file(Runtime &runtime);
|
|
14
|
-
Function ditto_logger_minimum_log_level_get(Runtime &runtime);
|
|
15
|
-
Function ditto_logger_minimum_log_level(Runtime &runtime);
|
|
16
|
-
Function ditto_logger_emoji_headings_enabled_get(Runtime &runtime);
|
|
17
|
-
Function ditto_logger_emoji_headings_enabled(Runtime &runtime);
|
|
18
|
-
Function ditto_logger_enabled_get(Runtime &runtime);
|
|
19
|
-
Function ditto_logger_enabled(Runtime &runtime);
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
#endif /* Logger_H */
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
#ifndef Misc_H
|
|
2
|
-
#define Misc_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi
|
|
9
|
-
{
|
|
10
|
-
Function ditto_tick(Runtime &runtime);
|
|
11
|
-
Function ditto_set_device_name(Runtime &runtime);
|
|
12
|
-
Function ditto_error_message(Runtime &runtime);
|
|
13
|
-
Function dittoffi_error_code(Runtime &runtime);
|
|
14
|
-
Function dittoffi_error_description(Runtime &runtime);
|
|
15
|
-
Function dittoffi_error_free(Runtime &runtime);
|
|
16
|
-
Function ditto_set_connect_retry_interval(Runtime &runtime);
|
|
17
|
-
Function ditto_get_sdk_version(Runtime &runtime);
|
|
18
|
-
Function ditto_small_peer_info_set_transport_config_data(Runtime &runtime);
|
|
19
|
-
Function verify_license(Runtime &runtime);
|
|
20
|
-
Function ditto_run_garbage_collection(Runtime &runtime);
|
|
21
|
-
Function ditto_set_static_websocket_clients(Runtime &runtime);
|
|
22
|
-
Function ditto_set_sync_group(Runtime &runtime);
|
|
23
|
-
Function refCStringToString(Runtime &runtime);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
#endif /* Misc_H */
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#ifndef Presence_H
|
|
2
|
-
#define Presence_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi
|
|
9
|
-
{
|
|
10
|
-
Function ditto_presence_v3(Runtime &runtime);
|
|
11
|
-
Function ditto_register_presence_v3_callback(Runtime &runtime);
|
|
12
|
-
Function ditto_clear_presence_v3_callback(Runtime &runtime);
|
|
13
|
-
}
|
|
14
|
-
#endif /* Presence_H */
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#ifndef RETAINABLE_STATE_H
|
|
2
|
-
#define RETAINABLE_STATE_H
|
|
3
|
-
|
|
4
|
-
#include "jsi/jsi.h"
|
|
5
|
-
#include <boost/smart_ptr/intrusive_ptr.hpp>
|
|
6
|
-
#include <boost/smart_ptr/intrusive_ref_counter.hpp>
|
|
7
|
-
|
|
8
|
-
using namespace facebook::jsi;
|
|
9
|
-
|
|
10
|
-
class RetainableState : public boost::intrusive_ref_counter<RetainableState, boost::thread_safe_counter>
|
|
11
|
-
{
|
|
12
|
-
public:
|
|
13
|
-
RetainableState(Function jsCallback);
|
|
14
|
-
|
|
15
|
-
Function jsCallback;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
extern "C"
|
|
19
|
-
{
|
|
20
|
-
void v_retain(void *ctx);
|
|
21
|
-
void v_release(void *ctx);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
#endif // RETAINABLE_STATE_H
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#ifndef SmallPeerInfo_H
|
|
2
|
-
#define SmallPeerInfo_H
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi
|
|
9
|
-
{
|
|
10
|
-
Function ditto_small_peer_info_set_transport_config_data(Runtime &runtime);
|
|
11
|
-
Function ditto_small_peer_info_get_is_enabled(Runtime &runtime);
|
|
12
|
-
Function ditto_small_peer_info_set_enabled(Runtime &runtime);
|
|
13
|
-
Function ditto_small_peer_info_get_sync_scope(Runtime &runtime);
|
|
14
|
-
Function ditto_small_peer_info_set_sync_scope(Runtime &runtime);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
#endif /* SmallPeerInfo_H */
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#ifndef Transports_h
|
|
2
|
-
#define Transports_h
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
using namespace facebook::jsi;
|
|
7
|
-
|
|
8
|
-
namespace sharedjsi {
|
|
9
|
-
Function ditto_sdk_transports_error_new(Runtime &runtime);
|
|
10
|
-
Function ditto_sdk_transports_init(Runtime &runtime);
|
|
11
|
-
Function ditto_sdk_transports_error_value(Runtime &runtime);
|
|
12
|
-
Function ditto_sdk_transports_error_free(Runtime &runtime);
|
|
13
|
-
Function ditto_sdk_transports_ble_is_available(Runtime &runtime);
|
|
14
|
-
Function ditto_sdk_transports_ble_create(Runtime &runtime);
|
|
15
|
-
Function ditto_sdk_transports_ble_destroy(Runtime &runtime);
|
|
16
|
-
Function ditto_sdk_transports_lan_is_available(Runtime &runtime);
|
|
17
|
-
Function ditto_sdk_transports_lan_create(Runtime &runtime);
|
|
18
|
-
Function ditto_sdk_transports_lan_destroy(Runtime &runtime);
|
|
19
|
-
Function ditto_sdk_transports_awdl_is_available(Runtime &runtime);
|
|
20
|
-
Function ditto_sdk_transports_awdl_create(Runtime &runtime);
|
|
21
|
-
Function ditto_sdk_transports_awdl_destroy(Runtime &runtime);
|
|
22
|
-
Function ditto_add_multicast_transport(Runtime &runtime);
|
|
23
|
-
Function ditto_remove_multicast_transport(Runtime &runtime);
|
|
24
|
-
}
|
|
25
|
-
#endif /* Transports_h */
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
#pragma once
|
|
3
|
-
|
|
4
|
-
#include <jsi/jsi.h>
|
|
5
|
-
|
|
6
|
-
namespace jsi = facebook::jsi;
|
|
7
|
-
|
|
8
|
-
enum class TypedArrayKind {
|
|
9
|
-
Int8Array,
|
|
10
|
-
Int16Array,
|
|
11
|
-
Int32Array,
|
|
12
|
-
Uint8Array,
|
|
13
|
-
Uint8ClampedArray,
|
|
14
|
-
Uint16Array,
|
|
15
|
-
Uint32Array,
|
|
16
|
-
Float32Array,
|
|
17
|
-
Float64Array,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
template <TypedArrayKind T>
|
|
21
|
-
class TypedArray;
|
|
22
|
-
|
|
23
|
-
template <TypedArrayKind T>
|
|
24
|
-
struct typedArrayTypeMap;
|
|
25
|
-
template <>
|
|
26
|
-
struct typedArrayTypeMap<TypedArrayKind::Int8Array> {
|
|
27
|
-
typedef int8_t type;
|
|
28
|
-
};
|
|
29
|
-
template <>
|
|
30
|
-
struct typedArrayTypeMap<TypedArrayKind::Int16Array> {
|
|
31
|
-
typedef int16_t type;
|
|
32
|
-
};
|
|
33
|
-
template <>
|
|
34
|
-
struct typedArrayTypeMap<TypedArrayKind::Int32Array> {
|
|
35
|
-
typedef int32_t type;
|
|
36
|
-
};
|
|
37
|
-
template <>
|
|
38
|
-
struct typedArrayTypeMap<TypedArrayKind::Uint8Array> {
|
|
39
|
-
typedef uint8_t type;
|
|
40
|
-
};
|
|
41
|
-
template <>
|
|
42
|
-
struct typedArrayTypeMap<TypedArrayKind::Uint8ClampedArray> {
|
|
43
|
-
typedef uint8_t type;
|
|
44
|
-
};
|
|
45
|
-
template <>
|
|
46
|
-
struct typedArrayTypeMap<TypedArrayKind::Uint16Array> {
|
|
47
|
-
typedef uint16_t type;
|
|
48
|
-
};
|
|
49
|
-
template <>
|
|
50
|
-
struct typedArrayTypeMap<TypedArrayKind::Uint32Array> {
|
|
51
|
-
typedef uint32_t type;
|
|
52
|
-
};
|
|
53
|
-
template <>
|
|
54
|
-
struct typedArrayTypeMap<TypedArrayKind::Float32Array> {
|
|
55
|
-
typedef float type;
|
|
56
|
-
};
|
|
57
|
-
template <>
|
|
58
|
-
struct typedArrayTypeMap<TypedArrayKind::Float64Array> {
|
|
59
|
-
typedef double type;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// Instance of this class will invalidate PropNameIDCache when destructor is called.
|
|
63
|
-
// Attach this object to global in specific jsi::Runtime to make sure lifecycle of
|
|
64
|
-
// the cache object is connected to the lifecycle of the js runtime
|
|
65
|
-
class InvalidateCacheOnDestroy : public jsi::HostObject {
|
|
66
|
-
public:
|
|
67
|
-
InvalidateCacheOnDestroy(jsi::Runtime &runtime);
|
|
68
|
-
virtual ~InvalidateCacheOnDestroy();
|
|
69
|
-
virtual jsi::Value get(jsi::Runtime &, const jsi::PropNameID &name) {
|
|
70
|
-
return jsi::Value::null();
|
|
71
|
-
}
|
|
72
|
-
virtual void set(jsi::Runtime &, const jsi::PropNameID &name, const jsi::Value &value) {}
|
|
73
|
-
virtual std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt) {
|
|
74
|
-
return {};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
private:
|
|
78
|
-
uintptr_t key;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
class TypedArrayBase : public jsi::Object {
|
|
82
|
-
public:
|
|
83
|
-
template <TypedArrayKind T>
|
|
84
|
-
using ContentType = typename typedArrayTypeMap<T>::type;
|
|
85
|
-
|
|
86
|
-
TypedArrayBase(jsi::Runtime &, size_t, TypedArrayKind);
|
|
87
|
-
TypedArrayBase(jsi::Runtime &, const jsi::Object &);
|
|
88
|
-
TypedArrayBase(TypedArrayBase &&) = default;
|
|
89
|
-
TypedArrayBase &operator=(TypedArrayBase &&) = default;
|
|
90
|
-
|
|
91
|
-
TypedArrayKind getKind(jsi::Runtime &runtime) const;
|
|
92
|
-
|
|
93
|
-
template <TypedArrayKind T>
|
|
94
|
-
TypedArray<T> get(jsi::Runtime &runtime) const &;
|
|
95
|
-
template <TypedArrayKind T>
|
|
96
|
-
TypedArray<T> get(jsi::Runtime &runtime) &&;
|
|
97
|
-
template <TypedArrayKind T>
|
|
98
|
-
TypedArray<T> as(jsi::Runtime &runtime) const &;
|
|
99
|
-
template <TypedArrayKind T>
|
|
100
|
-
TypedArray<T> as(jsi::Runtime &runtime) &&;
|
|
101
|
-
|
|
102
|
-
size_t size(jsi::Runtime &runtime) const;
|
|
103
|
-
size_t length(jsi::Runtime &runtime) const;
|
|
104
|
-
size_t byteLength(jsi::Runtime &runtime) const;
|
|
105
|
-
size_t byteOffset(jsi::Runtime &runtime) const;
|
|
106
|
-
bool hasBuffer(jsi::Runtime &runtime) const;
|
|
107
|
-
|
|
108
|
-
std::vector<uint8_t> toVector(jsi::Runtime &runtime);
|
|
109
|
-
jsi::ArrayBuffer getBuffer(jsi::Runtime &runtime) const;
|
|
110
|
-
|
|
111
|
-
private:
|
|
112
|
-
template <TypedArrayKind>
|
|
113
|
-
friend class TypedArray;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
bool isTypedArray(jsi::Runtime &runtime, const jsi::Object &jsObj);
|
|
117
|
-
TypedArrayBase getTypedArray(jsi::Runtime &runtime, const jsi::Object &jsObj);
|
|
118
|
-
|
|
119
|
-
std::vector<uint8_t> arrayBufferToVector(jsi::Runtime &runtime, jsi::Object &jsObj);
|
|
120
|
-
void arrayBufferUpdate(
|
|
121
|
-
jsi::Runtime &runtime,
|
|
122
|
-
jsi::ArrayBuffer &buffer,
|
|
123
|
-
std::vector<uint8_t> data,
|
|
124
|
-
size_t offset);
|
|
125
|
-
|
|
126
|
-
template <TypedArrayKind T>
|
|
127
|
-
class TypedArray : public TypedArrayBase {
|
|
128
|
-
public:
|
|
129
|
-
TypedArray(jsi::Runtime &runtime, size_t size);
|
|
130
|
-
TypedArray(jsi::Runtime &runtime, std::vector<ContentType<T>> data);
|
|
131
|
-
TypedArray(TypedArrayBase &&base);
|
|
132
|
-
TypedArray(TypedArray &&) = default;
|
|
133
|
-
TypedArray &operator=(TypedArray &&) = default;
|
|
134
|
-
|
|
135
|
-
std::vector<ContentType<T>> toVector(jsi::Runtime &runtime);
|
|
136
|
-
void update(jsi::Runtime &runtime, const std::vector<ContentType<T>> &data);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
template <TypedArrayKind T>
|
|
140
|
-
TypedArray<T> TypedArrayBase::get(jsi::Runtime &runtime) const & {
|
|
141
|
-
assert(getKind(runtime) == T);
|
|
142
|
-
(void)runtime; // when assert is disabled we need to mark this as used
|
|
143
|
-
return TypedArray<T>(jsi::Value(runtime, jsi::Value(runtime, *this).asObject(runtime)));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
template <TypedArrayKind T>
|
|
147
|
-
TypedArray<T> TypedArrayBase::get(jsi::Runtime &runtime) && {
|
|
148
|
-
assert(getKind(runtime) == T);
|
|
149
|
-
(void)runtime; // when assert is disabled we need to mark this as used
|
|
150
|
-
return TypedArray<T>(std::move(*this));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
template <TypedArrayKind T>
|
|
154
|
-
TypedArray<T> TypedArrayBase::as(jsi::Runtime &runtime) const & {
|
|
155
|
-
if (getKind(runtime) != T) {
|
|
156
|
-
throw jsi::JSError(runtime, "Object is not a TypedArray");
|
|
157
|
-
}
|
|
158
|
-
return get<T>(runtime);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
template <TypedArrayKind T>
|
|
162
|
-
TypedArray<T> TypedArrayBase::as(jsi::Runtime &runtime) && {
|
|
163
|
-
if (getKind(runtime) != T) {
|
|
164
|
-
throw jsi::JSError(runtime, "Object is not a TypedArray");
|
|
165
|
-
}
|
|
166
|
-
return std::move(*this).get<T>(runtime);
|
|
167
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
#ifndef UTILS_H
|
|
2
|
-
#define UTILS_H
|
|
3
|
-
|
|
4
|
-
#include <vector>
|
|
5
|
-
#include <jsi/jsi.h>
|
|
6
|
-
#include "TypedArray.hpp"
|
|
7
|
-
#include <dittoffi.h>
|
|
8
|
-
|
|
9
|
-
#define STRINGIFY(it) #it
|
|
10
|
-
|
|
11
|
-
#define STRINGIFIED_FUNC_NAME() STRINGIFY(__function)
|
|
12
|
-
#define STRINGIFY_TYPE(T) #T
|
|
13
|
-
|
|
14
|
-
using namespace facebook::jsi;
|
|
15
|
-
|
|
16
|
-
namespace sharedjsi
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
std::string pointerToHexString(void const *ptr);
|
|
20
|
-
|
|
21
|
-
template <typename T>
|
|
22
|
-
Value cPointerToJSPointerObject(Runtime &runtime, const T *pointer) {
|
|
23
|
-
if (pointer == nullptr) {
|
|
24
|
-
return Value::null();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
Object obj(runtime);
|
|
28
|
-
obj.setProperty(runtime, "type", STRINGIFY_TYPE(T));
|
|
29
|
-
obj.setProperty(runtime, "addr", pointerToHexString(pointer));
|
|
30
|
-
return obj;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
template <typename T>
|
|
34
|
-
T *jsPointerObjectToCPointer(Runtime &runtime, const Value &arg)
|
|
35
|
-
{
|
|
36
|
-
if (arg.isNull() || arg.isUndefined()) {
|
|
37
|
-
return nullptr;
|
|
38
|
-
}
|
|
39
|
-
Object obj = arg.getObject(runtime);
|
|
40
|
-
std::string str = obj.getProperty(runtime, "addr").toString(runtime).utf8(runtime);
|
|
41
|
-
T *ptr;
|
|
42
|
-
sscanf(str.c_str(), "%p", &ptr);
|
|
43
|
-
return ptr;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
std::vector<uint8_t> jsTypedArrayToCVector(Runtime &runtime, const Value &arg);
|
|
47
|
-
std::string jsTypedArrayToCString(Runtime &runtime, const Value &arg);
|
|
48
|
-
|
|
49
|
-
slice_ref_uint8_t borrowVecAsOptRefSlice(std::vector<uint8_t> const& v);
|
|
50
|
-
slice_ref_uint8_t borrowVecAsRefSlice(std::vector<uint8_t> const& v);
|
|
51
|
-
|
|
52
|
-
Value cSlicedBoxToJSSlicedBox(Runtime &runtime, slice_boxed_uint8 box_c_bytes);
|
|
53
|
-
Function sliceBoxedToUInt8Array(Runtime &runtime);
|
|
54
|
-
|
|
55
|
-
Function withOutBoxCBytes(Runtime &runtime);
|
|
56
|
-
|
|
57
|
-
void ditto_tick(Runtime* jsi);
|
|
58
|
-
void ditto_enqueue_call(std::function<void(Runtime *)> && task);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
#endif /* UTILS_H */
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
#include "Utils.h"
|
|
2
|
-
|
|
3
|
-
#include <Attachment.h>
|
|
4
|
-
|
|
5
|
-
namespace sharedjsi
|
|
6
|
-
{
|
|
7
|
-
Function ditto_cancel_resolve_attachment(Runtime &runtime)
|
|
8
|
-
{
|
|
9
|
-
return Function::createFromHostFunction(runtime,
|
|
10
|
-
PropNameID::forAscii(runtime,
|
|
11
|
-
STRINGIFIED_FUNC_NAME()),
|
|
12
|
-
0,
|
|
13
|
-
[](Runtime &runtime,
|
|
14
|
-
const Value &thisValue,
|
|
15
|
-
const Value *arguments,
|
|
16
|
-
size_t count) -> Value
|
|
17
|
-
{
|
|
18
|
-
CDitto_t *ditto = jsPointerObjectToCPointer<CDitto_t>(runtime, arguments[0]);
|
|
19
|
-
std::vector<uint8_t> id_vec = jsTypedArrayToCVector(runtime, arguments[1]);
|
|
20
|
-
slice_ref_uint8_t id = borrowVecAsOptRefSlice(id_vec);
|
|
21
|
-
|
|
22
|
-
uint64_t cancelToken = arguments[2].asNumber();
|
|
23
|
-
|
|
24
|
-
::ditto_cancel_resolve_attachment(ditto, id, cancelToken);
|
|
25
|
-
return Value();
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
Function ditto_free_attachment_handle(Runtime &runtime)
|
|
30
|
-
{
|
|
31
|
-
return Function::createFromHostFunction(runtime,
|
|
32
|
-
PropNameID::forAscii(runtime,
|
|
33
|
-
STRINGIFIED_FUNC_NAME()),
|
|
34
|
-
0,
|
|
35
|
-
[](Runtime &runtime,
|
|
36
|
-
const Value &thisValue,
|
|
37
|
-
const Value *arguments,
|
|
38
|
-
size_t count) -> Value
|
|
39
|
-
{
|
|
40
|
-
::ditto_free_attachment_handle(jsPointerObjectToCPointer<AttachmentHandle_t>(runtime, arguments[0]));
|
|
41
|
-
return Value();
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
Function ditto_get_complete_attachment_path(Runtime &runtime)
|
|
46
|
-
{
|
|
47
|
-
return Function::createFromHostFunction(runtime,
|
|
48
|
-
PropNameID::forAscii(runtime,
|
|
49
|
-
STRINGIFIED_FUNC_NAME()),
|
|
50
|
-
0,
|
|
51
|
-
[](Runtime &runtime,
|
|
52
|
-
const Value &thisValue,
|
|
53
|
-
const Value *arguments,
|
|
54
|
-
size_t count) -> Value
|
|
55
|
-
{
|
|
56
|
-
CDitto_t *ditto = jsPointerObjectToCPointer<CDitto_t>(runtime, arguments[0]);
|
|
57
|
-
AttachmentHandle_t *attachmentHandler = jsPointerObjectToCPointer<AttachmentHandle_t>(runtime, arguments[1]);
|
|
58
|
-
|
|
59
|
-
::ditto_get_complete_attachment_path(ditto, attachmentHandler);
|
|
60
|
-
return Value();
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
Function ditto_new_attachment_from_bytes(Runtime &runtime)
|
|
65
|
-
{
|
|
66
|
-
return Function::createFromHostFunction(runtime,
|
|
67
|
-
PropNameID::forAscii(runtime,
|
|
68
|
-
STRINGIFIED_FUNC_NAME()),
|
|
69
|
-
0,
|
|
70
|
-
[](Runtime &runtime,
|
|
71
|
-
const Value &thisValue,
|
|
72
|
-
const Value *arguments,
|
|
73
|
-
size_t count) -> Value
|
|
74
|
-
{
|
|
75
|
-
CDitto_t *ditto = jsPointerObjectToCPointer<CDitto_t>(runtime, arguments[0]);
|
|
76
|
-
std::vector<uint8_t> bytes_vec = jsTypedArrayToCVector(runtime, arguments[1]);
|
|
77
|
-
slice_ref_uint8_t bytes = borrowVecAsOptRefSlice(bytes_vec);
|
|
78
|
-
CAttachment_t * out_attachment = jsPointerObjectToCPointer<CAttachment_t>(runtime, arguments[2]);
|
|
79
|
-
|
|
80
|
-
::ditto_new_attachment_from_bytes(ditto, bytes, out_attachment);
|
|
81
|
-
return Value();
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|