Line data Source code
1 :
2 : /* Copyright (c) 2010-2014, Stefan Eilemann <eile@eyescale.ch>
3 : *
4 : * This library is free software; you can redistribute it and/or modify it under
5 : * the terms of the GNU Lesser General Public License version 2.1 as published
6 : * by the Free Software Foundation.
7 : *
8 : * This library is distributed in the hope that it will be useful, but WITHOUT
9 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11 : * details.
12 : *
13 : * You should have received a copy of the GNU Lesser General Public License
14 : * along with this library; if not, write to the Free Software Foundation, Inc.,
15 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 : */
17 :
18 : #ifndef EQADMIN_SERVER_H
19 : #define EQADMIN_SERVER_H
20 :
21 : #include <eq/admin/api.h>
22 : #include <eq/admin/types.h>
23 : #include <eq/fabric/server.h> // base class
24 : #include <co/node.h> // base class
25 :
26 : namespace eq
27 : {
28 : namespace admin
29 : {
30 : /**
31 : * Proxy object for the connection to an Equalizer server.
32 : *
33 : * @sa Client::connectServer
34 : */
35 : class Server : public fabric::Server< Client, Server, Config, NodeFactory,
36 : co::Node, ServerVisitor >
37 : {
38 : public:
39 : /** Construct a new server. @version 1.0 */
40 : EQADMIN_API Server();
41 :
42 : /** Destruct the server. @version 1.0 */
43 0 : EQADMIN_API virtual ~Server() {}
44 :
45 : /** Map all server data. @internal */
46 : void map();
47 :
48 : /** Unmap all server data. @internal */
49 : void unmap();
50 :
51 : /** Synchronize all sever data. @version 1.0 **/
52 : EQADMIN_API void syncConfig( const co::uint128_t& configID,
53 : const co::uint128_t& version );
54 :
55 : virtual void setClient( ClientPtr client ); //!< @internal
56 : co::CommandQueue* getMainThreadQueue(); //!< @internal
57 :
58 : private:
59 : bool _cmdMapReply( co::ICommand& command );
60 : bool _cmdUnmapReply( co::ICommand& command );
61 : };
62 : }
63 : }
64 :
65 : #endif // EQADMIN_SERVER_H
|