Kea  1.9.9-git
io_service_signal.h
Go to the documentation of this file.
1 // Copyright (C) 2020-2021 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #ifndef IO_SERVICE_SIGNAL_H
8 #define IO_SERVICE_SIGNAL_H
9 
10 #include <asiolink/io_service.h>
11 
12 #include <boost/shared_ptr.hpp>
13 
14 namespace isc {
15 namespace asiolink {
16 
18 typedef std::function<void(int signum)> IOSignalHandler;
19 
20 class IOSignalSetImpl;
21 
26 class IOSignalSet {
27 public:
32  IOSignalSet(asiolink::IOServicePtr io_service, IOSignalHandler handler);
33 
35  ~IOSignalSet() = default;
36 
41  void add(int signum);
42 
47  void remove(int signum);
48 
49 private:
51  boost::shared_ptr<IOSignalSetImpl> impl_;
52 };
53 
55 typedef boost::shared_ptr<IOSignalSet> IOSignalSetPtr;
56 
57 } // namespace asiolink
58 } // namespace isc
59 
60 #endif // IO_SERVICE_SIGNAL_H
Defines the logger used by the top-level component of kea-dhcp-ddns.