1#ifndef _DITTO_TRANSPORT_CONFIG_
2#define _DITTO_TRANSPORT_CONFIG_
38 return !operator==(other);
105 return !operator==(other);
121 bool operator==(
const Listen &other)
const {
122 return tcp == other.tcp && http == other.http;
124 bool operator!=(
const Listen &other)
const {
return !operator==(other); }
126 NLOHMANN_DEFINE_TYPE_INTRUSIVE(
Listen, tcp, http)
144 return !operator==(other);
147 NLOHMANN_DEFINE_TYPE_INTRUSIVE(BluetoothLeConfig,
enabled)
152#pragma clang diagnostic push
153#pragma clang diagnostic ignored "-Wdeprecated-declarations"
163 bool mdns_enabled =
true;
164 bool multicast_enabled =
true;
166 bool operator==(
const LanConfig &other)
const;
167 bool operator!=(
const LanConfig &other)
const {
return !operator==(other); }
169void from_json(
const nlohmann::json &j, LanConfig &c);
170void to_json(nlohmann::json &j,
const LanConfig &a);
171#pragma clang diagnostic pop
186 bool operator==(
const AwdlConfig &other)
const {
189 bool operator!=(
const AwdlConfig &other)
const {
return !operator==(other); }
191 NLOHMANN_DEFINE_TYPE_INTRUSIVE(AwdlConfig,
enabled)
212 return !operator==(other);
215 NLOHMANN_DEFINE_TYPE_INTRUSIVE(WiFiAwareConfig,
enabled)
246 bool operator==(
const PeerToPeer &other)
const {
250 bool operator!=(
const PeerToPeer &other)
const {
return !operator==(other); }
276 bool operator==(
const Connect &other)
const {
281 bool operator!=(
const Connect &other)
const {
return !operator==(other); }
284void from_json(
const nlohmann::json &j, Connect &c);
285void to_json(nlohmann::json &j,
const Connect &c);
287const uint32_t NO_PREFERRED_ROUTE_HINT = 0;
333 bool operator==(
const Global &other)
const {
336 bool operator!=(
const Global &other)
const {
return !operator==(other); }
406 bool operator!=(
const TransportConfig &other)
const {
407 return !operator==(other);
Part of the PeerToPeer config that relates to AWDL connections.
Definition TransportConfig.hpp:176
bool enabled
Definition TransportConfig.hpp:184
Part of the PeerToPeer config that relates to Bluetooth LE connections.
Definition TransportConfig.hpp:133
bool enabled
Definition TransportConfig.hpp:138
Part of the TransportConfig that relates to outgoing connections.
Definition TransportConfig.hpp:259
std::set< std::string > tcp_servers
Definition TransportConfig.hpp:264
std::chrono::duration< uint32_t, std::milli > retry_interval
Definition TransportConfig.hpp:274
std::set< std::string > websocket_urls
Definition TransportConfig.hpp:269
Definition TransportConfig.hpp:293
uint32_t sync_group
Definition TransportConfig.hpp:312
uint32_t routing_hint
Definition TransportConfig.hpp:331
Part of the Listen config that relates to incoming HTTP connections.
Definition TransportConfig.hpp:47
std::string tls_key_path
Definition TransportConfig.hpp:87
uint16_t port
Definition TransportConfig.hpp:62
std::string interface_ip
Definition TransportConfig.hpp:57
bool enabled
Definition TransportConfig.hpp:52
std::string tls_certificate_path
Definition TransportConfig.hpp:95
std::string static_content_path
Definition TransportConfig.hpp:79
bool websocket_sync
Definition TransportConfig.hpp:71
Part of the PeerToPeer config that relates to LAN connections.
Definition TransportConfig.hpp:157
bool enabled
Definition TransportConfig.hpp:162
Part of the TransportConfig that relates to incoming connections.
Definition TransportConfig.hpp:116
Part of the TransportConfig that relates to peer-to-peer connections.
Definition TransportConfig.hpp:222
LanConfig lan
Definition TransportConfig.hpp:233
BluetoothLeConfig bluetooth_le
Definition TransportConfig.hpp:228
AwdlConfig awdl
Definition TransportConfig.hpp:238
WiFiAwareConfig wifi_aware
Definition TransportConfig.hpp:244
Part of the Listen config that relates to incoming TCP connections.
Definition TransportConfig.hpp:16
uint16_t port
Definition TransportConfig.hpp:31
std::string interface_ip
Definition TransportConfig.hpp:26
bool enabled
Definition TransportConfig.hpp:21
A configuration object specifying which network transports Ditto should use to sync data.
Definition TransportConfig.hpp:369
PeerToPeer peer_to_peer
Definition TransportConfig.hpp:375
Connect connect
Definition TransportConfig.hpp:380
Global global
Definition TransportConfig.hpp:390
void enable_all_peer_to_peer()
Definition TransportConfig.hpp:395
Listen listen
Definition TransportConfig.hpp:385
Part of the PeerToPeer transport config that applies to WiFi Aware connections.
Definition TransportConfig.hpp:198
bool enabled
Definition TransportConfig.hpp:206