Equalizer
1.2.1
|
00001 00002 /* Copyright (c) 2005-2011, Stefan Eilemann <eile@equalizergraphics.com> 00003 * 00004 * This library is free software; you can redistribute it and/or modify it under 00005 * the terms of the GNU Lesser General Public License version 2.1 as published 00006 * by the Free Software Foundation. 00007 * 00008 * This library is distributed in the hope that it will be useful, but WITHOUT 00009 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00010 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00011 * details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public License 00014 * along with this library; if not, write to the Free Software Foundation, Inc., 00015 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00016 */ 00017 00018 #ifndef EQ_SERVER_H 00019 #define EQ_SERVER_H 00020 00021 #include <eq/client/api.h> 00022 #include <eq/client/types.h> // basic typedefs 00023 #include <eq/fabric/server.h> // base class 00024 #include <co/node.h> // base class 00025 00026 namespace eq 00027 { 00037 class Server : public fabric::Server< Client, Server, Config, NodeFactory, 00038 co::Node, ServerVisitor > 00039 { 00040 public: 00042 EQ_API Server(); 00043 00046 virtual void setClient( ClientPtr client ); 00047 EQ_API co::CommandQueue* getMainThreadQueue(); 00048 EQ_API co::CommandQueue* getCommandThreadQueue(); 00049 00050 00059 EQ_API Config* chooseConfig( const ConfigParams& parameters ); 00060 00070 EQ_API void releaseConfig( Config* config ); 00071 00073 EQ_API bool shutdown(); 00074 00075 protected: 00077 EQ_API virtual ~Server(); 00078 00079 private: 00081 bool _localServer; 00082 friend class Client; 00083 00084 struct Private; 00085 Private* _private; // placeholder for binary-compatible changes 00086 00087 /* The command handler functions. */ 00088 bool _cmdChooseConfigReply( co::Command& command ); 00089 bool _cmdReleaseConfigReply( co::Command& command ); 00090 bool _cmdShutdownReply( co::Command& command ); 00091 }; 00092 } 00093 00094 #endif // EQ_SERVER_H 00095