Equalizer  1.6.1
client/server.h
1 
2 /* Copyright (c) 2005-2011, 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 <eq/client/api.h>
23 #include <eq/client/types.h> // basic typedefs
24 #include <eq/fabric/server.h> // base class
25 #include <co/node.h> // base class
26 
27 namespace eq
28 {
38  class Server : public fabric::Server< Client, Server, Config, NodeFactory,
39  co::Node, ServerVisitor >
40  {
41  public:
43  EQ_API Server();
44 
47  virtual void setClient( ClientPtr client );
48  EQ_API co::CommandQueue* getMainThreadQueue();
49  EQ_API co::CommandQueue* getCommandThreadQueue();
50 
51 
60  EQ_API Config* chooseConfig( const fabric::ConfigParams& parameters );
61 
71  EQ_API void releaseConfig( Config* config );
72 
74  EQ_API bool shutdown();
75 
76  protected:
78  EQ_API virtual ~Server();
79 
80  private:
82  bool _localServer;
83  friend class Client;
84 
85  struct Private;
86  Private* _private; // placeholder for binary-compatible changes
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
96 
A configuration is a visualization session driven by an application.
bool shutdown()
void releaseConfig(Config *config)
Release a configuration.
Base co::Node class for a server.
Definition: fabric/server.h:32
Proxy object for the connection to an Equalizer server.
Definition: client/server.h:38
The client represents a network node of the application in the cluster.
Definition: client/client.h:38
Config * chooseConfig(const fabric::ConfigParams &parameters)
Choose a configuration on the server.
lunchbox::RefPtr< Client > ClientPtr
A reference-counted pointer to the client.
Definition: fabric/server.h:36
Server()
Construct a new server.
Parameters for running a configuration.