Realistic 3D camera system
3D camera system components
verify_callback.hpp
Go to the documentation of this file.
1 //
2 // ssl/detail/verify_callback.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 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 
11 #ifndef ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP
12 #define ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
19 
20 #if !defined(ASIO_ENABLE_OLD_SSL)
22 #endif // !defined(ASIO_ENABLE_OLD_SSL)
23 
25 
26 namespace asio {
27 namespace ssl {
28 namespace detail {
29 
30 #if !defined(ASIO_ENABLE_OLD_SSL)
31 
33 {
34 public:
36  {
37  }
38 
39  virtual bool call(bool preverified, verify_context& ctx) = 0;
40 };
41 
42 template <typename VerifyCallback>
44 {
45 public:
46  explicit verify_callback(VerifyCallback callback)
47  : callback_(callback)
48  {
49  }
50 
51  virtual bool call(bool preverified, verify_context& ctx)
52  {
53  return callback_(preverified, ctx);
54  }
55 
56 private:
57  VerifyCallback callback_;
58 };
59 
60 #endif // !defined(ASIO_ENABLE_OLD_SSL)
61 
62 } // namespace detail
63 } // namespace ssl
64 } // namespace asio
65 
67 
68 #endif // ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP
virtual bool call(bool preverified, verify_context &ctx)
verify_callback(VerifyCallback callback)
virtual bool call(bool preverified, verify_context &ctx)=0