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.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // ssl/impl/context.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
  6. // Copyright (c) 2005-2015 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::error_code context::set_verify_callback(
  30. VerifyCallback callback, asio::error_code& ec)
  31. {
  32. return do_set_verify_callback(
  33. new detail::verify_callback<VerifyCallback>(callback), ec);
  34. }
  35. template <typename PasswordCallback>
  36. void context::set_password_callback(PasswordCallback callback)
  37. {
  38. asio::error_code ec;
  39. this->set_password_callback(callback, ec);
  40. asio::detail::throw_error(ec, "set_password_callback");
  41. }
  42. template <typename PasswordCallback>
  43. asio::error_code context::set_password_callback(
  44. PasswordCallback callback, asio::error_code& ec)
  45. {
  46. return do_set_password_callback(
  47. new detail::password_callback<PasswordCallback>(callback), ec);
  48. }
  49. } // namespace ssl
  50. } // namespace asio
  51. #include "asio/detail/pop_options.hpp"
  52. #endif // ASIO_SSL_IMPL_CONTEXT_HPP