Chris@16: // Chris@16: // ssl/error.hpp Chris@16: // ~~~~~~~~~~~~~ Chris@16: // Chris@101: // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: Chris@16: #ifndef BOOST_ASIO_SSL_ERROR_HPP Chris@16: #define BOOST_ASIO_SSL_ERROR_HPP Chris@16: Chris@16: #if defined(_MSC_VER) && (_MSC_VER >= 1200) Chris@16: # pragma once Chris@16: #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { Chris@16: namespace asio { Chris@16: namespace error { Chris@16: Chris@16: enum ssl_errors Chris@16: { Chris@16: }; Chris@16: Chris@16: extern BOOST_ASIO_DECL Chris@16: const boost::system::error_category& get_ssl_category(); Chris@16: Chris@16: static const boost::system::error_category& ssl_category Chris@16: = boost::asio::error::get_ssl_category(); Chris@16: Chris@16: } // namespace error Chris@16: } // namespace asio Chris@16: } // namespace boost Chris@16: Chris@16: namespace boost { Chris@16: namespace system { Chris@16: Chris@16: template<> struct is_error_code_enum Chris@16: { Chris@16: static const bool value = true; Chris@16: }; Chris@16: Chris@16: } // namespace system Chris@16: } // namespace boost Chris@16: Chris@16: namespace boost { Chris@16: namespace asio { Chris@16: namespace error { Chris@16: Chris@16: inline boost::system::error_code make_error_code(ssl_errors e) Chris@16: { Chris@16: return boost::system::error_code( Chris@16: static_cast(e), get_ssl_category()); Chris@16: } Chris@16: Chris@16: } // namespace error Chris@16: } // namespace asio Chris@16: } // namespace boost Chris@16: Chris@16: #include Chris@16: Chris@16: #if defined(BOOST_ASIO_HEADER_ONLY) Chris@16: # include Chris@16: #endif // defined(BOOST_ASIO_HEADER_ONLY) Chris@16: Chris@16: #endif // BOOST_ASIO_SSL_ERROR_HPP