Collage  1.7.0
High-performance C++ library for developing object-oriented distributed applications.
zeroconf.h
1 
2 /* Copyright (c) 2012-2014, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This file is part of Collage <https://github.com/Eyescale/Collage>
5  *
6  * This library is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License version 2.1 as published
8  * by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef CO_ZEROCONF_H
21 #define CO_ZEROCONF_H
22 
23 #include <co/api.h>
24 #include <co/types.h>
25 
26 namespace co
27 {
28 namespace detail
29 {
30 class Zeroconf;
31 }
32 
49 class Zeroconf
50 {
51 public:
53  CO_API Zeroconf(const Zeroconf& from);
54 
56  CO_API ~Zeroconf();
57 
59  CO_API Zeroconf& operator=(const Zeroconf& rhs);
60 
70  CO_API void set(const std::string& key, const std::string& value);
71 
73  CO_API Strings getInstances() const;
74 
76  CO_API Strings getKeys(const std::string& instance) const;
77 
79  CO_API bool containsKey(const std::string& instance,
80  const std::string& key) const;
81 
83  CO_API const std::string& get(const std::string& instance,
84  const std::string& key) const;
85 
86 private:
87  Zeroconf();
88  explicit Zeroconf(servus::Servus& service);
89  friend class LocalNode;
90 
91  detail::Zeroconf* _impl;
92 };
93 }
94 #endif // CO_ZEROCONF_H
Defines export visibility macros for library Collage.
Object-oriented network library.
Definition: barrier.h:27
A zeroconf communicator.
Definition: zeroconf.h:49
Node specialization for a local node.
Definition: localNode.h:49