Ditto  1.0.8
Public Member Functions | Public Attributes | List of all members
ditto::Identity::DevelopmentIdentity Struct Reference

An identity to be used while in development when you want to control either or both of the app name and the site ID of the peer. More...

Public Member Functions

 DevelopmentIdentity (std::string name, uint64_t id)
 Construct a new DevelopmentIdentity. More...
 

Public Attributes

std::string app_name
 
uint64_t site_id
 

Detailed Description

An identity to be used while in development when you want to control either or both of the app name and the site ID of the peer.

Constructor & Destructor Documentation

◆ DevelopmentIdentity()

ditto::Identity::DevelopmentIdentity::DevelopmentIdentity ( std::string  name,
uint64_t  id 
)

Construct a new DevelopmentIdentity.

Parameters
namethe name of the app. Use this to ensure that connections between devices are only established if they share the same app name.
idthe site ID for the device. Use this to identity different users or devices. Site IDs are persisted between sessions when using a development identity. Site IDs should be unique and not reused by different users or devices.

Member Data Documentation

◆ app_name

std::string ditto::Identity::DevelopmentIdentity::app_name

The app name associated with the identity.

◆ site_id

uint64_t ditto::Identity::DevelopmentIdentity::site_id

The site ID associated with the identity.