1#ifndef _DITTO_DITTO_SYNC_KIT_
2#define _DITTO_DITTO_SYNC_KIT_
7#include "TransportConfig.hpp"
24 friend class ValidityListener;
36 std::string persistence_dir =
"");
50 std::shared_ptr<Authenticator>
get_auth()
const;
240 std::shared_ptr<Fields> fields;
242 explicit Ditto(std::shared_ptr<Fields> fields);
244 void validity_updated(
bool web_valid,
bool x509_valid)
const;
Provides access to authentication information and methods for logging on to Ditto Cloud....
Definition: Authenticator.hpp:26
The entrypoint to the Ditto SDK.
Definition: Ditto.hpp:22
static bool get_logging_enabled()
Gets whether or not logging is enabled for Ditto.
Definition: Ditto.cpp:291
void set_access_license(std::string license_str) DITTO_DEPRECATED
Activate an offline Ditto instance by setting a license token. You cannot initiate sync on an offline...
Definition: Ditto.cpp:210
TransportConfig get_transport_config() const
Returns the current transport config.
Definition: Ditto.cpp:225
void stop_sync() const
Stops all network transports.
Definition: Ditto.cpp:259
static void set_minimum_log_level(LogLevel log_level)
Sets the minimum log level at which logs should be emitted for Ditto.
Definition: Ditto.cpp:307
void set_transport_config(TransportConfig config)
Assign a new transports configuration.
Definition: Ditto.cpp:269
void run_garbage_collection() const
Removes all sync metadata for any remote peers which aren't currently connected.
Definition: Ditto.cpp:311
void start_sync() const DITTO_DEPRECATED
Starts the network transports. Ditto will connect to other devices and sync with them where appropria...
Definition: Ditto.cpp:250
bool get_is_sync_active() const
Returns a flag indicating whether or not sync is active. Use try_start_sync to activate sync and stop...
Definition: Ditto.cpp:229
static void set_logging_enabled(bool enabled)
Sets whether or not logging is enabled for Ditto.
Definition: Ditto.cpp:293
static bool get_emoji_log_level_headings_enabled()
Gets whether or not emoji log level headings are enabled for Ditto.
Definition: Ditto.cpp:297
Ditto(std::shared_ptr< Identity > identity=Identity::OfflinePlayground(), std::string persistence_dir="")
Initializes a new Ditto instance.
Definition: Ditto.cpp:90
void update_transport_config(std::function< void(TransportConfig &config)> lambda)
Convenience method to update the current transport config of the receiver.
Definition: Ditto.cpp:277
void try_start_sync() const
Starts the network transports. Ditto will connect to other devices and sync with them where appropria...
Definition: Ditto.cpp:231
void set_offline_only_license_token(std::string license_token)
Activate an offline Ditto instance by setting a license token. You cannot initiate sync on an offline...
Definition: Ditto.cpp:189
static LogLevel get_minimum_log_level()
Gets the minimum log level at which logs will be emitted for Ditto.
Definition: Ditto.cpp:305
Store & get_store() const
Provides access to the SDK's store functionality.
Definition: Ditto.cpp:223
std::shared_ptr< Authenticator > get_auth() const
Provides access to authentication information and methods for logging on to Ditto Cloud.
Definition: Ditto.cpp:221
static void set_emoji_log_level_headings_enabled(bool enabled)
Sets whether or not emoji log level headings are enabled for Ditto.
Definition: Ditto.cpp:301
void set_license_token(std::string license_token) DITTO_DEPRECATED
Activate an offline Ditto instance by setting a license token. You cannot initiate sync on an offline...
Definition: Ditto.cpp:182
static std::string get_sdk_version()
Returns a string identifying the version of the Ditto SDK.
Definition: Ditto.cpp:284
static std::shared_ptr< OfflinePlaygroundIdentity > OfflinePlayground(std::string app_id="", uint64_t site_id=0, std::string persistence_dir="")
Construct a new OfflinePlaygroundIdentity.
Definition: Identity.cpp:34
Provides access to Collections and a write transaction API.
Definition: Store.hpp:20
A configuration object specifying which network transports Ditto should use to sync data.
Definition: TransportConfig.hpp:256