1#ifndef _DITTO_PRESENCE_GRAPH_
2#define _DITTO_PRESENCE_GRAPH_
11typedef uint64_t SiteId;
12typedef std::vector<uint8_t> Pubkey;
24 void update_from_json(json
j);
41 float approximate_distance_in_meters;
42 std::string connection_type;
Connection between two peers.
Definition PresenceGraph.hpp:35
Information used to identify a peer.
Definition PresenceGraph.hpp:20
Represent a known peer in the Ditto network.
Definition PresenceGraph.hpp:48
DITTO_DEPRECATED std::vector< uint8_t > peer_key
Definition PresenceGraph.hpp:61
nlohmann::json identity_service_metadata
Metadata associated with the peer by the identity service.
Definition PresenceGraph.hpp:133
std::string peer_key_string
The peer key is a unique identifier for a given peer, equal to or derived from the cryptographic publ...
Definition PresenceGraph.hpp:70
nlohmann::json peer_metadata
Metadata associated with the peer, or empty map by default.
Definition PresenceGraph.hpp:124
std::string os
Operating system of the remote peer.
Definition PresenceGraph.hpp:82
bool is_compatible
Indicates whether the peer is compatible with the current peer.
Definition PresenceGraph.hpp:101
std::string ditto_sdk_version
The Ditto SDK version the peer is running with.
Definition PresenceGraph.hpp:106
std::string device_name
The human-readable device name of the remote peer. This defaults to the hostname but can be manually ...
Definition PresenceGraph.hpp:77
std::vector< Connection > connections
Currently active connections of the peer.
Definition PresenceGraph.hpp:111
bool is_connected_to_ditto_cloud
Indicates whether the peer is connected to Ditto Cloud.
Definition PresenceGraph.hpp:96
uint8_t query_overlap_group
An optional Query Overlap Group which can be assigned to group certain types of peers together and co...
Definition PresenceGraph.hpp:91
DittoAddress address
Address to contact this peer via Ditto Bus.
Definition PresenceGraph.hpp:55
Represents the Ditto mesh network of peers and their connections between each other....
Definition PresenceGraph.hpp:141
Peer local_peer
Returns the local peer (usually the peer that is represented by the currently running Ditto instance)...
Definition PresenceGraph.hpp:154
std::vector< Peer > remote_peers
Returns all remote peers known by the local_peer, either directly or via other remote peers.
Definition PresenceGraph.hpp:160
PresenceGraph(nlohmann::json)
Construct a new Presence Graph object.
Definition PresenceGraph.cpp:65
basic_json<> json
default JSON class
Definition json.hpp:2933