@dittolive/ditto 4.11.4 → 4.11.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.
package/README.md CHANGED
@@ -3,10 +3,10 @@
3
3
  _Ditto is a cross-platform SDK that allows mobile, web, and IoT apps to sync
4
4
  with and even without connectivity._
5
5
 
6
- Version: **4.11.4**
6
+ Version: **4.11.5**
7
7
 
8
8
  For more information please visit [ditto.com](https://ditto.com), as well as the
9
- [API Reference](https://software.ditto.live/js/Ditto/4.11.4/api-reference/) for this particular version.
9
+ [API Reference](https://software.ditto.live/js/Ditto/4.11.5/api-reference/) for this particular version.
10
10
 
11
11
  ---
12
12
 
package/node/ditto.cjs.js CHANGED
@@ -2274,7 +2274,7 @@ class AttachmentToken {
2274
2274
 
2275
2275
  // NOTE: this is patched up with the actual build version by Jake task
2276
2276
  // build:package and has to be a valid semantic version as defined here: https://semver.org.
2277
- const fullBuildVersionString = '4.11.4';
2277
+ const fullBuildVersionString = '4.11.5';
2278
2278
 
2279
2279
  //
2280
2280
  // Copyright © 2021 DittoLive Incorporated. All rights reserved.
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dittolive/ditto",
3
- "version": "4.11.4",
3
+ "version": "4.11.5",
4
4
  "description": "Ditto is a cross-platform SDK that allows apps to sync with and even without internet connectivity.",
5
5
  "homepage": "https://ditto.live",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -23978,6 +23978,11 @@ SWIGEXPORT jstring JNICALL Java_live_ditto_internal_swig_ffi_dittoffiJNI_ditto_1
23978
23978
  }
23979
23979
  }
23980
23980
  if (result) jresult = jenv->NewStringUTF((const char *)result);
23981
+ {
23982
+ if (result != NULL) {
23983
+ ditto_c_string_free(result);
23984
+ }
23985
+ }
23981
23986
  return jresult;
23982
23987
  }
23983
23988
 
@@ -25234,6 +25239,11 @@ SWIGEXPORT jstring JNICALL Java_live_ditto_internal_swig_ffi_dittoffiJNI_ditto_1
25234
25239
  }
25235
25240
  }
25236
25241
  if (result) jresult = jenv->NewStringUTF((const char *)result);
25242
+ {
25243
+ if (result != NULL) {
25244
+ ditto_c_string_free(result);
25245
+ }
25246
+ }
25237
25247
  return jresult;
25238
25248
  }
25239
25249
 
@@ -25481,6 +25491,11 @@ SWIGEXPORT jstring JNICALL Java_live_ditto_internal_swig_ffi_dittoffiJNI_ditto_1
25481
25491
  }
25482
25492
  }
25483
25493
  if (result) jresult = jenv->NewStringUTF((const char *)result);
25494
+ {
25495
+ if (result != NULL) {
25496
+ ditto_c_string_free(result);
25497
+ }
25498
+ }
25484
25499
  return jresult;
25485
25500
  }
25486
25501
 
@@ -25745,6 +25760,11 @@ SWIGEXPORT jstring JNICALL Java_live_ditto_internal_swig_ffi_dittoffiJNI_ditto_1
25745
25760
  }
25746
25761
  }
25747
25762
  if (result) jresult = jenv->NewStringUTF((const char *)result);
25763
+ {
25764
+ if (result != NULL) {
25765
+ ditto_c_string_free(result);
25766
+ }
25767
+ }
25748
25768
  return jresult;
25749
25769
  }
25750
25770
 
@@ -26883,6 +26903,11 @@ SWIGEXPORT jstring JNICALL Java_live_ditto_internal_swig_ffi_dittoffiJNI_dittoff
26883
26903
  jenv->ReleaseByteArrayElements(jarg1, (jbyte *)(&arg1)->ptr, JNI_ABORT);
26884
26904
  }
26885
26905
  }
26906
+ {
26907
+ if (result != NULL) {
26908
+ ditto_c_string_free(result);
26909
+ }
26910
+ }
26886
26911
  return jresult;
26887
26912
  }
26888
26913
 
@@ -27112,6 +27137,11 @@ SWIGEXPORT jstring JNICALL Java_live_ditto_internal_swig_ffi_dittoffiJNI_dittoff
27112
27137
  }
27113
27138
  }
27114
27139
  if (result) jresult = jenv->NewStringUTF((const char *)result);
27140
+ {
27141
+ if (result != NULL) {
27142
+ ditto_c_string_free(result);
27143
+ }
27144
+ }
27115
27145
  return jresult;
27116
27146
  }
27117
27147
 
@@ -29065,6 +29095,11 @@ SWIGEXPORT jstring JNICALL Java_live_ditto_internal_swig_ffi_dittoffiJNI_dittoff
29065
29095
  }
29066
29096
  }
29067
29097
  if (result) jresult = jenv->NewStringUTF((const char *)result);
