Equalizer  2.1.0
Parallel Rendering Framework
server.h
1 
2 /* Copyright (c) 2005-2014, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2012, Daniel Nachbaur <danielnachbaur@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License version 2.1 as published
7  * by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EQ_SERVER_H
20 #define EQ_SERVER_H
21 
22 #include <co/node.h> // base class
23 #include <eq/api.h>
24 #include <eq/fabric/server.h> // base class
25 #include <eq/types.h> // basic typedefs
26 
27 namespace eq
28 {
29 namespace detail
30 {
31 class Server;
32 }
33 
43 class Server : public fabric::Server<Client, Server, Config, NodeFactory,
44  co::Node, ServerVisitor>
45 {
46 public:
48  EQ_API Server();
49 
52  virtual void setClient(ClientPtr client);
53  EQ_API co::CommandQueue* getMainThreadQueue();
54  EQ_API co::CommandQueue* getCommandThreadQueue();
55 
56 
65  EQ_API Config* chooseConfig(const fabric::ConfigParams& parameters);
66 
76  EQ_API void releaseConfig(Config* config);
77 
79  EQ_API bool shutdown();
80 
81 protected:
83  EQ_API virtual ~Server();
84 
85 private:
86  detail::Server* const _impl;
87 
88  /* The command handler functions. */
89  bool _cmdChooseConfigReply(co::ICommand& command);
90  bool _cmdReleaseConfigReply(co::ICommand& command);
91  bool _cmdShutdownReply(co::ICommand& command);
92 };
93 }
94 
95 #endif // EQ_SERVER_H
Parameters for running a configuration.
Definition: configParams.h:36
A configuration is a visualization session driven by an application.
Definition: config.h:58
Proxy object for the connection to an Equalizer server.
Definition: server.h:43
EQ_API void releaseConfig(Config *config)
Convenience function to release a configuration.
Base co::Node class for a server.
Definition: fabric/server.h:32
The Equalizer client library.
Definition: eq/agl/types.h:23
lunchbox::RefPtr< Client > ClientPtr
A reference-counted pointer to the client.
Definition: fabric/server.h:36