Servus  1.5.1
C++ network oriented utilities including a zeroconf implementation
listener.h
1 /* Copyright (c) 2015, Human Brain Project
2  * Daniel.Nachbaur@epfl.ch
3  *
4  * This file is part of Servus <https://github.com/HBPVIS/Servus>
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 3.0 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 SERVUS_LISTENER_H
21 #define SERVUS_LISTENER_H
22 
23 namespace servus
24 {
31 class Listener
32 {
33 public:
34  virtual ~Listener() {}
41  virtual void instanceAdded(const std::string& instance) = 0;
42 
50  virtual void instanceRemoved(const std::string& instance) = 0;
51 };
52 }
53 
54 #endif // SERVUS_LISTENER_H
virtual void instanceRemoved(const std::string &instance)=0
Called after an instance was removed from the list of discovered instances.
virtual void instanceAdded(const std::string &instance)=0
Called after a new instance was added after being discovered.
A listener interface which can be implemented to listen on changes of a Servus instance.
Definition: listener.h:31