Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
Connection.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>
26
27#include <string>
28#include <memory>
29#include <vector>
30
31namespace RemoteViz
32{
33 namespace Rendering
34 {
35
36 class RenderArea;
37
38 class ConnectionImpl;
39
40 class Client;
41
42 class ConnectionSettings;
43
44 class ConnectionParameters;
45
82
84 friend class ConnectionManager;
85 friend class RenderAreaImpl;
86 friend class ClientImpl;
87 friend class KeepFramesPerSecondPolicyImpl;
88 friend class KeepFrameQualityPolicyImpl;
91 public:
92
111 bool isOpen() const;
118 const std::string& getId() const;
124 std::shared_ptr<ConnectionSettings> getSettings() const;
131 std::shared_ptr<const ConnectionParameters> getParameters() const;
137 std::shared_ptr<RenderArea> getRenderArea() const;
143 unsigned int getRequestedWidth() const;
149 unsigned int getRequestedHeight() const;
155 unsigned int getContainerWidth() const;
161 unsigned int getContainerHeight() const;
167 std::shared_ptr<Client> getClient() const;
175 bool sendMessage(const std::string& message) const;
184 bool sendMessage(const std::vector<unsigned char>& buffer) const;
189 void close();
196
197 private:
199 std::shared_ptr<ConnectionImpl> getImpl() const;
202 private:
204 std::shared_ptr<ConnectionImpl> pImpl;
205
207 Connection();
208
210 Connection(const Connection&) = delete;
211 Connection& operator= (const Connection&) = delete;
212
214 static std::shared_ptr<Connection> createInstance();
215
216 };
217
218 }
219}
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 Connection.h:81
std::shared_ptr< RenderArea > getRenderArea() const
Gets the RenderArea associated with the connection.
const std::string & getId() const
Gets the id of the connection.
void close()
Closes the connection.
unsigned int getContainerWidth() const
Gets the client container width.
unsigned int getContainerHeight() const
Gets the client container height.
bool sendMessage(const std::vector< unsigned char > &buffer) const
Sends a binary message to the client.
std::shared_ptr< ConnectionSettings > getSettings() const
Gets the connection settings.
std::shared_ptr< Client > getClient() const
Gets the client associated with this connection.
bool sendMessage(const std::string &message) const
Sends a text message to the client.
bool isOpen() const
Gets the state of the Connection: open or closed.
unsigned int getRequestedHeight() const
Gets the last renderArea height requested by the client.
EncodedFrame getLastEncodedFrame() const
Gets the last encoded frame sent by the connection.
std::shared_ptr< const ConnectionParameters > getParameters() const
Gets the connection parameters.
unsigned int getRequestedWidth() const
Gets the last renderArea width requested by the client.
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
Class to render an OpenInventor scene in a Qt OpenGL window.
Definition RenderArea.h:46
#define RENDERSERVICE_API
Definition port.h:378