irccd  3.0.3
transport_util.hpp
1 /*
2  * transport_util.hpp -- transport utilities
3  *
4  * Copyright (c) 2013-2019 David Demelier <markand@malikania.fr>
5  *
6  * Permission to use, copy, modify, and/or distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
24 #ifndef IRCCD_DAEMON_TRANSPORT_UTIL_HPP
25 #define IRCCD_DAEMON_TRANSPORT_UTIL_HPP
26 
27 /*
28  * \file transport_util.hpp
29  * \brief Transport utilities.
30  */
31 
32 #include <irccd/sysconfig.hpp>
33 
34 #include <memory>
35 
36 #include <boost/asio/io_service.hpp>
37 
38 namespace irccd {
39 
40 namespace ini {
41 
42 class section;
43 
44 } // !ini
45 
46 namespace daemon {
47 
48 class transport_server;
49 
50 /*
51  * \brief Transport utilities.
52  */
53 namespace transport_util {
54 
63 auto from_config(boost::asio::io_context& service,
64  const ini::section& sc) -> std::unique_ptr<transport_server>;
65 
66 } // !transport_util
67 
68 } // !daemon
69 
70 } // !irccd
71 
72 #endif // !IRCCD_DAEMON_TRANSPORT_UTIL_HPP
irccd::ini::section
Section that contains one or more options.
Definition: ini.hpp:295
irccd
Parent namespace.
Definition: acceptor.hpp:43
irccd::daemon::transport_util::from_config
auto from_config(boost::asio::io_context &service, const ini::section &sc) -> std::unique_ptr< transport_server >