1 // Copyright (c) 2016 Klemens D. Morgenstern
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_PROCESS_DETAIL_HANDLER_HPP_
8 #define BOOST_PROCESS_DETAIL_HANDLER_HPP_
10 #include <boost/process/detail/config.hpp>
12 #if defined(BOOST_POSIX_API)
13 #include <boost/process/detail/posix/handler.hpp>
14 #elif defined(BOOST_WINDOWS_API)
15 #include <boost/process/detail/windows/handler.hpp>
19 namespace boost { namespace process { namespace detail {
21 //extended handler base.
22 typedef api::handler_base_ext handler;
25 template <class Handler>
26 struct on_setup_ : handler
28 explicit on_setup_(Handler handler) : handler_(handler) {}
30 template <class Executor>
31 void on_setup(Executor &e)
39 template <class Handler>
40 struct on_error_ : handler
42 explicit on_error_(Handler handler) : handler_(handler) {}
44 template <class Executor>
45 void on_error(Executor &e, const std::error_code &ec)
53 template <class Handler>
54 struct on_success_ : handler
56 explicit on_success_(Handler handler) : handler_(handler) {}
58 template <class Executor>
59 void on_success(Executor &e)
75 #endif /* BOOST_PROCESS_DETAIL_HANDLER_HPP_ */