Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
Client.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2021 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20
21#pragma once
22
23#include <Inventor/sys/port.h>
25
26#include <string>
27#include <memory>
28#include <vector>
29
30namespace RemoteViz
31{
32 namespace Rendering
33 {
34
35 class ClientImpl;
36 class Connection;
37 class ClientSettings;
38 struct ClientParameters;
39
79
81 friend class ServiceImpl;
82 friend class ConnectionImpl;
85 public:
86
99 bool isConnected() const;
106 const std::string& getId() const;
114 std::shared_ptr<Connection> getConnection(const std::string& id) const;
123 std::shared_ptr<Connection> getConnection(unsigned int index) const;
129 unsigned int getNumConnections() const;
140 const std::string& getApplicationName() const;
147 const std::string& getEnvironment() const;
169 bool sendMessage(const std::string& message, std::vector<std::shared_ptr<Connection>> excludedConnections = {}) const;
179 bool sendMessage(const std::vector<unsigned char>& buffer, std::vector<std::shared_ptr<Connection>> excludedConnections = {}) const;
190 std::shared_ptr<ClientSettings> getSettings() const;
191
192 private:
194 std::shared_ptr<ClientImpl> getImpl() const;
197 private:
199 std::shared_ptr<ClientImpl> pImpl;
200
202 Client(const std::string &id, const ClientParameters& clientParameters);
203
205 Client(const Client&) = delete;
206 Client& operator= (const Client&) = delete;
207
209 static std::shared_ptr<Client> createInstance(const std::string &id, const ClientParameters& clientParameters);
210
211 };
212
213 }
214}
valueRef operator=(valueRef newValue)
Sets this field to newValue.
Definition SoSubField.h:242
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
Definition Client.h:78
std::shared_ptr< Connection > getConnection(const std::string &id) const
Gets a Connection of the client.
bool sendMessage(const std::vector< unsigned char > &buffer, std::vector< std::shared_ptr< Connection > > excludedConnections={}) const
Sends a binary message to all the connections of the client.
unsigned int getNumConnections() const
Gets the number of client connections.
void disconnect()
Disconnects the client.
bool isConnected() const
Gets the state of the Client: connected or disconnected.
const std::string & getApplicationName() const
HTML5 client: Returns the domain name of the web host to which the client is connected.
std::shared_ptr< Connection > getConnection(unsigned int index) const
Gets a Connection of the client.
const std::string & getEnvironment() const
HTML5 client: Returns the value of the user-agent header sent by the client web browser.
bool sendMessage(const std::string &message, std::vector< std::shared_ptr< Connection > > excludedConnections={}) const
Sends a text message to all the connections of the client.
bool isVideoStreamingSupported() const
Returns if the client supports video streaming.
std::shared_ptr< ClientSettings > getSettings() const
Gets the client settings.
bool isImageStreamingSupported() const
Returns if the client supports image streaming.
const std::string & getId() const
Gets the id of the client.
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
Definition Connection.h:81
#define RENDERSERVICE_API
Definition port.h:378