/Src/Dependencies/Boost/boost/asio/ssl/error.hpp

http://hadesmem.googlecode.com/ · C++ Header · 72 lines · 45 code · 18 blank · 9 comment · 1 complexity · 222c6b61deb6417fc28e41e16cbf9f95 MD5 · raw file

  1. //
  2. // ssl/error.hpp
  3. // ~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef BOOST_ASIO_SSL_ERROR_HPP
  11. #define BOOST_ASIO_SSL_ERROR_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include <boost/asio/detail/config.hpp>
  16. #include <boost/system/error_code.hpp>
  17. #include <boost/asio/detail/push_options.hpp>
  18. namespace boost {
  19. namespace asio {
  20. namespace error {
  21. enum ssl_errors
  22. {
  23. };
  24. extern BOOST_ASIO_DECL
  25. const boost::system::error_category& get_ssl_category();
  26. static const boost::system::error_category& ssl_category
  27. = boost::asio::error::get_ssl_category();
  28. } // namespace error
  29. } // namespace asio
  30. } // namespace boost
  31. namespace boost {
  32. namespace system {
  33. template<> struct is_error_code_enum<boost::asio::error::ssl_errors>
  34. {
  35. static const bool value = true;
  36. };
  37. } // namespace system
  38. } // namespace boost
  39. namespace boost {
  40. namespace asio {
  41. namespace error {
  42. inline boost::system::error_code make_error_code(ssl_errors e)
  43. {
  44. return boost::system::error_code(
  45. static_cast<int>(e), get_ssl_category());
  46. }
  47. } // namespace error
  48. } // namespace asio
  49. } // namespace boost
  50. #include <boost/asio/detail/pop_options.hpp>
  51. #if defined(BOOST_ASIO_HEADER_ONLY)
  52. # include <boost/asio/ssl/impl/error.ipp>
  53. #endif // defined(BOOST_ASIO_HEADER_ONLY)
  54. #endif // BOOST_ASIO_SSL_ERROR_HPP