OpenTera WebRTC API (C++) 1.2.5
Public Member Functions | Static Public Member Functions | Friends | List of all members
opentera::Client Class Reference

Represents a peer client. More...

#include <Client.h>

Public Member Functions

 Client (std::string id, std::string name, nlohmann::json data)
 Creates a client with the specified values. More...
 
 Client (const nlohmann::json &message)
 
 Client (const Client &other)=default
 
 Client (Client &&other)=default
 
const std::string & id () const
 Returns the client id. More...
 
const std::string & name () const
 Returns the client name. More...
 
const nlohmann::json & data () const
 Returns the client data. More...
 
Clientoperator= (const Client &other)=default
 
Clientoperator= (Client &&other)=default
 

Static Public Member Functions

static bool isValid (const nlohmann::json &message)
 

Friends

bool operator== (const Client &c1, const Client &c2)
 

Detailed Description

Represents a peer client.

Constructor & Destructor Documentation

◆ Client()

Client::Client ( std::string  id,
std::string  name,
nlohmann::json  data 
)

Creates a client with the specified values.

Parameters
idThe client id
nameThe client name
dataThe client data

Member Function Documentation

◆ data()

const nlohmann::json & opentera::Client::data ( ) const
inline

Returns the client data.

Returns
The client data

◆ id()

const std::string & opentera::Client::id ( ) const
inline

Returns the client id.

Returns
The client id

◆ name()

const std::string & opentera::Client::name ( ) const
inline

Returns the client name.

Returns
The client name

The documentation for this class was generated from the following files: