Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

context.hpp 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // ssl/impl/context.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
  6. // Copyright (c) 2005-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  7. //
  8. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  9. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  10. //
  11. #ifndef ASIO_SSL_IMPL_CONTEXT_HPP
  12. #define ASIO_SSL_IMPL_CONTEXT_HPP
  13. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  14. # pragma once
  15. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  16. #include "asio/detail/config.hpp"
  17. #include "asio/detail/throw_error.hpp"
  18. #include "asio/detail/push_options.hpp"
  19. namespace asio {
  20. namespace ssl {
  21. template <typename VerifyCallback>
  22. void context::set_verify_callback(VerifyCallback callback)
  23. {
  24. asio::error_code ec;
  25. this->set_verify_callback(callback, ec);
  26. asio::detail::throw_error(ec, "set_verify_callback");
  27. }
  28. template <typename VerifyCallback>
  29. ASIO_SYNC_OP_VOID context::set_verify_callback(
  30. VerifyCallback callback, asio::error_code& ec)
  31. {
  32. do_set_verify_callback(
  33. new detail::verify_callback<VerifyCallback>(callback), ec);
  34. ASIO_SYNC_OP_VOID_RETURN(ec);
  35. }
  36. template <typename PasswordCallback>
  37. void context::set_password_callback(PasswordCallback callback)
  38. {
  39. asio::error_code ec;
  40. this->set_password_callback(callback, ec);
  41. asio::detail::throw_error(ec, "set_password_callback");
  42. }
  43. template <typename PasswordCallback>
  44. ASIO_SYNC_OP_VOID context::set_password_callback(
  45. PasswordCallback callback, asio::error_code& ec)
  46. {
  47. do_set_password_callback(
  48. new detail::password_callback<PasswordCallback>(callback), ec);
  49. ASIO_SYNC_OP_VOID_RETURN(ec);
  50. }
  51. } // namespace ssl
  52. } // namespace asio
  53. #include "asio/detail/pop_options.hpp"
  54. #endif // ASIO_SSL_IMPL_CONTEXT_HPP