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

Represents a room client. More...

#include <Client.h>

Public Member Functions

 RoomClient ()
 Creates a room client with the default values.
 
 RoomClient (std::string id, std::string name, nlohmann::json data, bool isConnected)
 Creates a room client with the specified values. More...
 
 RoomClient (const Client &client, bool isConnected)
 Creates a room client from a client. More...
 
 RoomClient (const RoomClient &other)=default
 
 RoomClient (RoomClient &&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...
 
bool isConnected () const
 Indicates if the client is connected (RTCPeerConnection). More...
 
 operator Client () const
 
RoomClientoperator= (const RoomClient &other)=default
 
RoomClientoperator= (RoomClient &&other)=default
 

Friends

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

Detailed Description

Represents a room client.

Constructor & Destructor Documentation

◆ RoomClient() [1/2]

RoomClient::RoomClient ( std::string  id,
std::string  name,
nlohmann::json  data,
bool  isConnected 
)

Creates a room client with the specified values.

Parameters
idThe client id
nameThe client name
dataThe client data
isConnectedIndicates if the client is connected (RTCPeerConnection)

◆ RoomClient() [2/2]

RoomClient::RoomClient ( const Client client,
bool  isConnected 
)

Creates a room client from a client.

Parameters
clientThe client
isConnectedIndicates if the client is connected (RTCPeerConnection)

Member Function Documentation

◆ data()

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

Returns the client data.

Returns
The client data

◆ id()

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

Returns the client id.

Returns
The client id

◆ isConnected()

bool opentera::RoomClient::isConnected ( ) const
inline

Indicates if the client is connected (RTCPeerConnection).

Returns
true if the client is connected (RTCPeerConnection)

◆ name()

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

Returns the client name.

Returns
The client name

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