00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022
00023 #include <Inventor/sys/port.h>
00024 #include <RemoteViz/Rendering/LibHelper.h>
00025 #include <RemoteViz/Rendering/EncodedFrame.h>
00026
00027 #include <string>
00028 #include <memory>
00029 #include <vector>
00030
00031 namespace RemoteViz
00032 {
00033 namespace Rendering
00034 {
00035
00036 class RenderArea;
00037
00038 class ConnectionImpl;
00039
00040 class Client;
00041
00042 class ConnectionSettings;
00043
00044 class ConnectionParameters;
00045
00081 class RENDERSERVICE_API Connection {
00082
00084 friend class ConnectionManager;
00085 friend class RenderAreaImpl;
00086 friend class ClientImpl;
00087 friend class KeepFramesPerSecondPolicyImpl;
00088 friend class KeepFrameQualityPolicyImpl;
00091 public:
00092
00111 bool isOpen() const;
00118 const std::string& getId() const;
00124 std::shared_ptr<ConnectionSettings> getSettings() const;
00131 std::shared_ptr<const ConnectionParameters> getParameters() const;
00137 std::shared_ptr<RenderArea> getRenderArea() const;
00143 unsigned int getRequestedWidth() const;
00149 unsigned int getRequestedHeight() const;
00155 unsigned int getContainerWidth() const;
00161 unsigned int getContainerHeight() const;
00167 std::shared_ptr<Client> getClient() const;
00175 bool sendMessage(const std::string& message) const;
00184 bool sendMessage(const std::vector<unsigned char>& buffer) const;
00189 void close();
00195 EncodedFrame getLastEncodedFrame() const;
00196
00197 private:
00199 std::shared_ptr<ConnectionImpl> getImpl() const;
00202 private:
00204 std::shared_ptr<ConnectionImpl> pImpl;
00205
00207 Connection();
00208
00210 Connection(const Connection&) = delete;
00211 Connection& operator= (const Connection&) = delete;
00212
00214 static std::shared_ptr<Connection> createInstance();
00215
00216 };
00217
00218 }
00219 }
00220