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 <co/node.h> // base class
22 : #include <eq/admin/api.h>
23 : #include <eq/admin/types.h>
24 : #include <eq/fabric/server.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 : /** Map all server data. @internal */
45 : void map();
46 :
47 : /** Unmap all server data. @internal */
48 : void unmap();
49 :
50 : /** Synchronize all sever data. @version 1.0 **/
51 : EQADMIN_API void syncConfig(const co::uint128_t& configID,
52 : const co::uint128_t& version);
53 :
54 : virtual void setClient(ClientPtr client); //!< @internal
55 : co::CommandQueue* getMainThreadQueue(); //!< @internal
56 :
57 : private:
58 : bool _cmdMapReply(co::ICommand& command);
59 : bool _cmdUnmapReply(co::ICommand& command);
60 : };
61 : }
62 : }
63 :
64 : #endif // EQADMIN_SERVER_H
|