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
00026 #include <string>
00027 #include <memory>
00028 #include <vector>
00029
00030 namespace RemoteViz
00031 {
00032 namespace Rendering
00033 {
00034
00035 class ClientImpl;
00036 class Connection;
00037 class ClientSettings;
00038 struct ClientParameters;
00039
00078 class RENDERSERVICE_API Client {
00079
00081 friend class ServiceImpl;
00082 friend class ConnectionImpl;
00085 public:
00086
00099 bool isConnected() const;
00106 const std::string& getId() const;
00114 std::shared_ptr<Connection> getConnection(const std::string& id) const;
00123 std::shared_ptr<Connection> getConnection(unsigned int index) const;
00129 unsigned int getNumConnections() const;
00140 const std::string& getApplicationName() const;
00147 const std::string& getEnvironment() const;
00153 bool isImageStreamingSupported() const;
00159 bool isVideoStreamingSupported() const;
00169 bool sendMessage(const std::string& message, std::vector<std::shared_ptr<Connection>> excludedConnections = {}) const;
00179 bool sendMessage(const std::vector<unsigned char>& buffer, std::vector<std::shared_ptr<Connection>> excludedConnections = {}) const;
00184 void disconnect();
00190 std::shared_ptr<ClientSettings> getSettings() const;
00191
00192 private:
00194 std::shared_ptr<ClientImpl> getImpl() const;
00197 private:
00199 std::shared_ptr<ClientImpl> pImpl;
00200
00202 Client(const std::string &id, const ClientParameters& clientParameters);
00203
00205 Client(const Client&) = delete;
00206 Client& operator= (const Client&) = delete;
00207
00209 static std::shared_ptr<Client> createInstance(const std::string &id, const ClientParameters& clientParameters);
00210
00211 };
00212
00213 }
00214 }
00215