Realistic 3D camera system
3D camera system components
context.hpp
Go to the documentation of this file.
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 
12 #ifndef ASIO_SSL_IMPL_CONTEXT_HPP
13 #define ASIO_SSL_IMPL_CONTEXT_HPP
14 
15 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 # pragma once
17 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 
19 #include "asio/detail/config.hpp"
20 
21 #if !defined(ASIO_ENABLE_OLD_SSL)
23 #endif // !defined(ASIO_ENABLE_OLD_SSL)
24 
26 
27 namespace asio {
28 namespace ssl {
29 
30 #if !defined(ASIO_ENABLE_OLD_SSL)
31 
32 template <typename VerifyCallback>
33 void context::set_verify_callback(VerifyCallback callback)
34 {
36  this->set_verify_callback(callback, ec);
37  asio::detail::throw_error(ec, "set_verify_callback");
38 }
39 
40 template <typename VerifyCallback>
42  VerifyCallback callback, asio::error_code& ec)
43 {
44  return do_set_verify_callback(
45  new detail::verify_callback<VerifyCallback>(callback), ec);
46 }
47 
48 template <typename PasswordCallback>
49 void context::set_password_callback(PasswordCallback callback)
50 {
52  this->set_password_callback(callback, ec);
53  asio::detail::throw_error(ec, "set_password_callback");
54 }
55 
56 template <typename PasswordCallback>
58  PasswordCallback callback, asio::error_code& ec)
59 {
60  return do_set_password_callback(
62 }
63 
64 #endif // !defined(ASIO_ENABLE_OLD_SSL)
65 
66 } // namespace ssl
67 } // namespace asio
68 
70 
71 #endif // ASIO_SSL_IMPL_CONTEXT_HPP
void set_password_callback(PasswordCallback callback)
Set the password callback.
Definition: context.hpp:49
void throw_error(const asio::error_code &err)
Definition: throw_error.hpp:31
void set_verify_callback(VerifyCallback callback)
Set the callback used to verify peer certificates.
Definition: context.hpp:33
Class to represent an error code value.
Definition: error_code.hpp:80