29098
+ {
29099
+ if (result != NULL) {
29100
+ ditto_c_string_free(result);
29101
+ }
29102
+ }
29068
29103
  return jresult;
29069
29104
  }
29070
29105
 
@@ -29140,6 +29175,11 @@ SWIGEXPORT jstring JNICALL Java_live_ditto_internal_swig_ffi_dittoffiJNI_dittoff
29140
29175
  }
29141
29176
  }
29142
29177
  if (result) jresult = jenv->NewStringUTF((const char *)result);
29178
+ {
29179
+ if (result != NULL) {
29180
+ ditto_c_string_free(result);
29181
+ }
29182
+ }
29143
29183
  return jresult;
29144
29184
  }
29145
29185
 
@@ -29964,6 +30004,11 @@ SWIGEXPORT jstring JNICALL Java_live_ditto_internal_swig_ffi_dittoffiJNI_dittoff
29964
30004
  }
29965
30005
  }
29966
30006
  if (result) jresult = jenv->NewStringUTF((const char *)result);
30007
+ {
30008
+ if (result != NULL) {
30009
+ ditto_c_string_free(result);
30010
+ }
30011
+ }
29967
30012
  return jresult;
29968
30013
  }
29969
30014
 
@@ -468,6 +468,15 @@
468
468
  %newobject ditto_get_complete_attachment_path;
469
469
  %newobject ditto_get_sdk_version;
470
470
  %newobject ditto_document_id_query_compatible;
471
+ %newobject dittoffi_query_result_item_json;
472
+ %newobject ditto_small_peer_info_get_metadata;
473
+ %newobject dittoffi_error_description;
474
+ %newobject dittoffi_base64_encode;
475
+ %newobject ditto_presence_v3;
476
+ %newobject ditto_transports_diagnostics;
477
+ %newobject dittoffi_get_sdk_semver;
478
+ %newobject ditto_sdk_transports_error_description;
479
+ %newobject dittoffi_connection_request_peer_key_string;
471
480
 
472
481
  // To make it possible (or at least a lot easier) to work with pointers to some
473
482
  // of the Ditto_* types we use the `%pointer_functions` directive to provide a
@@ -2,6 +2,7 @@
2
2
  #include "Arc.hpp"
3
3
  #include <Transports.h>
4
4
  #include <map>
5
+ #include <unordered_map>
5
6
 
6
7
  namespace sharedjsi
7
8
  {
@@ -22,8 +23,8 @@ void v_transport_condition_change_cb(void *ctx, ConditionSource_t condition_sour
22
23
  {CONDITION_SOURCE_MDNS, "Mdns"},
23
24
  {CONDITION_SOURCE_WIFI_AWARE, "WiFiAware"}
24
25
  };
25
-
26
-
26
+
27
+
27
28
  std::string condition_source_str;
28
29
  auto it = conditionSourceToString.find(condition_source);
29
30
  if (it != conditionSourceToString.end()) {
@@ -31,7 +32,7 @@ void v_transport_condition_change_cb(void *ctx, ConditionSource_t condition_sour
31
32
  } else {
32
33
  throw std::invalid_argument("Invalid ConditionSource_t value. A new value might've been introduced that is not handled.");
33
34
  }
34
-
35
+
35
36
  std::string transport_condition_str;
36
37
  const std::unordered_map<TransportCondition_t, std::string> transportConditionMap = {
37
38
  {TRANSPORT_CONDITION_UNKNOWN, "Unknown"},
@@ -48,14 +49,14 @@ void v_transport_condition_change_cb(void *ctx, ConditionSource_t condition_sour
48
49
  {TRANSPORT_CONDITION_WIFI_DISABLED, "WiFiDisabled"},
49
50
  {TRANSPORT_CONDITION_TEMPORARILY_UNAVAILABLE, "TemporarilyUnavailable"},
50
51
  };
51
-
52
+
52
53
  auto it2 = transportConditionMap.find(transport_condition);
53
54
  if (it2 != transportConditionMap.end()) {
54
55
  transport_condition_str = it2->second;
55
56
  } else {
56
57
  throw std::invalid_argument("Invalid TransportCondition_t value. A new value might've been introduced that is not handled.");
57
58
  }
58
-
59
+
59
60
  jsCallback->call(runtime, condition_source_str, transport_condition_str);
60
61
  });
61
62
  }
@@ -216,7 +217,7 @@ Function ditto_register_transport_condition_changed_callback(Runtime &runtime)
216
217
  CDitto_t *ditto = jsPointerObjectToCPointer<CDitto_t>(runtime, arguments[0]);
217
218
  Function jsCallback = arguments[1].getObject(runtime).getFunction(runtime);
218
219
  Arc<Function> wrappedStateFfiWrapper(std::move(jsCallback));
219
-
220
+
220
221
  ::ditto_register_transport_condition_changed_callback(ditto, Arc<Function>::as_raw(wrappedStateFfiWrapper), v_retain, v_release, v_transport_condition_change_cb);
221
222
  return {};
222
223
  });