Servus  1.3.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 {
25 
32 class Listener
33 {
34 public:
35  virtual ~Listener() {}
36 
43  virtual void instanceAdded( const std::string& instance ) = 0;
44 
52  virtual void instanceRemoved( const std::string& instance ) = 0;
53 };
54 
55 }
56 
57 #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:32