18 explicit Sync(std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper);
20 std::shared_ptr<DittoHandleWrapper> ditto_handle_wrapper;
21 void set_weak_ditto_fields(std::weak_ptr<Ditto::Fields> weak_ditto_fields);
22 std::weak_ptr<Ditto::Fields> weak_ditto_fields;
25 std::shared_ptr<std::mutex>
synchronized;
27 friend class SyncSubscription;
32 bool unregister_subscription(std::shared_ptr<SyncSubscription> subscription);
34 void remove_subscription(std::shared_ptr<SyncSubscription> subscription);
39#pragma GCC diagnostic push
40#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
41 Sync(
const Sync &other) =
default;
42 Sync(Sync &&other) =
default;
43 Sync &operator=(
const Sync &other) =
default;
44 Sync &operator=(Sync &&other) =
default;
46#pragma GCC diagnostic pop
58 DITTO_DEPRECATED std::set<std::shared_ptr<SyncSubscription>>
subscriptions;
75 std::shared_ptr<SyncSubscription>
std::shared_ptr< SyncSubscription > register_subscription(std::string query, nlohmann::json query_args=nullptr)
Installs and returns a sync subscription for a query, configuring Ditto to receive updates from other...