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 #if defined( _WIN32 ) || defined( __WIN32__ )
00024 #if !defined( RemoteVizServices_EXPORTS )
00025 #if _DEBUG
00026 #pragma comment(lib,"RemoteVizServicesD")
00027 #else
00028 #pragma comment(lib,"RemoteVizServices")
00029 #endif
00030 #endif
00031 #endif
00032
00033 #include <Inventor/sys/port.h>
00034
00035 #include <string>
00036 #include <memory>
00037
00038
00039 namespace RemoteViz
00040 {
00041 namespace Rendering
00042 {
00043
00044 class RenderArea;
00045
00046 class ConnectionImpl;
00047
00048 class Client;
00049
00050 class ConnectionSettings;
00051
00052 class ConnectionParameters;
00053
00054 class EncodedFrame;
00055
00067 class RENDERSERVICE_API Connection {
00068
00070 friend class ServiceImpl;
00071 friend class RenderAreaImpl;
00072 friend class ClientImpl;
00073 friend class KeepFramesPerSecondPolicyImpl;
00074 friend class KeepFrameQualityPolicyImpl;
00077 public:
00078
00084 const std::string& getId() const;
00090 ConnectionSettings* getSettings() const;
00096 ConnectionParameters* getParameters() const;
00102 RenderArea* getRenderArea() const;
00108 unsigned int getRequestedWidth() const;
00114 unsigned int getRequestedHeight() const;
00120 unsigned int getContainerWidth() const;
00126 unsigned int getContainerHeight() const;
00132 Client* getClient() const;
00140 bool sendMessage(const std::string& message) const;
00145 void close();
00151 EncodedFrame* getLastEncodedFrame() const;
00152
00153 private:
00155 std::shared_ptr<ConnectionImpl> getImpl() const;
00158 private:
00160 std::shared_ptr<ConnectionImpl> pImpl;
00161
00163 Connection();
00164
00166 Connection(const Connection&) = delete;
00167 Connection& operator= (const Connection&) = delete;
00168
00170 static std::shared_ptr<Connection> createInstance();
00171
00172 };
00173
00174 }
00175 }
00176