├── .gitignore ├── AUTHORS ├── CONTRIBUTING ├── COPYING ├── Makefile.am ├── README ├── WINDOWS └── vc2hqdecoder │ ├── vc2decode │ ├── ReadMe.txt │ ├── stdafx.cpp │ ├── stdafx.h │ ├── targetver.h │ ├── vc2decode.vcxproj │ └── vc2decode.vcxproj.filters │ ├── vc2decodertest │ ├── ReadMe.txt │ ├── stdafx.cpp │ ├── stdafx.h │ ├── targetver.h │ ├── vc2decodertest.vcxproj │ └── vc2decodertest.vcxproj.filters │ ├── vc2hqdecoder.sln │ ├── vc2hqdecoder │ ├── ReadMe.txt │ ├── dllmain.cpp │ ├── stdafx.cpp │ ├── stdafx.h │ ├── targetver.h │ ├── vc2hqdecoder.vcxproj │ └── vc2hqdecoder.vcxproj.filters │ ├── vc2inversetransform_c │ ├── ReadMe.txt │ ├── vc2inversetransform_c.vcxproj │ └── vc2inversetransform_c.vcxproj.filters │ └── vc2inversetransform_sse4_2 │ ├── ReadMe.txt │ ├── vc2inversetransform_sse4_2.vcxproj │ └── vc2inversetransform_sse4_2.vcxproj.filters ├── autogen.sh ├── common └── attributes.h ├── configure.ac ├── doxygen.am ├── doxygen.cfg ├── m4 ├── ac_append_supported_cflags.m4 ├── ac_append_supported_ldflags.m4 ├── ac_cxx_have_sstream.m4 ├── ac_cxx_have_strstream.m4 ├── ac_cxx_namespaces.m4 ├── as-nano.m4 ├── ax_boost_base.m4 ├── ax_boost_program_options.m4 ├── ax_boost_system.m4 ├── ax_boost_thread.m4 ├── ax_create_stdint_h.m4 ├── ax_cxx_compile_stdcxx_11.m4 ├── ax_prog_doxygen.m4 └── ax_pthread.m4 ├── redist ├── COPYING ├── LICENSE_1_0.txt ├── Makefile.am ├── asio.hpp ├── asio │ ├── associated_allocator.hpp │ ├── associated_executor.hpp │ ├── async_result.hpp │ ├── basic_datagram_socket.hpp │ ├── basic_deadline_timer.hpp │ ├── basic_io_object.hpp │ ├── basic_raw_socket.hpp │ ├── basic_seq_packet_socket.hpp │ ├── basic_serial_port.hpp │ ├── basic_signal_set.hpp │ ├── basic_socket.hpp │ ├── basic_socket_acceptor.hpp │ ├── basic_socket_iostream.hpp │ ├── basic_socket_streambuf.hpp │ ├── basic_stream_socket.hpp │ ├── basic_streambuf.hpp │ ├── basic_streambuf_fwd.hpp │ ├── basic_waitable_timer.hpp │ ├── bind_executor.hpp │ ├── buffer.hpp │ ├── buffered_read_stream.hpp │ ├── buffered_read_stream_fwd.hpp │ ├── buffered_stream.hpp │ ├── buffered_stream_fwd.hpp │ ├── buffered_write_stream.hpp │ ├── buffered_write_stream_fwd.hpp │ ├── buffers_iterator.hpp │ ├── completion_condition.hpp │ ├── connect.hpp │ ├── coroutine.hpp │ ├── datagram_socket_service.hpp │ ├── deadline_timer.hpp │ ├── deadline_timer_service.hpp │ ├── defer.hpp │ ├── detail │ │ ├── array.hpp │ │ ├── array_fwd.hpp │ │ ├── assert.hpp │ │ ├── atomic_count.hpp │ │ ├── base_from_completion_cond.hpp │ │ ├── bind_handler.hpp │ │ ├── buffer_resize_guard.hpp │ │ ├── buffer_sequence_adapter.hpp │ │ ├── buffered_stream_storage.hpp │ │ ├── call_stack.hpp │ │ ├── chrono_time_traits.hpp │ │ ├── completion_handler.hpp │ │ ├── config.hpp │ │ ├── consuming_buffers.hpp │ │ ├── cstddef.hpp │ │ ├── cstdint.hpp │ │ ├── date_time_fwd.hpp │ │ ├── deadline_timer_service.hpp │ │ ├── dependent_type.hpp │ │ ├── descriptor_ops.hpp │ │ ├── descriptor_read_op.hpp │ │ ├── descriptor_write_op.hpp │ │ ├── dev_poll_reactor.hpp │ │ ├── epoll_reactor.hpp │ │ ├── event.hpp │ │ ├── eventfd_select_interrupter.hpp │ │ ├── executor_op.hpp │ │ ├── fd_set_adapter.hpp │ │ ├── fenced_block.hpp │ │ ├── functional.hpp │ │ ├── gcc_arm_fenced_block.hpp │ │ ├── gcc_hppa_fenced_block.hpp │ │ ├── gcc_sync_fenced_block.hpp │ │ ├── gcc_x86_fenced_block.hpp │ │ ├── global.hpp │ │ ├── handler_alloc_helpers.hpp │ │ ├── handler_cont_helpers.hpp │ │ ├── handler_invoke_helpers.hpp │ │ ├── handler_tracking.hpp │ │ ├── handler_type_requirements.hpp │ │ ├── handler_work.hpp │ │ ├── hash_map.hpp │ │ ├── impl │ │ │ ├── buffer_sequence_adapter.ipp │ │ │ ├── descriptor_ops.ipp │ │ │ ├── dev_poll_reactor.hpp │ │ │ ├── dev_poll_reactor.ipp │ │ │ ├── epoll_reactor.hpp │ │ │ ├── epoll_reactor.ipp │ │ │ ├── eventfd_select_interrupter.ipp │ │ │ ├── handler_tracking.ipp │ │ │ ├── kqueue_reactor.hpp │ │ │ ├── kqueue_reactor.ipp │ │ │ ├── pipe_select_interrupter.ipp │ │ │ ├── posix_event.ipp │ │ │ ├── posix_mutex.ipp │ │ │ ├── posix_thread.ipp │ │ │ ├── posix_tss_ptr.ipp │ │ │ ├── reactive_descriptor_service.ipp │ │ │ ├── reactive_serial_port_service.ipp │ │ │ ├── reactive_socket_service_base.ipp │ │ │ ├── resolver_service_base.ipp │ │ │ ├── scheduler.ipp │ │ │ ├── select_reactor.hpp │ │ │ ├── select_reactor.ipp │ │ │ ├── service_registry.hpp │ │ │ ├── service_registry.ipp │ │ │ ├── signal_set_service.ipp │ │ │ ├── socket_ops.ipp │ │ │ ├── socket_select_interrupter.ipp │ │ │ ├── strand_executor_service.hpp │ │ │ ├── strand_executor_service.ipp │ │ │ ├── strand_service.hpp │ │ │ ├── strand_service.ipp │ │ │ ├── throw_error.ipp │ │ │ ├── timer_queue_ptime.ipp │ │ │ ├── timer_queue_set.ipp │ │ │ ├── win_event.ipp │ │ │ ├── win_iocp_handle_service.ipp │ │ │ ├── win_iocp_io_context.hpp │ │ │ ├── win_iocp_io_context.ipp │ │ │ ├── win_iocp_serial_port_service.ipp │ │ │ ├── win_iocp_socket_service_base.ipp │ │ │ ├── win_mutex.ipp │ │ │ ├── win_object_handle_service.ipp │ │ │ ├── win_static_mutex.ipp │ │ │ ├── win_thread.ipp │ │ │ ├── win_tss_ptr.ipp │ │ │ ├── winrt_ssocket_service_base.ipp │ │ │ ├── winrt_timer_scheduler.hpp │ │ │ ├── winrt_timer_scheduler.ipp │ │ │ └── winsock_init.ipp │ │ ├── io_control.hpp │ │ ├── is_buffer_sequence.hpp │ │ ├── keyword_tss_ptr.hpp │ │ ├── kqueue_reactor.hpp │ │ ├── limits.hpp │ │ ├── local_free_on_block_exit.hpp │ │ ├── macos_fenced_block.hpp │ │ ├── memory.hpp │ │ ├── mutex.hpp │ │ ├── noncopyable.hpp │ │ ├── null_event.hpp │ │ ├── null_fenced_block.hpp │ │ ├── null_global.hpp │ │ ├── null_mutex.hpp │ │ ├── null_reactor.hpp │ │ ├── null_signal_blocker.hpp │ │ ├── null_socket_service.hpp │ │ ├── null_static_mutex.hpp │ │ ├── null_thread.hpp │ │ ├── null_tss_ptr.hpp │ │ ├── object_pool.hpp │ │ ├── old_win_sdk_compat.hpp │ │ ├── op_queue.hpp │ │ ├── operation.hpp │ │ ├── pipe_select_interrupter.hpp │ │ ├── pop_options.hpp │ │ ├── posix_event.hpp │ │ ├── posix_fd_set_adapter.hpp │ │ ├── posix_global.hpp │ │ ├── posix_mutex.hpp │ │ ├── posix_signal_blocker.hpp │ │ ├── posix_static_mutex.hpp │ │ ├── posix_thread.hpp │ │ ├── posix_tss_ptr.hpp │ │ ├── push_options.hpp │ │ ├── reactive_descriptor_service.hpp │ │ ├── reactive_null_buffers_op.hpp │ │ ├── reactive_serial_port_service.hpp │ │ ├── reactive_socket_accept_op.hpp │ │ ├── reactive_socket_connect_op.hpp │ │ ├── reactive_socket_recv_op.hpp │ │ ├── reactive_socket_recvfrom_op.hpp │ │ ├── reactive_socket_recvmsg_op.hpp │ │ ├── reactive_socket_send_op.hpp │ │ ├── reactive_socket_sendto_op.hpp │ │ ├── reactive_socket_service.hpp │ │ ├── reactive_socket_service_base.hpp │ │ ├── reactive_wait_op.hpp │ │ ├── reactor.hpp │ │ ├── reactor_fwd.hpp │ │ ├── reactor_op.hpp │ │ ├── reactor_op_queue.hpp │ │ ├── recycling_allocator.hpp │ │ ├── regex_fwd.hpp │ │ ├── resolve_endpoint_op.hpp │ │ ├── resolve_op.hpp │ │ ├── resolver_service.hpp │ │ ├── resolver_service_base.hpp │ │ ├── scheduler.hpp │ │ ├── scheduler_operation.hpp │ │ ├── scheduler_thread_info.hpp │ │ ├── scoped_lock.hpp │ │ ├── scoped_ptr.hpp │ │ ├── select_interrupter.hpp │ │ ├── select_reactor.hpp │ │ ├── service_registry.hpp │ │ ├── signal_blocker.hpp │ │ ├── signal_handler.hpp │ │ ├── signal_init.hpp │ │ ├── signal_op.hpp │ │ ├── signal_set_service.hpp │ │ ├── socket_holder.hpp │ │ ├── socket_ops.hpp │ │ ├── socket_option.hpp │ │ ├── socket_select_interrupter.hpp │ │ ├── socket_types.hpp │ │ ├── solaris_fenced_block.hpp │ │ ├── static_mutex.hpp │ │ ├── std_event.hpp │ │ ├── std_global.hpp │ │ ├── std_mutex.hpp │ │ ├── std_static_mutex.hpp │ │ ├── std_thread.hpp │ │ ├── strand_executor_service.hpp │ │ ├── strand_service.hpp │ │ ├── thread.hpp │ │ ├── thread_context.hpp │ │ ├── thread_group.hpp │ │ ├── thread_info_base.hpp │ │ ├── throw_error.hpp │ │ ├── throw_exception.hpp │ │ ├── timer_queue.hpp │ │ ├── timer_queue_base.hpp │ │ ├── timer_queue_ptime.hpp │ │ ├── timer_queue_set.hpp │ │ ├── timer_scheduler.hpp │ │ ├── timer_scheduler_fwd.hpp │ │ ├── tss_ptr.hpp │ │ ├── type_traits.hpp │ │ ├── variadic_templates.hpp │ │ ├── wait_handler.hpp │ │ ├── wait_op.hpp │ │ ├── win_event.hpp │ │ ├── win_fd_set_adapter.hpp │ │ ├── win_fenced_block.hpp │ │ ├── win_global.hpp │ │ ├── win_iocp_handle_read_op.hpp │ │ ├── win_iocp_handle_service.hpp │ │ ├── win_iocp_handle_write_op.hpp │ │ ├── win_iocp_io_context.hpp │ │ ├── win_iocp_null_buffers_op.hpp │ │ ├── win_iocp_operation.hpp │ │ ├── win_iocp_overlapped_op.hpp │ │ ├── win_iocp_overlapped_ptr.hpp │ │ ├── win_iocp_serial_port_service.hpp │ │ ├── win_iocp_socket_accept_op.hpp │ │ ├── win_iocp_socket_connect_op.hpp │ │ ├── win_iocp_socket_recv_op.hpp │ │ ├── win_iocp_socket_recvfrom_op.hpp │ │ ├── win_iocp_socket_recvmsg_op.hpp │ │ ├── win_iocp_socket_send_op.hpp │ │ ├── win_iocp_socket_service.hpp │ │ ├── win_iocp_socket_service_base.hpp │ │ ├── win_iocp_thread_info.hpp │ │ ├── win_iocp_wait_op.hpp │ │ ├── win_mutex.hpp │ │ ├── win_object_handle_service.hpp │ │ ├── win_static_mutex.hpp │ │ ├── win_thread.hpp │ │ ├── win_tss_ptr.hpp │ │ ├── winapp_thread.hpp │ │ ├── wince_thread.hpp │ │ ├── winrt_async_manager.hpp │ │ ├── winrt_async_op.hpp │ │ ├── winrt_resolve_op.hpp │ │ ├── winrt_resolver_service.hpp │ │ ├── winrt_socket_connect_op.hpp │ │ ├── winrt_socket_recv_op.hpp │ │ ├── winrt_socket_send_op.hpp │ │ ├── winrt_ssocket_service.hpp │ │ ├── winrt_ssocket_service_base.hpp │ │ ├── winrt_timer_scheduler.hpp │ │ ├── winrt_utils.hpp │ │ ├── winsock_init.hpp │ │ ├── work_dispatcher.hpp │ │ └── wrapped_handler.hpp │ ├── dispatch.hpp │ ├── error.hpp │ ├── error_code.hpp │ ├── execution_context.hpp │ ├── executor.hpp │ ├── executor_work_guard.hpp │ ├── generic │ │ ├── basic_endpoint.hpp │ │ ├── datagram_protocol.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ └── impl │ │ │ │ └── endpoint.ipp │ │ ├── raw_protocol.hpp │ │ ├── seq_packet_protocol.hpp │ │ └── stream_protocol.hpp │ ├── handler_alloc_hook.hpp │ ├── handler_continuation_hook.hpp │ ├── handler_invoke_hook.hpp │ ├── handler_type.hpp │ ├── high_resolution_timer.hpp │ ├── impl │ │ ├── buffered_read_stream.hpp │ │ ├── buffered_write_stream.hpp │ │ ├── connect.hpp │ │ ├── defer.hpp │ │ ├── dispatch.hpp │ │ ├── error.ipp │ │ ├── error_code.ipp │ │ ├── execution_context.hpp │ │ ├── execution_context.ipp │ │ ├── executor.hpp │ │ ├── executor.ipp │ │ ├── handler_alloc_hook.ipp │ │ ├── io_context.hpp │ │ ├── io_context.ipp │ │ ├── post.hpp │ │ ├── read.hpp │ │ ├── read_at.hpp │ │ ├── read_until.hpp │ │ ├── serial_port_base.hpp │ │ ├── serial_port_base.ipp │ │ ├── spawn.hpp │ │ ├── src.cpp │ │ ├── src.hpp │ │ ├── system_executor.hpp │ │ ├── system_executor.ipp │ │ ├── thread_pool.hpp │ │ ├── thread_pool.ipp │ │ ├── use_future.hpp │ │ ├── write.hpp │ │ └── write_at.hpp │ ├── io_context.hpp │ ├── io_context_strand.hpp │ ├── io_service.hpp │ ├── io_service_strand.hpp │ ├── ip │ │ ├── address.hpp │ │ ├── address_v4.hpp │ │ ├── address_v4_iterator.hpp │ │ ├── address_v4_range.hpp │ │ ├── address_v6.hpp │ │ ├── address_v6_iterator.hpp │ │ ├── address_v6_range.hpp │ │ ├── bad_address_cast.hpp │ │ ├── basic_endpoint.hpp │ │ ├── basic_resolver.hpp │ │ ├── basic_resolver_entry.hpp │ │ ├── basic_resolver_iterator.hpp │ │ ├── basic_resolver_query.hpp │ │ ├── basic_resolver_results.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ ├── impl │ │ │ │ └── endpoint.ipp │ │ │ └── socket_option.hpp │ │ ├── host_name.hpp │ │ ├── icmp.hpp │ │ ├── impl │ │ │ ├── address.hpp │ │ │ ├── address.ipp │ │ │ ├── address_v4.hpp │ │ │ ├── address_v4.ipp │ │ │ ├── address_v6.hpp │ │ │ ├── address_v6.ipp │ │ │ ├── basic_endpoint.hpp │ │ │ ├── host_name.ipp │ │ │ ├── network_v4.hpp │ │ │ ├── network_v4.ipp │ │ │ ├── network_v6.hpp │ │ │ └── network_v6.ipp │ │ ├── multicast.hpp │ │ ├── network_v4.hpp │ │ ├── network_v6.hpp │ │ ├── resolver_base.hpp │ │ ├── resolver_query_base.hpp │ │ ├── resolver_service.hpp │ │ ├── tcp.hpp │ │ ├── udp.hpp │ │ ├── unicast.hpp │ │ └── v6_only.hpp │ ├── is_executor.hpp │ ├── is_read_buffered.hpp │ ├── is_write_buffered.hpp │ ├── local │ │ ├── basic_endpoint.hpp │ │ ├── connect_pair.hpp │ │ ├── datagram_protocol.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ └── impl │ │ │ │ └── endpoint.ipp │ │ └── stream_protocol.hpp │ ├── package.hpp │ ├── placeholders.hpp │ ├── posix │ │ ├── basic_descriptor.hpp │ │ ├── basic_stream_descriptor.hpp │ │ ├── descriptor_base.hpp │ │ ├── stream_descriptor.hpp │ │ └── stream_descriptor_service.hpp │ ├── post.hpp │ ├── raw_socket_service.hpp │ ├── read.hpp │ ├── read_at.hpp │ ├── read_until.hpp │ ├── seq_packet_socket_service.hpp │ ├── serial_port.hpp │ ├── serial_port_base.hpp │ ├── serial_port_service.hpp │ ├── signal_set.hpp │ ├── signal_set_service.hpp │ ├── socket_acceptor_service.hpp │ ├── socket_base.hpp │ ├── spawn.hpp │ ├── ssl.hpp │ ├── ssl │ │ ├── context.hpp │ │ ├── context_base.hpp │ │ ├── detail │ │ │ ├── buffered_handshake_op.hpp │ │ │ ├── engine.hpp │ │ │ ├── handshake_op.hpp │ │ │ ├── impl │ │ │ │ ├── engine.ipp │ │ │ │ └── openssl_init.ipp │ │ │ ├── io.hpp │ │ │ ├── openssl_init.hpp │ │ │ ├── openssl_types.hpp │ │ │ ├── password_callback.hpp │ │ │ ├── read_op.hpp │ │ │ ├── shutdown_op.hpp │ │ │ ├── stream_core.hpp │ │ │ ├── verify_callback.hpp │ │ │ └── write_op.hpp │ │ ├── error.hpp │ │ ├── impl │ │ │ ├── context.hpp │ │ │ ├── context.ipp │ │ │ ├── error.ipp │ │ │ ├── rfc2818_verification.ipp │ │ │ └── src.hpp │ │ ├── rfc2818_verification.hpp │ │ ├── stream.hpp │ │ ├── stream_base.hpp │ │ ├── verify_context.hpp │ │ └── verify_mode.hpp │ ├── steady_timer.hpp │ ├── strand.hpp │ ├── stream_socket_service.hpp │ ├── streambuf.hpp │ ├── system_error.hpp │ ├── system_executor.hpp │ ├── system_timer.hpp │ ├── thread.hpp │ ├── thread_pool.hpp │ ├── time_traits.hpp │ ├── ts │ │ ├── buffer.hpp │ │ ├── executor.hpp │ │ ├── internet.hpp │ │ ├── io_context.hpp │ │ ├── networking.hpp │ │ ├── socket.hpp │ │ ├── thread_pool.hpp │ │ └── timer.hpp │ ├── unyield.hpp │ ├── use_future.hpp │ ├── uses_executor.hpp │ ├── version.hpp │ ├── wait_traits.hpp │ ├── waitable_timer_service.hpp │ ├── windows │ │ ├── basic_handle.hpp │ │ ├── basic_object_handle.hpp │ │ ├── basic_random_access_handle.hpp │ │ ├── basic_stream_handle.hpp │ │ ├── object_handle.hpp │ │ ├── object_handle_service.hpp │ │ ├── overlapped_ptr.hpp │ │ ├── random_access_handle.hpp │ │ ├── random_access_handle_service.hpp │ │ ├── stream_handle.hpp │ │ └── stream_handle_service.hpp │ ├── write.hpp │ ├── write_at.hpp │ └── yield.hpp └── threadbarrier.hpp ├── testprogs ├── COPYING ├── Makefile.am ├── tclap │ ├── Arg.h │ ├── ArgException.h │ ├── ArgTraits.h │ ├── COPYING │ ├── CmdLine.h │ ├── CmdLineInterface.h │ ├── CmdLineOutput.h │ ├── Constraint.h │ ├── DocBookOutput.h │ ├── HelpVisitor.h │ ├── IgnoreRestVisitor.h │ ├── MultiArg.h │ ├── MultiSwitchArg.h │ ├── OptionalUnlabeledTracker.h │ ├── StandardTraits.h │ ├── StdOutput.h │ ├── SwitchArg.h │ ├── UnlabeledMultiArg.h │ ├── UnlabeledValueArg.h │ ├── ValueArg.h │ ├── ValuesConstraint.h │ ├── VersionVisitor.h │ ├── Visitor.h │ ├── XorHandler.h │ └── ZshCompletionOutput.h └── vc2decode.cpp ├── testsuite ├── Makefile.am ├── randomiser.cpp ├── randomiser.hpp ├── test_dequantise.cpp ├── test_invtransform.cpp ├── tests.cpp └── tests.hpp ├── tools ├── Makefile.am ├── psnr_calculator ├── vc2streamdebugger └── viddiff ├── vc2hqdecode-uninstalled.pc.in ├── vc2hqdecode.pc.in ├── vc2hqdecode ├── Makefile.am ├── ThreadPool.hpp ├── VC2Decoder.cpp ├── VC2Decoder.hpp ├── VideoFormat.hpp ├── datastructures.hpp ├── debug.hpp ├── dequantise.hpp ├── internal.h ├── invtransform.hpp ├── logger.cpp ├── logger.hpp ├── lut.hpp ├── platform_variant.hpp ├── quantmatrix.cpp ├── stream.cpp ├── stream.hpp ├── thread_group.hpp ├── vc2hqdecode.cpp ├── vc2hqdecode.h ├── vc2hqdecodestrings.h └── vlc.hpp ├── vc2inversetransform_c ├── Makefile.am ├── dequantise_c.cpp ├── dequantise_c.hpp ├── deslauriers_dubuc_13_7_invtransform.hpp ├── deslauriers_dubuc_9_7_invtransform.hpp ├── fidelity_invtransform.hpp ├── haar_invtransform.hpp ├── invtransform_c.cpp ├── invtransform_c.hpp ├── legall_invtransform.hpp ├── vlc_c.cpp └── vlc_c.hpp └── vc2inversetransform_sse4_2 ├── Makefile.am ├── dequantise_sse4_2.cpp ├── dequantise_sse4_2.hpp ├── haar_invtransform.hpp ├── invtransform_sse4_2.cpp ├── invtransform_sse4_2.hpp ├── legall_invtransform.hpp ├── vlc_sse4_2.cpp └── vlc_sse4_2.hpp /AUTHORS: -------------------------------------------------------------------------------- 1 | # Contributors to vc2hqdecode 2 | # 3 | # The format of this file was inspired by the x264 AUTHORS file which was 4 | # inspired by the Linux kernel CREDITS file. 5 | # Authors are listed alphabetically. 6 | # 7 | # The fields are: name (N), email (E), web-address (W), CVS account login (C), 8 | # PGP key ID and fingerprint (P), description (D), and snail-mail address (S). 9 | 10 | N: Luca Barbato 11 | E: lu_zero@gentoo.org 12 | D: Compatibility with more OSs 13 | D: Bugfixes 14 | 15 | N: Diego Biurrun 16 | E: diego@biurrun.de 17 | D: Bugfixes 18 | 19 | N: James P. Weaver 20 | E: james.barrett@bbc.co.uk 21 | D: Maintainer 22 | D: Overall Library Structure 23 | D: Runtime Code Selection 24 | D: Slicing 25 | D: Entropy Decoding 26 | D: Inverse Wavelet Transform 27 | D: Output 28 | D: Test Program 29 | D: Windows Port 30 | S: BBC R&D, 5th Floor, Dock House, MediaCity UK, Manchester, M50 2LH, United Kingdom 31 | -------------------------------------------------------------------------------- /CONTRIBUTING: -------------------------------------------------------------------------------- 1 | This project is hosted at https://github.com/bbc/vc2hqdecode and maintained by the BBC. 2 | 3 | Contributions may be accepted provided that they are released to the BBC under the MIT license, shown below: 4 | 5 | 6 | 7 | 8 | Copyright (c) 9 | 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AUTOMAKE_OPTIONS = foreign 3 | 4 | include doxygen.am 5 | 6 | SUBDIRS = redist vc2inversetransform_c vc2inversetransform_sse4_2 vc2hqdecode testprogs tools testsuite 7 | 8 | EXTRA_DIST = CONTRIBUTING COPYING autogen.sh 9 | 10 | pkgconfig_DATA = vc2hqdecode-$(VC2HQDECODE_MAJORMINOR).pc 11 | 12 | vc2hqdecode-$(VC2HQDECODE_MAJORMINOR).pc: vc2hqdecode.pc 13 | cp vc2hqdecode.pc vc2hqdecode-$(VC2HQDECODE_MAJORMINOR).pc 14 | 15 | vc2hqdecode-$(VC2HQDECODE_MAJORMINOR)-uninstalled.pc: vc2hqdecode-uninstalled.pc 16 | cp vc2hqdecode-uninstalled.pc vc2hqdecode-$(VC2HQDECODE_MAJORMINOR)-uninstalled.pc 17 | 18 | BUILT_SOURCES = vc2hqdecode-$(VC2HQDECODE_MAJORMINOR)-uninstalled.pc 19 | 20 | CLEANFILES = vc2hqdecode-$(VC2HQDECODE_MAJORMINOR).pc vc2hqdecode-$(VC2HQDECODE_MAJORMINOR)-uninstalled.pc 21 | 22 | ACLOCAL_FLAGS = -I m4 23 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This is the VC-2 HQ Profile decoder library. 2 | 3 | It is quite performant, and scales well across multiple threads. 4 | 5 | The library is implemented in C++ but exposes a C API for applications 6 | to link against. 7 | 8 | For GPL licensing information check the COPYING file, alternatively for 9 | a commercial license please contact < ipstudio@bbc.co.uk > 10 | 11 | POSIX Platforms 12 | =============== 13 | 14 | On POSIX platforms it can be built using the standards autotools process: 15 | 16 | ./autogen.sh 17 | ./configure 18 | make 19 | make install 20 | 21 | the library itself will be built, along with the testsuite and a command-line 22 | test decoder. 23 | 24 | To run the test suite: 25 | 26 | make check 27 | 28 | To run the commandline decoder: 29 | 30 | ./testprogs/vc2decode 31 | 32 | command line options exist, a help message can be extracted via: 33 | 34 | ./testprogs/vc2decode --help 35 | 36 | Output format is raw planar 10-bit 4:2:2 video with active bits in the least 37 | significant 10-bits of each little-endian 16-bit word (ie. FFMPEG format 38 | yuv422p10le). 39 | 40 | 41 | 42 | WINDOWS 43 | ======= 44 | 45 | The Visual Studio solution file for Visual Studio 2015 is located in 46 | 47 | WINDOWS\vc2hqdecoder\vc2hqdecoder.sln 48 | 49 | This will build the library, the test suite, and the command line decoder. 50 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2decode/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Visual Studio project to build the VC2 commandline Decoder 2 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2decode/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * stdafx.cpp : Part of the windows DLL boilerplate 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #include "stdafx.h" 27 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2decode/stdafx.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * stdafx.h : Part of the windows DLL boilerplate 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #pragma once 27 | 28 | #include "targetver.h" 29 | 30 | #include 31 | #include 32 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2decode/targetver.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * targetver.h : Part of the windows DLL boilerplate 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #pragma once 27 | 28 | // Including SDKDDKVer.h defines the highest available Windows platform. 29 | 30 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 31 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 32 | 33 | #include 34 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2decode/vc2decode.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | 29 | 30 | Source Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2decodertest/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Visual Studio project to build the test suite for the VC2 Decoder 2 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2decodertest/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * stdafx.cpp : Part of the windows DLL boilerplate 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #include "stdafx.h" 27 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2decodertest/stdafx.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * stdafx.h : Part of the windows DLL boilerplate 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #pragma once 27 | 28 | #include "targetver.h" 29 | 30 | #include 31 | #include 32 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2decodertest/targetver.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * targetver.h : Part of the windows DLL boilerplate 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #pragma once 27 | 28 | // Including SDKDDKVer.h defines the highest available Windows platform. 29 | 30 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 31 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 32 | 33 | #include 34 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2hqdecoder/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Visual Studio project to build the vc2hqdecode dynamic library 2 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2hqdecoder/dllmain.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * dllmain.cpp : Windows DLL entry point 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #include "stdafx.h" 27 | 28 | BOOL APIENTRY DllMain( HMODULE hModule, 29 | DWORD ul_reason_for_call, 30 | LPVOID lpReserved 31 | ) 32 | { 33 | switch (ul_reason_for_call) 34 | { 35 | case DLL_PROCESS_ATTACH: 36 | case DLL_THREAD_ATTACH: 37 | case DLL_THREAD_DETACH: 38 | case DLL_PROCESS_DETACH: 39 | break; 40 | } 41 | return TRUE; 42 | } 43 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2hqdecoder/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * stdafx.cpp : Part of the windows DLL boilerplate 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #include "stdafx.h" 27 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2hqdecoder/stdafx.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * stdafx.h : part of the Windows DLL boilerplate 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #pragma once 27 | 28 | #include "targetver.h" 29 | 30 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 31 | // Windows Header Files: 32 | #include 33 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2hqdecoder/targetver.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * targetver.h : Part of the Windows DLL boilerplate 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #pragma once 27 | 28 | // Including SDKDDKVer.h defines the highest available Windows platform. 29 | 30 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 31 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 32 | 33 | #include 34 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2inversetransform_c/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Visual Studio Project for building vc2inversetransform_c static library. 2 | -------------------------------------------------------------------------------- /WINDOWS/vc2hqdecoder/vc2inversetransform_sse4_2/ReadMe.txt: -------------------------------------------------------------------------------- 1 | Visual Studio Project for building vc2inversetransform_sse4_2 static library. 2 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | autoreconf -f -i 3 | -------------------------------------------------------------------------------- /common/attributes.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * attributes.h : compiler specific attributes 3 | ***************************************************************************** 4 | * Copyright (C) 2016 Luca Barbato 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), 8 | * to deal in the Software without restriction, including without limitation 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | * and/or sell copies of the Software, and to permit persons to whom 11 | * the Software is furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included 14 | * in all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 22 | * IN THE SOFTWARE. 23 | *****************************************************************************/ 24 | 25 | #ifndef __ATTRIBUTES_H__ 26 | #define __ATTRIBUTES_H__ 27 | 28 | #ifdef __GNUC__ 29 | #define VC2EXPORT __attribute__((visibility("default"))) 30 | #elif _MSC_VER 31 | #define VC2EXPORT __declspec(dllexport) 32 | #else 33 | #define VC2EXPORT 34 | #endif 35 | 36 | #endif /* __ATTRIBUTES_H__ */ 37 | -------------------------------------------------------------------------------- /m4/ac_append_supported_cflags.m4: -------------------------------------------------------------------------------- 1 | dnl AC_APPEND_SUPPORTED_CFLAGS(CFLAGS_VARIABLE, [flags to check]) 2 | dnl Example: AC_APPEND_SUPPORTED_CFLAGS(JSONSPIRIT_CFLAGS, [-Wall -Wextra]) 3 | dnl If flags are supported, they are appended to the variable passed as the first argument 4 | 5 | AC_DEFUN([AC_APPEND_SUPPORTED_CFLAGS], [ 6 | AC_MSG_CHECKING([whether $CC supports $2]) 7 | orig_cflags="$CFLAGS" 8 | CFLAGS="-Werror $2" 9 | AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10 | [support_c_flag=yes], 11 | [support_c_flag=no]) 12 | if test "x$support_c_flag" = "xyes"; then 13 | AC_MSG_RESULT(yes) 14 | $1="$$1 $2" 15 | else 16 | AC_MSG_RESULT(no) 17 | fi 18 | CFLAGS="$orig_cflags" 19 | ]) 20 | -------------------------------------------------------------------------------- /m4/ac_append_supported_ldflags.m4: -------------------------------------------------------------------------------- 1 | dnl AC_APPEND_SUPPORTED_LDFLAGS(LDFLAGS_VARIABLE, [flags to check]) 2 | dnl Example: AC_APPEND_SUPPORTED_LDFLAGS(JSONSPIRIT_LDFLAGS, [-Wl,--no-undefined]) 3 | dnl If flags are supported, they are appended to the variable passed as the first argument 4 | 5 | AC_DEFUN([AC_APPEND_SUPPORTED_LDFLAGS], [ 6 | AC_MSG_CHECKING([whether $CC supports $2]) 7 | orig_ldflags="$LDFLAGS" 8 | LDFLAGS="$2" 9 | AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10 | [support_ld_flag=yes], 11 | [support_ld_flag=no]) 12 | if test "x$support_ld_flag" = "xyes"; then 13 | AC_MSG_RESULT(yes) 14 | $1="$$1 $2" 15 | else 16 | AC_MSG_RESULT(no) 17 | fi 18 | LDFLAGS="$orig_ldflags" 19 | ]) 20 | -------------------------------------------------------------------------------- /m4/ac_cxx_have_sstream.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_HAVE_SSTREAM 2 | dnl 3 | dnl If the C++ library has a working stringstream, define HAVE_SSTREAM. 4 | dnl 5 | dnl @author Ben Stanley 6 | dnl @version $Id: ac_cxx_have_sstream.m4,v 1.2 2006/02/22 02:10:28 zeekec Exp $ 7 | dnl 8 | AC_DEFUN([AC_CXX_HAVE_SSTREAM], 9 | [AC_REQUIRE([AC_CXX_NAMESPACES]) 10 | AC_LANG_SAVE 11 | AC_LANG_CPLUSPLUS 12 | AC_CHECK_HEADERS(sstream) 13 | AC_CACHE_CHECK([whether the STL defines stringstream], 14 | [ac_cv_cxx_have_sstream], 15 | [AC_TRY_COMPILE([#include 16 | #ifdef HAVE_NAMESPACES 17 | using namespace std; 18 | #endif],[stringstream message; message << "Hello"; return 0;], 19 | ac_cv_cxx_have_sstream=yes, ac_cv_cxx_have_sstream=no) 20 | ]) 21 | if test "$ac_cv_cxx_have_sstream" = yes; then 22 | AC_DEFINE(HAVE_SSTREAM,1,[define if the compiler has stringstream]) 23 | fi 24 | AC_LANG_RESTORE 25 | ]) 26 | -------------------------------------------------------------------------------- /m4/ac_cxx_have_strstream.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_HAVE_STRSTREAM 2 | dnl 3 | dnl If the C++ library has a working strstream, define HAVE_CLASS_STRSTREAM. 4 | dnl 5 | dnl Adapted from ac_cxx_have_sstream.m4 by Steve Robbins 6 | dnl 7 | AC_DEFUN([AC_CXX_HAVE_STRSTREAM], 8 | [AC_REQUIRE([AC_CXX_NAMESPACES]) 9 | AC_LANG_SAVE 10 | AC_LANG_CPLUSPLUS 11 | AC_CHECK_HEADERS(strstream) 12 | AC_CACHE_CHECK([whether the STL defines strstream], 13 | [ac_cv_cxx_have_class_strstream], 14 | [AC_TRY_COMPILE([#if HAVE_STRSTREAM 15 | # include 16 | #else 17 | # include 18 | #endif 19 | #ifdef HAVE_NAMESPACES 20 | using namespace std; 21 | #endif],[ostrstream message; message << "Hello"; return 0;], 22 | ac_cv_cxx_have_class_strstream=yes, ac_cv_cxx_have_class_strstream=no) 23 | ]) 24 | if test "$ac_cv_cxx_have_class_strstream" = yes; then 25 | AC_DEFINE(HAVE_CLASS_STRSTREAM,1,[define if the library defines strstream]) 26 | fi 27 | AC_LANG_RESTORE 28 | ]) 29 | -------------------------------------------------------------------------------- /m4/ac_cxx_namespaces.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AC_CXX_NAMESPACES 2 | dnl 3 | dnl If the compiler can prevent names clashes using namespaces, define 4 | dnl HAVE_NAMESPACES. 5 | dnl 6 | dnl @version $Id: ac_cxx_namespaces.m4,v 1.1.1.1 2003/03/19 02:40:00 mes5k Exp $ 7 | dnl @author Luc Maisonobe 8 | dnl 9 | AC_DEFUN([AC_CXX_NAMESPACES], 10 | [AC_CACHE_CHECK(whether the compiler implements namespaces, 11 | ac_cv_cxx_namespaces, 12 | [AC_LANG_SAVE 13 | AC_LANG_CPLUSPLUS 14 | AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], 15 | [using namespace Outer::Inner; return i;], 16 | ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) 17 | AC_LANG_RESTORE 18 | ]) 19 | if test "$ac_cv_cxx_namespaces" = yes; then 20 | AC_DEFINE(HAVE_NAMESPACES,1,[define to 1 if the compiler implements namespaces]) 21 | fi 22 | ]) 23 | -------------------------------------------------------------------------------- /m4/as-nano.m4: -------------------------------------------------------------------------------- 1 | dnl as-version.m4 0.1.0 2 | 3 | dnl autostars m4 macro for versioning (modified) 4 | 5 | dnl Thomas Vander Stichele 6 | dnl David Schleef 7 | 8 | dnl $Id: as-nano.m4,v 1.2 2007-03-16 23:30:02 ds Exp $ 9 | 10 | dnl AS_VERSION(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) 11 | 12 | AC_DEFUN([AS_NANO], 13 | [ 14 | AC_MSG_CHECKING(nano version) 15 | 16 | NANO=$(echo AC_PACKAGE_VERSION | sed ['s/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.*//']) 17 | AC_SUBST(NANO) 18 | 19 | if test x"$NANO" = x || test "x$NANO" = "x0" ; then 20 | AC_MSG_RESULT([0 (release)]) 21 | NANO=0 22 | ifelse([$1], , :, [$1]) 23 | else 24 | AC_MSG_RESULT($NANO) 25 | ifelse([$2], , :, [$2]) 26 | fi 27 | ]) 28 | -------------------------------------------------------------------------------- /redist/COPYING: -------------------------------------------------------------------------------- 1 | All code in this directory is distributed under the Boost Software 2 | License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy 3 | at http://www.boost.org/LICENSE_1_0.txt) -------------------------------------------------------------------------------- /redist/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /redist/asio/basic_streambuf_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // basic_streambuf_fwd.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_BASIC_STREAMBUF_FWD_HPP 12 | #define ASIO_BASIC_STREAMBUF_FWD_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_NO_IOSTREAM) 21 | 22 | #include 23 | 24 | namespace asio { 25 | 26 | template > 27 | class basic_streambuf; 28 | 29 | template > 30 | class basic_streambuf_ref; 31 | 32 | } // namespace asio 33 | 34 | #endif // !defined(ASIO_NO_IOSTREAM) 35 | 36 | #endif // ASIO_BASIC_STREAMBUF_FWD_HPP 37 | -------------------------------------------------------------------------------- /redist/asio/buffered_read_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_read_stream_fwd.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_BUFFERED_READ_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_READ_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_read_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_READ_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /redist/asio/buffered_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_stream_fwd.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_BUFFERED_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /redist/asio/buffered_write_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_write_stream_fwd.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_BUFFERED_WRITE_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_write_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /redist/asio/deadline_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // deadline_timer.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_DEADLINE_TIMER_HPP 12 | #define ASIO_DEADLINE_TIMER_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_HAS_BOOST_DATE_TIME) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/detail/socket_types.hpp" // Must come before posix_time. 24 | #include "asio/basic_deadline_timer.hpp" 25 | 26 | #include 27 | 28 | namespace asio { 29 | 30 | /// Typedef for the typical usage of timer. Uses a UTC clock. 31 | typedef basic_deadline_timer deadline_timer; 32 | 33 | } // namespace asio 34 | 35 | #endif // defined(ASIO_HAS_BOOST_DATE_TIME) 36 | // || defined(GENERATING_DOCUMENTATION) 37 | 38 | #endif // ASIO_DEADLINE_TIMER_HPP 39 | -------------------------------------------------------------------------------- /redist/asio/detail/array.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array.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_DETAIL_ARRAY_HPP 12 | #define ASIO_DETAIL_ARRAY_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_HAS_STD_ARRAY) 21 | # include 22 | #else // defined(ASIO_HAS_STD_ARRAY) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_ARRAY) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_ARRAY) 30 | using std::array; 31 | #else // defined(ASIO_HAS_STD_ARRAY) 32 | using boost::array; 33 | #endif // defined(ASIO_HAS_STD_ARRAY) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_ARRAY_HPP 39 | -------------------------------------------------------------------------------- /redist/asio/detail/array_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array_fwd.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_DETAIL_ARRAY_FWD_HPP 12 | #define ASIO_DETAIL_ARRAY_FWD_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 | namespace boost { 21 | 22 | template 23 | class array; 24 | 25 | } // namespace boost 26 | 27 | // Standard library components can't be forward declared, so we'll have to 28 | // include the array header. Fortunately, it's fairly lightweight and doesn't 29 | // add significantly to the compile time. 30 | #if defined(ASIO_HAS_STD_ARRAY) 31 | # include 32 | #endif // defined(ASIO_HAS_STD_ARRAY) 33 | 34 | #endif // ASIO_DETAIL_ARRAY_FWD_HPP 35 | -------------------------------------------------------------------------------- /redist/asio/detail/assert.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/assert.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_DETAIL_ASSERT_HPP 12 | #define ASIO_DETAIL_ASSERT_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_HAS_BOOST_ASSERT) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_ASSERT) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 25 | 26 | #if defined(ASIO_HAS_BOOST_ASSERT) 27 | # define ASIO_ASSERT(expr) BOOST_ASSERT(expr) 28 | #else // defined(ASIO_HAS_BOOST_ASSERT) 29 | # define ASIO_ASSERT(expr) assert(expr) 30 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 31 | 32 | #endif // ASIO_DETAIL_ASSERT_HPP 33 | -------------------------------------------------------------------------------- /redist/asio/detail/atomic_count.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/atomic_count.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_DETAIL_ATOMIC_COUNT_HPP 12 | #define ASIO_DETAIL_ATOMIC_COUNT_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_HAS_THREADS) 21 | // Nothing to include. 22 | #elif defined(ASIO_HAS_STD_ATOMIC) 23 | # include 24 | #else // defined(ASIO_HAS_STD_ATOMIC) 25 | # include 26 | #endif // defined(ASIO_HAS_STD_ATOMIC) 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | #if !defined(ASIO_HAS_THREADS) 32 | typedef long atomic_count; 33 | inline void increment(atomic_count& a, long b) { a += b; } 34 | #elif defined(ASIO_HAS_STD_ATOMIC) 35 | typedef std::atomic atomic_count; 36 | inline void increment(atomic_count& a, long b) { a += b; } 37 | #else // defined(ASIO_HAS_STD_ATOMIC) 38 | typedef boost::detail::atomic_count atomic_count; 39 | inline void increment(atomic_count& a, long b) { while (b > 0) ++a, --b; } 40 | #endif // defined(ASIO_HAS_STD_ATOMIC) 41 | 42 | } // namespace detail 43 | } // namespace asio 44 | 45 | #endif // ASIO_DETAIL_ATOMIC_COUNT_HPP 46 | -------------------------------------------------------------------------------- /redist/asio/detail/buffer_resize_guard.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/buffer_resize_guard.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_DETAIL_BUFFER_RESIZE_GUARD_HPP 12 | #define ASIO_DETAIL_BUFFER_RESIZE_GUARD_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 | #include "asio/detail/limits.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | // Helper class to manage buffer resizing in an exception safe way. 27 | template 28 | class buffer_resize_guard 29 | { 30 | public: 31 | // Constructor. 32 | buffer_resize_guard(Buffer& buffer) 33 | : buffer_(buffer), 34 | old_size_(buffer.size()) 35 | { 36 | } 37 | 38 | // Destructor rolls back the buffer resize unless commit was called. 39 | ~buffer_resize_guard() 40 | { 41 | if (old_size_ != (std::numeric_limits::max)()) 42 | { 43 | buffer_.resize(old_size_); 44 | } 45 | } 46 | 47 | // Commit the resize transaction. 48 | void commit() 49 | { 50 | old_size_ = (std::numeric_limits::max)(); 51 | } 52 | 53 | private: 54 | // The buffer being managed. 55 | Buffer& buffer_; 56 | 57 | // The size of the buffer at the time the guard was constructed. 58 | size_t old_size_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 67 | -------------------------------------------------------------------------------- /redist/asio/detail/cstddef.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/cstddef.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_DETAIL_CSTDDEF_HPP 12 | #define ASIO_DETAIL_CSTDDEF_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 | #include 20 | 21 | namespace asio { 22 | 23 | #if defined(ASIO_HAS_NULLPTR) 24 | using std::nullptr_t; 25 | #else // defined(ASIO_HAS_NULLPTR) 26 | struct nullptr_t {}; 27 | #endif // defined(ASIO_HAS_NULLPTR) 28 | 29 | } // namespace asio 30 | 31 | #endif // ASIO_DETAIL_CSTDDEF_HPP 32 | -------------------------------------------------------------------------------- /redist/asio/detail/cstdint.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/cstdint.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_DETAIL_CSTDINT_HPP 12 | #define ASIO_DETAIL_CSTDINT_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_HAS_CSTDINT) 21 | # include 22 | #else // defined(ASIO_HAS_CSTDINT) 23 | # include 24 | #endif // defined(ASIO_HAS_CSTDINT) 25 | 26 | namespace asio { 27 | 28 | #if defined(ASIO_HAS_CSTDINT) 29 | using std::int16_t; 30 | using std::int_least16_t; 31 | using std::uint16_t; 32 | using std::uint_least16_t; 33 | using std::int32_t; 34 | using std::int_least32_t; 35 | using std::uint32_t; 36 | using std::uint_least32_t; 37 | using std::int64_t; 38 | using std::int_least64_t; 39 | using std::uint64_t; 40 | using std::uint_least64_t; 41 | using std::uintmax_t; 42 | #else // defined(ASIO_HAS_CSTDINT) 43 | using boost::int16_t; 44 | using boost::int_least16_t; 45 | using boost::uint16_t; 46 | using boost::uint_least16_t; 47 | using boost::int32_t; 48 | using boost::int_least32_t; 49 | using boost::uint32_t; 50 | using boost::uint_least32_t; 51 | using boost::int64_t; 52 | using boost::int_least64_t; 53 | using boost::uint64_t; 54 | using boost::uint_least64_t; 55 | using boost::uintmax_t; 56 | #endif // defined(ASIO_HAS_CSTDINT) 57 | 58 | } // namespace asio 59 | 60 | #endif // ASIO_DETAIL_CSTDINT_HPP 61 | -------------------------------------------------------------------------------- /redist/asio/detail/date_time_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/date_time_fwd.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_DETAIL_DATE_TIME_FWD_HPP 12 | #define ASIO_DETAIL_DATE_TIME_FWD_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 | namespace boost { 21 | namespace date_time { 22 | 23 | template 24 | class base_time; 25 | 26 | } // namespace date_time 27 | namespace posix_time { 28 | 29 | class ptime; 30 | 31 | } // namespace posix_time 32 | } // namespace boost 33 | 34 | #endif // ASIO_DETAIL_DATE_TIME_FWD_HPP 35 | -------------------------------------------------------------------------------- /redist/asio/detail/dependent_type.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/dependent_type.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_DETAIL_DEPENDENT_TYPE_HPP 12 | #define ASIO_DETAIL_DEPENDENT_TYPE_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 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | struct dependent_type 27 | { 28 | typedef T type; 29 | }; 30 | 31 | } // namespace detail 32 | } // namespace asio 33 | 34 | #include "asio/detail/pop_options.hpp" 35 | 36 | #endif // ASIO_DETAIL_DEPENDENT_TYPE_HPP 37 | -------------------------------------------------------------------------------- /redist/asio/detail/event.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/event.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_DETAIL_EVENT_HPP 12 | #define ASIO_DETAIL_EVENT_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_HAS_THREADS) 21 | # include "asio/detail/null_event.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_event.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_event.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_event.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::condition_variable are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_event event; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_event event; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_event event; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_event event; 43 | #endif 44 | 45 | } // namespace detail 46 | } // namespace asio 47 | 48 | #endif // ASIO_DETAIL_EVENT_HPP 49 | -------------------------------------------------------------------------------- /redist/asio/detail/fd_set_adapter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/fd_set_adapter.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_DETAIL_FD_SET_ADAPTER_HPP 12 | #define ASIO_DETAIL_FD_SET_ADAPTER_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_WINDOWS_RUNTIME) 21 | 22 | #include "asio/detail/posix_fd_set_adapter.hpp" 23 | #include "asio/detail/win_fd_set_adapter.hpp" 24 | 25 | namespace asio { 26 | namespace detail { 27 | 28 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 29 | typedef win_fd_set_adapter fd_set_adapter; 30 | #else 31 | typedef posix_fd_set_adapter fd_set_adapter; 32 | #endif 33 | 34 | } // namespace detail 35 | } // namespace asio 36 | 37 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 38 | 39 | #endif // ASIO_DETAIL_FD_SET_ADAPTER_HPP 40 | -------------------------------------------------------------------------------- /redist/asio/detail/functional.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/functional.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_DETAIL_FUNCTIONAL_HPP 12 | #define ASIO_DETAIL_FUNCTIONAL_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 | #include 21 | 22 | #if !defined(ASIO_HAS_STD_FUNCTION) 23 | # include 24 | #endif // !defined(ASIO_HAS_STD_FUNCTION) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_FUNCTION) 30 | using std::function; 31 | #else // defined(ASIO_HAS_STD_FUNCTION) 32 | using boost::function; 33 | #endif // defined(ASIO_HAS_STD_FUNCTION) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_FUNCTIONAL_HPP 39 | -------------------------------------------------------------------------------- /redist/asio/detail/gcc_hppa_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/gcc_hppa_fenced_block.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_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_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(__GNUC__) && (defined(__hppa) || defined(__hppa__)) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | class gcc_hppa_fenced_block 30 | : private noncopyable 31 | { 32 | public: 33 | enum half_t { half }; 34 | enum full_t { full }; 35 | 36 | // Constructor for a half fenced block. 37 | explicit gcc_hppa_fenced_block(half_t) 38 | { 39 | } 40 | 41 | // Constructor for a full fenced block. 42 | explicit gcc_hppa_fenced_block(full_t) 43 | { 44 | barrier(); 45 | } 46 | 47 | // Destructor. 48 | ~gcc_hppa_fenced_block() 49 | { 50 | barrier(); 51 | } 52 | 53 | private: 54 | static void barrier() 55 | { 56 | // This is just a placeholder and almost certainly not sufficient. 57 | __asm__ __volatile__ ("" : : : "memory"); 58 | } 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__)) 67 | 68 | #endif // ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 69 | -------------------------------------------------------------------------------- /redist/asio/detail/global.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/global.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_DETAIL_GLOBAL_HPP 12 | #define ASIO_DETAIL_GLOBAL_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_HAS_THREADS) 21 | # include "asio/detail/null_global.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_global.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_global.hpp" 26 | #elif defined(ASIO_HAS_STD_CALL_ONCE) 27 | # include "asio/detail/std_global.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::call_once are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | template 36 | inline T& global() 37 | { 38 | #if !defined(ASIO_HAS_THREADS) 39 | return null_global(); 40 | #elif defined(ASIO_WINDOWS) 41 | return win_global(); 42 | #elif defined(ASIO_HAS_PTHREADS) 43 | return posix_global(); 44 | #elif defined(ASIO_HAS_STD_CALL_ONCE) 45 | return std_global(); 46 | #endif 47 | } 48 | 49 | } // namespace detail 50 | } // namespace asio 51 | 52 | #endif // ASIO_DETAIL_GLOBAL_HPP 53 | -------------------------------------------------------------------------------- /redist/asio/detail/handler_cont_helpers.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/handler_cont_helpers.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_DETAIL_HANDLER_CONT_HELPERS_HPP 12 | #define ASIO_DETAIL_HANDLER_CONT_HELPERS_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 | #include "asio/detail/memory.hpp" 20 | #include "asio/handler_continuation_hook.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | // Calls to asio_handler_is_continuation must be made from a namespace that 25 | // does not contain overloads of this function. This namespace is defined here 26 | // for that purpose. 27 | namespace asio_handler_cont_helpers { 28 | 29 | template 30 | inline bool is_continuation(Context& context) 31 | { 32 | #if !defined(ASIO_HAS_HANDLER_HOOKS) 33 | return false; 34 | #else 35 | using asio::asio_handler_is_continuation; 36 | return asio_handler_is_continuation( 37 | asio::detail::addressof(context)); 38 | #endif 39 | } 40 | 41 | } // namespace asio_handler_cont_helpers 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 46 | -------------------------------------------------------------------------------- /redist/asio/detail/impl/posix_event.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_event.ipp 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_DETAIL_IMPL_POSIX_EVENT_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 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_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_event.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | posix_event::posix_event() 32 | : state_(0) 33 | { 34 | int error = ::pthread_cond_init(&cond_, 0); 35 | asio::error_code ec(error, 36 | asio::error::get_system_category()); 37 | asio::detail::throw_error(ec, "event"); 38 | } 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // defined(ASIO_HAS_PTHREADS) 46 | 47 | #endif // ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 48 | -------------------------------------------------------------------------------- /redist/asio/detail/impl/posix_mutex.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_mutex.ipp 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_DETAIL_IMPL_POSIX_MUTEX_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 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_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_mutex.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | posix_mutex::posix_mutex() 32 | { 33 | int error = ::pthread_mutex_init(&mutex_, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "mutex"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 47 | -------------------------------------------------------------------------------- /redist/asio/detail/impl/posix_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_tss_ptr.ipp 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_DETAIL_IMPL_POSIX_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 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_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_tss_ptr.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | void posix_tss_ptr_create(pthread_key_t& key) 32 | { 33 | int error = ::pthread_key_create(&key, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "tss"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 47 | -------------------------------------------------------------------------------- /redist/asio/detail/impl/win_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/win_tss_ptr.ipp 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_DETAIL_IMPL_WIN_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 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_WINDOWS) 21 | 22 | #include "asio/detail/throw_error.hpp" 23 | #include "asio/detail/win_tss_ptr.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | DWORD win_tss_ptr_create() 32 | { 33 | #if defined(UNDER_CE) 34 | enum { out_of_indexes = 0xFFFFFFFF }; 35 | #else 36 | enum { out_of_indexes = TLS_OUT_OF_INDEXES }; 37 | #endif 38 | 39 | DWORD tss_key = ::TlsAlloc(); 40 | if (tss_key == out_of_indexes) 41 | { 42 | DWORD last_error = ::GetLastError(); 43 | asio::error_code ec(last_error, 44 | asio::error::get_system_category()); 45 | asio::detail::throw_error(ec, "tss"); 46 | } 47 | return tss_key; 48 | } 49 | 50 | } // namespace detail 51 | } // namespace asio 52 | 53 | #include "asio/detail/pop_options.hpp" 54 | 55 | #endif // defined(ASIO_WINDOWS) 56 | 57 | #endif // ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 58 | -------------------------------------------------------------------------------- /redist/asio/detail/keyword_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/keyword_tss_ptr.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_DETAIL_KEYWORD_TSS_PTR_HPP 12 | #define ASIO_DETAIL_KEYWORD_TSS_PTR_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_HAS_THREAD_KEYWORD_EXTENSION) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class keyword_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | keyword_tss_ptr() 36 | { 37 | } 38 | 39 | // Destructor. 40 | ~keyword_tss_ptr() 41 | { 42 | } 43 | 44 | // Get the value. 45 | operator T*() const 46 | { 47 | return value_; 48 | } 49 | 50 | // Set the value. 51 | void operator=(T* value) 52 | { 53 | value_ = value; 54 | } 55 | 56 | private: 57 | static ASIO_THREAD_KEYWORD T* value_; 58 | }; 59 | 60 | template 61 | ASIO_THREAD_KEYWORD T* keyword_tss_ptr::value_; 62 | 63 | } // namespace detail 64 | } // namespace asio 65 | 66 | #include "asio/detail/pop_options.hpp" 67 | 68 | #endif // defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION) 69 | 70 | #endif // ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 71 | -------------------------------------------------------------------------------- /redist/asio/detail/limits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/limits.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 | 11 | #ifndef ASIO_DETAIL_LIMITS_HPP 12 | #define ASIO_DETAIL_LIMITS_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_HAS_BOOST_LIMITS) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_LIMITS) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_LIMITS) 25 | 26 | #endif // ASIO_DETAIL_LIMITS_HPP 27 | -------------------------------------------------------------------------------- /redist/asio/detail/local_free_on_block_exit.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/local_free_on_block_exit.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_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 12 | #define ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_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_WINDOWS) || defined(__CYGWIN__) 21 | #if !defined(ASIO_WINDOWS_APP) 22 | 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/socket_types.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class local_free_on_block_exit 32 | : private noncopyable 33 | { 34 | public: 35 | // Constructor blocks all signals for the calling thread. 36 | explicit local_free_on_block_exit(void* p) 37 | : p_(p) 38 | { 39 | } 40 | 41 | // Destructor restores the previous signal mask. 42 | ~local_free_on_block_exit() 43 | { 44 | ::LocalFree(p_); 45 | } 46 | 47 | private: 48 | void* p_; 49 | }; 50 | 51 | } // namespace detail 52 | } // namespace asio 53 | 54 | #include "asio/detail/pop_options.hpp" 55 | 56 | #endif // !defined(ASIO_WINDOWS_APP) 57 | #endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__) 58 | 59 | #endif // ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 60 | -------------------------------------------------------------------------------- /redist/asio/detail/macos_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/macos_fenced_block.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_DETAIL_MACOS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_MACOS_FENCED_BLOCK_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(__MACH__) && defined(__APPLE__) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class macos_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_t { half }; 35 | enum full_t { full }; 36 | 37 | // Constructor for a half fenced block. 38 | explicit macos_fenced_block(half_t) 39 | { 40 | } 41 | 42 | // Constructor for a full fenced block. 43 | explicit macos_fenced_block(full_t) 44 | { 45 | OSMemoryBarrier(); 46 | } 47 | 48 | // Destructor. 49 | ~macos_fenced_block() 50 | { 51 | OSMemoryBarrier(); 52 | } 53 | }; 54 | 55 | } // namespace detail 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // defined(__MACH__) && defined(__APPLE__) 61 | 62 | #endif // ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 63 | -------------------------------------------------------------------------------- /redist/asio/detail/mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/mutex.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_DETAIL_MUTEX_HPP 12 | #define ASIO_DETAIL_MUTEX_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_HAS_THREADS) 21 | # include "asio/detail/null_mutex.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_mutex.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_mutex.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_mutex.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::mutex are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_mutex mutex; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_mutex mutex; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_mutex mutex; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_mutex mutex; 43 | #endif 44 | 45 | } // namespace detail 46 | } // namespace asio 47 | 48 | #endif // ASIO_DETAIL_MUTEX_HPP 49 | -------------------------------------------------------------------------------- /redist/asio/detail/noncopyable.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/noncopyable.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_DETAIL_NONCOPYABLE_HPP 12 | #define ASIO_DETAIL_NONCOPYABLE_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 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | class noncopyable 26 | { 27 | protected: 28 | noncopyable() {} 29 | ~noncopyable() {} 30 | private: 31 | noncopyable(const noncopyable&); 32 | const noncopyable& operator=(const noncopyable&); 33 | }; 34 | 35 | } // namespace detail 36 | 37 | using asio::detail::noncopyable; 38 | 39 | } // namespace asio 40 | 41 | #include "asio/detail/pop_options.hpp" 42 | 43 | #endif // ASIO_DETAIL_NONCOPYABLE_HPP 44 | -------------------------------------------------------------------------------- /redist/asio/detail/null_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_fenced_block.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_DETAIL_NULL_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_NULL_FENCED_BLOCK_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/noncopyable.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | class null_fenced_block 26 | : private noncopyable 27 | { 28 | public: 29 | enum half_or_full_t { half, full }; 30 | 31 | // Constructor. 32 | explicit null_fenced_block(half_or_full_t) 33 | { 34 | } 35 | 36 | // Destructor. 37 | ~null_fenced_block() 38 | { 39 | } 40 | }; 41 | 42 | } // namespace detail 43 | } // namespace asio 44 | 45 | #include "asio/detail/pop_options.hpp" 46 | 47 | #endif // ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 48 | -------------------------------------------------------------------------------- /redist/asio/detail/null_global.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_global.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_DETAIL_NULL_GLOBAL_HPP 12 | #define ASIO_DETAIL_NULL_GLOBAL_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 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | struct null_global_impl 27 | { 28 | null_global_impl() 29 | : ptr_(0) 30 | { 31 | } 32 | 33 | // Destructor automatically cleans up the global. 34 | ~null_global_impl() 35 | { 36 | delete ptr_; 37 | } 38 | 39 | static null_global_impl instance_; 40 | T* ptr_; 41 | }; 42 | 43 | template 44 | null_global_impl null_global_impl::instance_; 45 | 46 | template 47 | T& null_global() 48 | { 49 | if (null_global_impl::instance_.ptr_ == 0) 50 | null_global_impl::instance_.ptr_ = new T; 51 | return *null_global_impl::instance_.ptr_; 52 | } 53 | 54 | } // namespace detail 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_DETAIL_NULL_GLOBAL_HPP 60 | -------------------------------------------------------------------------------- /redist/asio/detail/null_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_mutex.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_DETAIL_NULL_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_MUTEX_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_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/scoped_lock.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class null_mutex 31 | : private noncopyable 32 | { 33 | public: 34 | typedef asio::detail::scoped_lock scoped_lock; 35 | 36 | // Constructor. 37 | null_mutex() 38 | { 39 | } 40 | 41 | // Destructor. 42 | ~null_mutex() 43 | { 44 | } 45 | 46 | // Lock the mutex. 47 | void lock() 48 | { 49 | } 50 | 51 | // Unlock the mutex. 52 | void unlock() 53 | { 54 | } 55 | }; 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // !defined(ASIO_HAS_THREADS) 63 | 64 | #endif // ASIO_DETAIL_NULL_MUTEX_HPP 65 | -------------------------------------------------------------------------------- /redist/asio/detail/null_reactor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_reactor.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_DETAIL_NULL_REACTOR_HPP 12 | #define ASIO_DETAIL_NULL_REACTOR_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_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #include "asio/detail/scheduler_operation.hpp" 23 | #include "asio/execution_context.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class null_reactor 31 | : public execution_context_service_base 32 | { 33 | public: 34 | // Constructor. 35 | null_reactor(asio::execution_context& ctx) 36 | : execution_context_service_base(ctx) 37 | { 38 | } 39 | 40 | // Destructor. 41 | ~null_reactor() 42 | { 43 | } 44 | 45 | // Destroy all user-defined handler objects owned by the service. 46 | void shutdown() 47 | { 48 | } 49 | 50 | // No-op because should never be called. 51 | void run(bool /*block*/, op_queue& /*ops*/) 52 | { 53 | } 54 | 55 | // No-op. 56 | void interrupt() 57 | { 58 | } 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 67 | 68 | #endif // ASIO_DETAIL_NULL_REACTOR_HPP 69 | -------------------------------------------------------------------------------- /redist/asio/detail/null_signal_blocker.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_signal_blocker.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_DETAIL_NULL_SIGNAL_BLOCKER_HPP 12 | #define ASIO_DETAIL_NULL_SIGNAL_BLOCKER_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_HAS_THREADS) \ 21 | || defined(ASIO_WINDOWS) \ 22 | || defined(ASIO_WINDOWS_RUNTIME) \ 23 | || defined(__CYGWIN__) \ 24 | || defined(__SYMBIAN32__) 25 | 26 | #include "asio/detail/noncopyable.hpp" 27 | 28 | #include "asio/detail/push_options.hpp" 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | class null_signal_blocker 34 | : private noncopyable 35 | { 36 | public: 37 | // Constructor blocks all signals for the calling thread. 38 | null_signal_blocker() 39 | { 40 | } 41 | 42 | // Destructor restores the previous signal mask. 43 | ~null_signal_blocker() 44 | { 45 | } 46 | 47 | // Block all signals for the calling thread. 48 | void block() 49 | { 50 | } 51 | 52 | // Restore the previous signal mask. 53 | void unblock() 54 | { 55 | } 56 | }; 57 | 58 | } // namespace detail 59 | } // namespace asio 60 | 61 | #include "asio/detail/pop_options.hpp" 62 | 63 | #endif // !defined(ASIO_HAS_THREADS) 64 | // || defined(ASIO_WINDOWS) 65 | // || defined(ASIO_WINDOWS_RUNTIME) 66 | // || defined(__CYGWIN__) 67 | // || defined(__SYMBIAN32__) 68 | 69 | #endif // ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 70 | -------------------------------------------------------------------------------- /redist/asio/detail/null_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_static_mutex.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_DETAIL_NULL_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_STATIC_MUTEX_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_HAS_THREADS) 21 | 22 | #include "asio/detail/scoped_lock.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | struct null_static_mutex 30 | { 31 | typedef asio::detail::scoped_lock scoped_lock; 32 | 33 | // Initialise the mutex. 34 | void init() 35 | { 36 | } 37 | 38 | // Lock the mutex. 39 | void lock() 40 | { 41 | } 42 | 43 | // Unlock the mutex. 44 | void unlock() 45 | { 46 | } 47 | 48 | int unused_; 49 | }; 50 | 51 | #define ASIO_NULL_STATIC_MUTEX_INIT { 0 } 52 | 53 | } // namespace detail 54 | } // namespace asio 55 | 56 | #include "asio/detail/pop_options.hpp" 57 | 58 | #endif // !defined(ASIO_HAS_THREADS) 59 | 60 | #endif // ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 61 | -------------------------------------------------------------------------------- /redist/asio/detail/null_thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_thread.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_DETAIL_NULL_THREAD_HPP 12 | #define ASIO_DETAIL_NULL_THREAD_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_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class null_thread 32 | : private noncopyable 33 | { 34 | public: 35 | // Constructor. 36 | template 37 | null_thread(Function, unsigned int = 0) 38 | { 39 | asio::detail::throw_error( 40 | asio::error::operation_not_supported, "thread"); 41 | } 42 | 43 | // Destructor. 44 | ~null_thread() 45 | { 46 | } 47 | 48 | // Wait for the thread to exit. 49 | void join() 50 | { 51 | } 52 | 53 | // Get number of CPUs. 54 | static std::size_t hardware_concurrency() 55 | { 56 | return 1; 57 | } 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // !defined(ASIO_HAS_THREADS) 66 | 67 | #endif // ASIO_DETAIL_NULL_THREAD_HPP 68 | -------------------------------------------------------------------------------- /redist/asio/detail/null_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_tss_ptr.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_DETAIL_NULL_TSS_PTR_HPP 12 | #define ASIO_DETAIL_NULL_TSS_PTR_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_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class null_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | null_tss_ptr() 36 | : value_(0) 37 | { 38 | } 39 | 40 | // Destructor. 41 | ~null_tss_ptr() 42 | { 43 | } 44 | 45 | // Get the value. 46 | operator T*() const 47 | { 48 | return value_; 49 | } 50 | 51 | // Set the value. 52 | void operator=(T* value) 53 | { 54 | value_ = value; 55 | } 56 | 57 | private: 58 | T* value_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // !defined(ASIO_HAS_THREADS) 67 | 68 | #endif // ASIO_DETAIL_NULL_TSS_PTR_HPP 69 | -------------------------------------------------------------------------------- /redist/asio/detail/operation.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/operation.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_DETAIL_OPERATION_HPP 12 | #define ASIO_DETAIL_OPERATION_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_HAS_IOCP) 21 | # include "asio/detail/win_iocp_operation.hpp" 22 | #else 23 | # include "asio/detail/scheduler_operation.hpp" 24 | #endif 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_IOCP) 30 | typedef win_iocp_operation operation; 31 | #else 32 | typedef scheduler_operation operation; 33 | #endif 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_OPERATION_HPP 39 | -------------------------------------------------------------------------------- /redist/asio/detail/posix_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/posix_static_mutex.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_DETAIL_POSIX_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_POSIX_STATIC_MUTEX_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_HAS_PTHREADS) 21 | 22 | #include 23 | #include "asio/detail/scoped_lock.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | struct posix_static_mutex 31 | { 32 | typedef asio::detail::scoped_lock scoped_lock; 33 | 34 | // Initialise the mutex. 35 | void init() 36 | { 37 | // Nothing to do. 38 | } 39 | 40 | // Lock the mutex. 41 | void lock() 42 | { 43 | (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL. 44 | } 45 | 46 | // Unlock the mutex. 47 | void unlock() 48 | { 49 | (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL. 50 | } 51 | 52 | ::pthread_mutex_t mutex_; 53 | }; 54 | 55 | #define ASIO_POSIX_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER } 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // defined(ASIO_HAS_PTHREADS) 63 | 64 | #endif // ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 65 | -------------------------------------------------------------------------------- /redist/asio/detail/reactor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor.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_DETAIL_REACTOR_HPP 12 | #define ASIO_DETAIL_REACTOR_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/reactor_fwd.hpp" 19 | 20 | #if defined(ASIO_HAS_EPOLL) 21 | # include "asio/detail/epoll_reactor.hpp" 22 | #elif defined(ASIO_HAS_KQUEUE) 23 | # include "asio/detail/kqueue_reactor.hpp" 24 | #elif defined(ASIO_HAS_DEV_POLL) 25 | # include "asio/detail/dev_poll_reactor.hpp" 26 | #elif defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 27 | # include "asio/detail/null_reactor.hpp" 28 | #else 29 | # include "asio/detail/select_reactor.hpp" 30 | #endif 31 | 32 | #endif // ASIO_DETAIL_REACTOR_HPP 33 | -------------------------------------------------------------------------------- /redist/asio/detail/reactor_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor_fwd.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_DETAIL_REACTOR_FWD_HPP 12 | #define ASIO_DETAIL_REACTOR_FWD_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 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class null_reactor reactor; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class select_reactor reactor; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor reactor; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor reactor; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor reactor; 33 | #else 34 | typedef class select_reactor reactor; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_REACTOR_FWD_HPP 41 | -------------------------------------------------------------------------------- /redist/asio/detail/reactor_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor_op.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_DETAIL_REACTOR_OP_HPP 12 | #define ASIO_DETAIL_REACTOR_OP_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 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class reactor_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | // The number of bytes transferred, to be passed to the completion handler. 34 | std::size_t bytes_transferred_; 35 | 36 | // Perform the operation. Returns true if it is finished. 37 | bool perform() 38 | { 39 | return perform_func_(this); 40 | } 41 | 42 | protected: 43 | typedef bool (*perform_func_type)(reactor_op*); 44 | 45 | reactor_op(perform_func_type perform_func, func_type complete_func) 46 | : operation(complete_func), 47 | bytes_transferred_(0), 48 | perform_func_(perform_func) 49 | { 50 | } 51 | 52 | private: 53 | perform_func_type perform_func_; 54 | }; 55 | 56 | } // namespace detail 57 | } // namespace asio 58 | 59 | #include "asio/detail/pop_options.hpp" 60 | 61 | #endif // ASIO_DETAIL_REACTOR_OP_HPP 62 | -------------------------------------------------------------------------------- /redist/asio/detail/regex_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/regex_fwd.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_DETAIL_REGEX_FWD_HPP 12 | #define ASIO_DETAIL_REGEX_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if defined(ASIO_HAS_BOOST_REGEX) 19 | 20 | #include 21 | #include 22 | 23 | namespace boost { 24 | 25 | template 26 | struct sub_match; 27 | 28 | template 29 | class match_results; 30 | 31 | } // namespace boost 32 | 33 | #endif // defined(ASIO_HAS_BOOST_REGEX) 34 | 35 | #endif // ASIO_DETAIL_REGEX_FWD_HPP 36 | -------------------------------------------------------------------------------- /redist/asio/detail/scheduler_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/scheduler_thread_info.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_DETAIL_SCHEDULER_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_SCHEDULER_THREAD_INFO_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/op_queue.hpp" 19 | #include "asio/detail/thread_info_base.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class scheduler; 27 | class scheduler_operation; 28 | 29 | struct scheduler_thread_info : public thread_info_base 30 | { 31 | op_queue private_op_queue; 32 | long private_outstanding_work; 33 | }; 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP 41 | -------------------------------------------------------------------------------- /redist/asio/detail/scoped_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/scoped_ptr.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_DETAIL_SCOPED_PTR_HPP 12 | #define ASIO_DETAIL_SCOPED_PTR_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 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | class scoped_ptr 27 | { 28 | public: 29 | // Constructor. 30 | explicit scoped_ptr(T* p = 0) 31 | : p_(p) 32 | { 33 | } 34 | 35 | // Destructor. 36 | ~scoped_ptr() 37 | { 38 | delete p_; 39 | } 40 | 41 | // Access. 42 | T* get() 43 | { 44 | return p_; 45 | } 46 | 47 | // Access. 48 | T* operator->() 49 | { 50 | return p_; 51 | } 52 | 53 | // Dereference. 54 | T& operator*() 55 | { 56 | return *p_; 57 | } 58 | 59 | // Reset pointer. 60 | void reset(T* p = 0) 61 | { 62 | delete p_; 63 | p_ = p; 64 | } 65 | 66 | // Release ownership of the pointer. 67 | T* release() 68 | { 69 | T* tmp = p_; 70 | p_ = 0; 71 | return tmp; 72 | } 73 | 74 | private: 75 | // Disallow copying and assignment. 76 | scoped_ptr(const scoped_ptr&); 77 | scoped_ptr& operator=(const scoped_ptr&); 78 | 79 | T* p_; 80 | }; 81 | 82 | } // namespace detail 83 | } // namespace asio 84 | 85 | #include "asio/detail/pop_options.hpp" 86 | 87 | #endif // ASIO_DETAIL_SCOPED_PTR_HPP 88 | -------------------------------------------------------------------------------- /redist/asio/detail/select_interrupter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/select_interrupter.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_DETAIL_SELECT_INTERRUPTER_HPP 12 | #define ASIO_DETAIL_SELECT_INTERRUPTER_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_WINDOWS_RUNTIME) 21 | 22 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/socket_select_interrupter.hpp" 24 | #elif defined(ASIO_HAS_EVENTFD) 25 | # include "asio/detail/eventfd_select_interrupter.hpp" 26 | #else 27 | # include "asio/detail/pipe_select_interrupter.hpp" 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 34 | typedef socket_select_interrupter select_interrupter; 35 | #elif defined(ASIO_HAS_EVENTFD) 36 | typedef eventfd_select_interrupter select_interrupter; 37 | #else 38 | typedef pipe_select_interrupter select_interrupter; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 45 | 46 | #endif // ASIO_DETAIL_SELECT_INTERRUPTER_HPP 47 | -------------------------------------------------------------------------------- /redist/asio/detail/signal_blocker.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_blocker.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_DETAIL_SIGNAL_BLOCKER_HPP 12 | #define ASIO_DETAIL_SIGNAL_BLOCKER_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_HAS_THREADS) || defined(ASIO_WINDOWS) \ 21 | || defined(ASIO_WINDOWS_RUNTIME) \ 22 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/null_signal_blocker.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_signal_blocker.hpp" 26 | #else 27 | # error Only Windows and POSIX are supported! 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if !defined(ASIO_HAS_THREADS) || defined(ASIO_WINDOWS) \ 34 | || defined(ASIO_WINDOWS_RUNTIME) \ 35 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 36 | typedef null_signal_blocker signal_blocker; 37 | #elif defined(ASIO_HAS_PTHREADS) 38 | typedef posix_signal_blocker signal_blocker; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // ASIO_DETAIL_SIGNAL_BLOCKER_HPP 45 | -------------------------------------------------------------------------------- /redist/asio/detail/signal_init.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_init.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_DETAIL_SIGNAL_INIT_HPP 12 | #define ASIO_DETAIL_SIGNAL_INIT_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_WINDOWS) && !defined(__CYGWIN__) 21 | 22 | #include 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class signal_init 31 | { 32 | public: 33 | // Constructor. 34 | signal_init() 35 | { 36 | std::signal(Signal, SIG_IGN); 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__) 46 | 47 | #endif // ASIO_DETAIL_SIGNAL_INIT_HPP 48 | -------------------------------------------------------------------------------- /redist/asio/detail/signal_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_op.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_DETAIL_SIGNAL_OP_HPP 12 | #define ASIO_DETAIL_SIGNAL_OP_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 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class signal_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | // The signal number to be passed to the completion handler. 34 | int signal_number_; 35 | 36 | protected: 37 | signal_op(func_type func) 38 | : operation(func), 39 | signal_number_(0) 40 | { 41 | } 42 | }; 43 | 44 | } // namespace detail 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #endif // ASIO_DETAIL_SIGNAL_OP_HPP 50 | -------------------------------------------------------------------------------- /redist/asio/detail/solaris_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/solaris_fenced_block.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_DETAIL_SOLARIS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_SOLARIS_FENCED_BLOCK_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(__sun) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class solaris_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_t { half }; 35 | enum full_t { full }; 36 | 37 | // Constructor for a half fenced block. 38 | explicit solaris_fenced_block(half_t) 39 | { 40 | } 41 | 42 | // Constructor for a full fenced block. 43 | explicit solaris_fenced_block(full_t) 44 | { 45 | membar_consumer(); 46 | } 47 | 48 | // Destructor. 49 | ~solaris_fenced_block() 50 | { 51 | membar_producer(); 52 | } 53 | }; 54 | 55 | } // namespace detail 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // defined(__sun) 61 | 62 | #endif // ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 63 | -------------------------------------------------------------------------------- /redist/asio/detail/static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/static_mutex.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_DETAIL_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_STATIC_MUTEX_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_HAS_THREADS) 21 | # include "asio/detail/null_static_mutex.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_static_mutex.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_static_mutex.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_static_mutex.hpp" 28 | #else 29 | # error Only Windows and POSIX are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_static_mutex static_mutex; 37 | # define ASIO_STATIC_MUTEX_INIT ASIO_NULL_STATIC_MUTEX_INIT 38 | #elif defined(ASIO_WINDOWS) 39 | typedef win_static_mutex static_mutex; 40 | # define ASIO_STATIC_MUTEX_INIT ASIO_WIN_STATIC_MUTEX_INIT 41 | #elif defined(ASIO_HAS_PTHREADS) 42 | typedef posix_static_mutex static_mutex; 43 | # define ASIO_STATIC_MUTEX_INIT ASIO_POSIX_STATIC_MUTEX_INIT 44 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 45 | typedef std_static_mutex static_mutex; 46 | # define ASIO_STATIC_MUTEX_INIT ASIO_STD_STATIC_MUTEX_INIT 47 | #endif 48 | 49 | } // namespace detail 50 | } // namespace asio 51 | 52 | #endif // ASIO_DETAIL_STATIC_MUTEX_HPP 53 | -------------------------------------------------------------------------------- /redist/asio/detail/std_global.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_global.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_DETAIL_STD_GLOBAL_HPP 12 | #define ASIO_DETAIL_STD_GLOBAL_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_HAS_STD_CALL_ONCE) 21 | 22 | #include 23 | #include 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | template 31 | struct std_global_impl 32 | { 33 | // Helper function to perform initialisation. 34 | static void do_init() 35 | { 36 | instance_.ptr_ = new T; 37 | } 38 | 39 | // Destructor automatically cleans up the global. 40 | ~std_global_impl() 41 | { 42 | delete ptr_; 43 | } 44 | 45 | static std::once_flag init_once_; 46 | static std_global_impl instance_; 47 | T* ptr_; 48 | }; 49 | 50 | template 51 | std::once_flag std_global_impl::init_once_; 52 | 53 | template 54 | std_global_impl std_global_impl::instance_; 55 | 56 | template 57 | T& std_global() 58 | { 59 | std::call_once(std_global_impl::init_once_, &std_global_impl::do_init); 60 | return *std_global_impl::instance_.ptr_; 61 | } 62 | 63 | } // namespace detail 64 | } // namespace asio 65 | 66 | #include "asio/detail/pop_options.hpp" 67 | 68 | #endif // defined(ASIO_HAS_STD_CALL_ONCE) 69 | 70 | #endif // ASIO_DETAIL_STD_GLOBAL_HPP 71 | -------------------------------------------------------------------------------- /redist/asio/detail/std_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_mutex.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_DETAIL_STD_MUTEX_HPP 12 | #define ASIO_DETAIL_STD_MUTEX_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_HAS_STD_MUTEX_AND_CONDVAR) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class std_event; 32 | 33 | class std_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | std_mutex() 41 | { 42 | } 43 | 44 | // Destructor. 45 | ~std_mutex() 46 | { 47 | } 48 | 49 | // Lock the mutex. 50 | void lock() 51 | { 52 | mutex_.lock(); 53 | } 54 | 55 | // Unlock the mutex. 56 | void unlock() 57 | { 58 | mutex_.unlock(); 59 | } 60 | 61 | private: 62 | friend class std_event; 63 | std::mutex mutex_; 64 | }; 65 | 66 | } // namespace detail 67 | } // namespace asio 68 | 69 | #include "asio/detail/pop_options.hpp" 70 | 71 | #endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 72 | 73 | #endif // ASIO_DETAIL_STD_MUTEX_HPP 74 | -------------------------------------------------------------------------------- /redist/asio/detail/std_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_static_mutex.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_DETAIL_STD_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_STD_STATIC_MUTEX_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_HAS_STD_MUTEX_AND_CONDVAR) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class std_event; 32 | 33 | class std_static_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | std_static_mutex(int) 41 | { 42 | } 43 | 44 | // Destructor. 45 | ~std_static_mutex() 46 | { 47 | } 48 | 49 | // Initialise the mutex. 50 | void init() 51 | { 52 | // Nothing to do. 53 | } 54 | 55 | // Lock the mutex. 56 | void lock() 57 | { 58 | mutex_.lock(); 59 | } 60 | 61 | // Unlock the mutex. 62 | void unlock() 63 | { 64 | mutex_.unlock(); 65 | } 66 | 67 | private: 68 | friend class std_event; 69 | std::mutex mutex_; 70 | }; 71 | 72 | #define ASIO_STD_STATIC_MUTEX_INIT 0 73 | 74 | } // namespace detail 75 | } // namespace asio 76 | 77 | #include "asio/detail/pop_options.hpp" 78 | 79 | #endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 80 | 81 | #endif // ASIO_DETAIL_STD_STATIC_MUTEX_HPP 82 | -------------------------------------------------------------------------------- /redist/asio/detail/std_thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_thread.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_DETAIL_STD_THREAD_HPP 12 | #define ASIO_DETAIL_STD_THREAD_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_HAS_STD_THREAD) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class std_thread 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | template 36 | std_thread(Function f, unsigned int = 0) 37 | : thread_(f) 38 | { 39 | } 40 | 41 | // Destructor. 42 | ~std_thread() 43 | { 44 | join(); 45 | } 46 | 47 | // Wait for the thread to exit. 48 | void join() 49 | { 50 | if (thread_.joinable()) 51 | thread_.join(); 52 | } 53 | 54 | // Get number of CPUs. 55 | static std::size_t hardware_concurrency() 56 | { 57 | return std::thread::hardware_concurrency(); 58 | } 59 | 60 | private: 61 | std::thread thread_; 62 | }; 63 | 64 | } // namespace detail 65 | } // namespace asio 66 | 67 | #include "asio/detail/pop_options.hpp" 68 | 69 | #endif // defined(ASIO_HAS_STD_THREAD) 70 | 71 | #endif // ASIO_DETAIL_STD_THREAD_HPP 72 | -------------------------------------------------------------------------------- /redist/asio/detail/thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/thread.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_DETAIL_THREAD_HPP 12 | #define ASIO_DETAIL_THREAD_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_HAS_THREADS) 21 | # include "asio/detail/null_thread.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # if defined(UNDER_CE) 24 | # include "asio/detail/wince_thread.hpp" 25 | # elif defined(ASIO_WINDOWS_APP) 26 | # include "asio/detail/winapp_thread.hpp" 27 | # else 28 | # include "asio/detail/win_thread.hpp" 29 | # endif 30 | #elif defined(ASIO_HAS_PTHREADS) 31 | # include "asio/detail/posix_thread.hpp" 32 | #elif defined(ASIO_HAS_STD_THREAD) 33 | # include "asio/detail/std_thread.hpp" 34 | #else 35 | # error Only Windows, POSIX and std::thread are supported! 36 | #endif 37 | 38 | namespace asio { 39 | namespace detail { 40 | 41 | #if !defined(ASIO_HAS_THREADS) 42 | typedef null_thread thread; 43 | #elif defined(ASIO_WINDOWS) 44 | # if defined(UNDER_CE) 45 | typedef wince_thread thread; 46 | # elif defined(ASIO_WINDOWS_APP) 47 | typedef winapp_thread thread; 48 | # else 49 | typedef win_thread thread; 50 | # endif 51 | #elif defined(ASIO_HAS_PTHREADS) 52 | typedef posix_thread thread; 53 | #elif defined(ASIO_HAS_STD_THREAD) 54 | typedef std_thread thread; 55 | #endif 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #endif // ASIO_DETAIL_THREAD_HPP 61 | -------------------------------------------------------------------------------- /redist/asio/detail/thread_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/thread_context.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_DETAIL_THREAD_CONTEXT_HPP 12 | #define ASIO_DETAIL_THREAD_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include 19 | #include 20 | #include "asio/detail/call_stack.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | class thread_info_base; 28 | 29 | // Base class for things that manage threads (scheduler, win_iocp_io_context). 30 | class thread_context 31 | { 32 | public: 33 | // Per-thread call stack to track the state of each thread in the context. 34 | typedef call_stack thread_call_stack; 35 | }; 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #include "asio/detail/pop_options.hpp" 41 | 42 | #endif // ASIO_DETAIL_THREAD_CONTEXT_HPP 43 | -------------------------------------------------------------------------------- /redist/asio/detail/throw_error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_error.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_DETAIL_THROW_ERROR_HPP 12 | #define ASIO_DETAIL_THROW_ERROR_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 | #include "asio/error_code.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | ASIO_DECL void do_throw_error(const asio::error_code& err); 27 | 28 | ASIO_DECL void do_throw_error(const asio::error_code& err, 29 | const char* location); 30 | 31 | inline void throw_error(const asio::error_code& err) 32 | { 33 | if (err) 34 | do_throw_error(err); 35 | } 36 | 37 | inline void throw_error(const asio::error_code& err, 38 | const char* location) 39 | { 40 | if (err) 41 | do_throw_error(err, location); 42 | } 43 | 44 | } // namespace detail 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #if defined(ASIO_HEADER_ONLY) 50 | # include "asio/detail/impl/throw_error.ipp" 51 | #endif // defined(ASIO_HEADER_ONLY) 52 | 53 | #endif // ASIO_DETAIL_THROW_ERROR_HPP 54 | -------------------------------------------------------------------------------- /redist/asio/detail/throw_exception.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_exception.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_DETAIL_THROW_EXCEPTION_HPP 12 | #define ASIO_DETAIL_THROW_EXCEPTION_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_HAS_BOOST_THROW_EXCEPTION) 21 | # include 22 | #endif // defined(ASIO_BOOST_THROW_EXCEPTION) 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | #if defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 28 | using boost::throw_exception; 29 | #else // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 30 | 31 | // Declare the throw_exception function for all targets. 32 | template 33 | void throw_exception(const Exception& e); 34 | 35 | // Only define the throw_exception function when exceptions are enabled. 36 | // Otherwise, it is up to the application to provide a definition of this 37 | // function. 38 | # if !defined(ASIO_NO_EXCEPTIONS) 39 | template 40 | void throw_exception(const Exception& e) 41 | { 42 | throw e; 43 | } 44 | # endif // !defined(ASIO_NO_EXCEPTIONS) 45 | 46 | #endif // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 47 | 48 | } // namespace detail 49 | } // namespace asio 50 | 51 | #endif // ASIO_DETAIL_THROW_EXCEPTION_HPP 52 | -------------------------------------------------------------------------------- /redist/asio/detail/timer_scheduler.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler.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_DETAIL_TIMER_SCHEDULER_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_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 | #include "asio/detail/timer_scheduler_fwd.hpp" 20 | 21 | #if defined(ASIO_WINDOWS_RUNTIME) 22 | # include "asio/detail/winrt_timer_scheduler.hpp" 23 | #elif defined(ASIO_HAS_IOCP) 24 | # include "asio/detail/win_iocp_io_context.hpp" 25 | #elif defined(ASIO_HAS_EPOLL) 26 | # include "asio/detail/epoll_reactor.hpp" 27 | #elif defined(ASIO_HAS_KQUEUE) 28 | # include "asio/detail/kqueue_reactor.hpp" 29 | #elif defined(ASIO_HAS_DEV_POLL) 30 | # include "asio/detail/dev_poll_reactor.hpp" 31 | #else 32 | # include "asio/detail/select_reactor.hpp" 33 | #endif 34 | 35 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_HPP 36 | -------------------------------------------------------------------------------- /redist/asio/detail/timer_scheduler_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler_fwd.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_DETAIL_TIMER_SCHEDULER_FWD_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_FWD_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 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class winrt_timer_scheduler timer_scheduler; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class win_iocp_io_context timer_scheduler; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor timer_scheduler; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor timer_scheduler; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor timer_scheduler; 33 | #else 34 | typedef class select_reactor timer_scheduler; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 41 | -------------------------------------------------------------------------------- /redist/asio/detail/wait_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/wait_op.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_DETAIL_WAIT_OP_HPP 12 | #define ASIO_DETAIL_WAIT_OP_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 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class wait_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | protected: 34 | wait_op(func_type func) 35 | : operation(func) 36 | { 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_WAIT_OP_HPP 46 | -------------------------------------------------------------------------------- /redist/asio/detail/win_iocp_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/win_iocp_thread_info.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_DETAIL_WIN_IOCP_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_WIN_IOCP_THREAD_INFO_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/thread_info_base.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | struct win_iocp_thread_info : public thread_info_base 26 | { 27 | }; 28 | 29 | } // namespace detail 30 | } // namespace asio 31 | 32 | #include "asio/detail/pop_options.hpp" 33 | 34 | #endif // ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 35 | -------------------------------------------------------------------------------- /redist/asio/detail/winrt_async_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/winrt_async_op.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_DETAIL_WINRT_ASYNC_OP_HPP 12 | #define ASIO_DETAIL_WINRT_ASYNC_OP_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 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | template 27 | class winrt_async_op 28 | : public operation 29 | { 30 | public: 31 | // The error code to be passed to the completion handler. 32 | asio::error_code ec_; 33 | 34 | // The result of the operation, to be passed to the completion handler. 35 | TResult result_; 36 | 37 | protected: 38 | winrt_async_op(func_type complete_func) 39 | : operation(complete_func), 40 | result_() 41 | { 42 | } 43 | }; 44 | 45 | template <> 46 | class winrt_async_op 47 | : public operation 48 | { 49 | public: 50 | // The error code to be passed to the completion handler. 51 | asio::error_code ec_; 52 | 53 | protected: 54 | winrt_async_op(func_type complete_func) 55 | : operation(complete_func) 56 | { 57 | } 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // ASIO_DETAIL_WINRT_ASYNC_OP_HPP 66 | -------------------------------------------------------------------------------- /redist/asio/handler_continuation_hook.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // handler_continuation_hook.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_HANDLER_CONTINUATION_HOOK_HPP 12 | #define ASIO_HANDLER_CONTINUATION_HOOK_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 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | /// Default continuation function for handlers. 25 | /** 26 | * Asynchronous operations may represent a continuation of the asynchronous 27 | * control flow associated with the current handler. The implementation can use 28 | * this knowledge to optimise scheduling of the handler. 29 | * 30 | * Implement asio_handler_is_continuation for your own handlers to indicate 31 | * when a handler represents a continuation. 32 | * 33 | * The default implementation of the continuation hook returns false. 34 | * 35 | * @par Example 36 | * @code 37 | * class my_handler; 38 | * 39 | * bool asio_handler_is_continuation(my_handler* context) 40 | * { 41 | * return true; 42 | * } 43 | * @endcode 44 | */ 45 | inline bool asio_handler_is_continuation(...) 46 | { 47 | return false; 48 | } 49 | 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_HANDLER_CONTINUATION_HOOK_HPP 55 | -------------------------------------------------------------------------------- /redist/asio/handler_type.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // handler_type.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_HANDLER_TYPE_HPP 12 | #define ASIO_HANDLER_TYPE_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 | #include "asio/detail/type_traits.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | /// Default handler type traits provided for all completion token types. 26 | /** 27 | * The handler_type traits class is used for determining the concrete handler 28 | * type to be used for an asynchronous operation. It allows the handler type to 29 | * be determined at the point where the specific completion handler signature 30 | * is known. 31 | * 32 | * This template may be specialised for user-defined completion token types. 33 | */ 34 | template 35 | struct handler_type 36 | { 37 | /// The handler type for the specific signature. 38 | typedef typename conditional< 39 | is_same::type>::value, 40 | decay, 41 | handler_type::type, Signature> 42 | >::type::type type; 43 | }; 44 | 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #define ASIO_HANDLER_TYPE(h, sig) \ 50 | typename handler_type::type 51 | 52 | #endif // ASIO_HANDLER_TYPE_HPP 53 | -------------------------------------------------------------------------------- /redist/asio/impl/executor.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/executor.ipp 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_IMPL_EXECUTOR_IPP 12 | #define ASIO_IMPL_EXECUTOR_IPP 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 | #include "asio/executor.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | bad_executor::bad_executor() ASIO_NOEXCEPT 26 | { 27 | } 28 | 29 | const char* bad_executor::what() const ASIO_NOEXCEPT_OR_NOTHROW 30 | { 31 | return "bad executor"; 32 | } 33 | 34 | } // namespace asio 35 | 36 | #include "asio/detail/pop_options.hpp" 37 | 38 | #endif // ASIO_IMPL_EXECUTOR_IPP 39 | -------------------------------------------------------------------------------- /redist/asio/impl/handler_alloc_hook.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/handler_alloc_hook.ipp 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_IMPL_HANDLER_ALLOC_HOOK_IPP 12 | #define ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP 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 | #include "asio/detail/thread_context.hpp" 20 | #include "asio/detail/thread_info_base.hpp" 21 | #include "asio/handler_alloc_hook.hpp" 22 | 23 | #include "asio/detail/push_options.hpp" 24 | 25 | namespace asio { 26 | 27 | void* asio_handler_allocate(std::size_t size, ...) 28 | { 29 | #if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 30 | return detail::thread_info_base::allocate( 31 | detail::thread_context::thread_call_stack::top(), size); 32 | #else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 33 | return ::operator new(size); 34 | #endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 35 | } 36 | 37 | void asio_handler_deallocate(void* pointer, std::size_t size, ...) 38 | { 39 | #if !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 40 | detail::thread_info_base::deallocate( 41 | detail::thread_context::thread_call_stack::top(), pointer, size); 42 | #else // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 43 | (void)size; 44 | ::operator delete(pointer); 45 | #endif // !defined(ASIO_DISABLE_SMALL_BLOCK_RECYCLING) 46 | } 47 | 48 | } // namespace asio 49 | 50 | #include "asio/detail/pop_options.hpp" 51 | 52 | #endif // ASIO_IMPL_HANDLER_ALLOC_HOOK_IPP 53 | -------------------------------------------------------------------------------- /redist/asio/impl/serial_port_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/serial_port_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_IMPL_SERIAL_PORT_BASE_HPP 13 | #define ASIO_IMPL_SERIAL_PORT_BASE_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/push_options.hpp" 20 | 21 | namespace asio { 22 | 23 | inline serial_port_base::baud_rate::baud_rate(unsigned int rate) 24 | : value_(rate) 25 | { 26 | } 27 | 28 | inline unsigned int serial_port_base::baud_rate::value() const 29 | { 30 | return value_; 31 | } 32 | 33 | inline serial_port_base::flow_control::type 34 | serial_port_base::flow_control::value() const 35 | { 36 | return value_; 37 | } 38 | 39 | inline serial_port_base::parity::type serial_port_base::parity::value() const 40 | { 41 | return value_; 42 | } 43 | 44 | inline serial_port_base::stop_bits::type 45 | serial_port_base::stop_bits::value() const 46 | { 47 | return value_; 48 | } 49 | 50 | inline unsigned int serial_port_base::character_size::value() const 51 | { 52 | return value_; 53 | } 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IMPL_SERIAL_PORT_BASE_HPP 60 | -------------------------------------------------------------------------------- /redist/asio/impl/src.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/src.cpp 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 | #if defined(_MSC_VER) \ 12 | || defined(__BORLANDC__) \ 13 | || defined(__DMC__) 14 | # pragma message ( \ 15 | "This file is deprecated. " \ 16 | "Please #include instead.") 17 | #elif defined(__GNUC__) \ 18 | || defined(__HP_aCC) \ 19 | || defined(__SUNPRO_CC) \ 20 | || defined(__IBMCPP__) 21 | # warning "This file is deprecated." 22 | # warning "Please #include instead." 23 | #endif 24 | 25 | #include "asio/impl/src.hpp" 26 | -------------------------------------------------------------------------------- /redist/asio/impl/system_executor.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/system_executor.ipp 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_IMPL_SYSTEM_EXECUTOR_IPP 12 | #define ASIO_IMPL_SYSTEM_EXECUTOR_IPP 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 | #include "asio/system_executor.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | struct system_executor::thread_function 26 | { 27 | detail::scheduler* scheduler_; 28 | 29 | void operator()() 30 | { 31 | asio::error_code ec; 32 | scheduler_->run(ec); 33 | } 34 | }; 35 | 36 | system_executor::context_impl::context_impl() 37 | : scheduler_(use_service(*this)) 38 | { 39 | scheduler_.work_started(); 40 | 41 | thread_function f = { &scheduler_ }; 42 | std::size_t num_threads = detail::thread::hardware_concurrency() * 2; 43 | threads_.create_threads(f, num_threads ? num_threads : 2); 44 | } 45 | 46 | system_executor::context_impl::~context_impl() 47 | { 48 | scheduler_.work_finished(); 49 | scheduler_.stop(); 50 | threads_.join(); 51 | } 52 | 53 | } // namespace asio 54 | 55 | #include "asio/detail/pop_options.hpp" 56 | 57 | #endif // ASIO_IMPL_SYSTEM_EXECUTOR_IPP 58 | -------------------------------------------------------------------------------- /redist/asio/io_service.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service.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_IO_SERVICE_HPP 12 | #define ASIO_IO_SERVICE_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/io_context.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | #if !defined(ASIO_NO_DEPRECATED) 25 | /// Typedef for backwards compatibility. 26 | typedef io_context io_service; 27 | #endif // !defined(ASIO_NO_DEPRECATED) 28 | 29 | } // namespace asio 30 | 31 | #include "asio/detail/pop_options.hpp" 32 | 33 | #endif // ASIO_IO_SERVICE_HPP 34 | -------------------------------------------------------------------------------- /redist/asio/io_service_strand.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service_strand.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_IO_SERVICE_STRAND_HPP 12 | #define ASIO_IO_SERVICE_STRAND_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/io_context_strand.hpp" 19 | 20 | #endif // ASIO_IO_SERVICE_STRAND_HPP 21 | -------------------------------------------------------------------------------- /redist/asio/ip/bad_address_cast.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/bad_address_cast.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_IP_BAD_ADDRESS_CAST_HPP 12 | #define ASIO_IP_BAD_ADDRESS_CAST_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 | #include 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace ip { 25 | 26 | /// Thrown to indicate a failed address conversion. 27 | class bad_address_cast : public std::bad_cast 28 | { 29 | public: 30 | /// Default constructor. 31 | bad_address_cast() {} 32 | 33 | /// Destructor. 34 | virtual ~bad_address_cast() ASIO_NOEXCEPT_OR_NOTHROW {} 35 | 36 | /// Get the message associated with the exception. 37 | virtual const char* what() const ASIO_NOEXCEPT_OR_NOTHROW 38 | { 39 | return "bad address cast"; 40 | } 41 | }; 42 | 43 | } // namespace ip 44 | } // namespace asio 45 | 46 | #include "asio/detail/pop_options.hpp" 47 | 48 | #endif // ASIO_IP_ADDRESS_HPP 49 | -------------------------------------------------------------------------------- /redist/asio/ip/host_name.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/host_name.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_IP_HOST_NAME_HPP 12 | #define ASIO_IP_HOST_NAME_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 | #include 20 | #include "asio/error_code.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | /// Get the current host name. 28 | ASIO_DECL std::string host_name(); 29 | 30 | /// Get the current host name. 31 | ASIO_DECL std::string host_name(asio::error_code& ec); 32 | 33 | } // namespace ip 34 | } // namespace asio 35 | 36 | #include "asio/detail/pop_options.hpp" 37 | 38 | #if defined(ASIO_HEADER_ONLY) 39 | # include "asio/ip/impl/host_name.ipp" 40 | #endif // defined(ASIO_HEADER_ONLY) 41 | 42 | #endif // ASIO_IP_HOST_NAME_HPP 43 | -------------------------------------------------------------------------------- /redist/asio/ip/impl/address.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address.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_IP_IMPL_ADDRESS_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | #if !defined(ASIO_NO_DEPRECATED) 28 | 29 | inline address address::from_string(const char* str) 30 | { 31 | return asio::ip::make_address(str); 32 | } 33 | 34 | inline address address::from_string( 35 | const char* str, asio::error_code& ec) 36 | { 37 | return asio::ip::make_address(str, ec); 38 | } 39 | 40 | inline address address::from_string(const std::string& str) 41 | { 42 | return asio::ip::make_address(str); 43 | } 44 | 45 | inline address address::from_string( 46 | const std::string& str, asio::error_code& ec) 47 | { 48 | return asio::ip::make_address(str, ec); 49 | } 50 | 51 | #endif // !defined(ASIO_NO_DEPRECATED) 52 | 53 | template 54 | std::basic_ostream& operator<<( 55 | std::basic_ostream& os, const address& addr) 56 | { 57 | return os << addr.to_string().c_str(); 58 | } 59 | 60 | } // namespace ip 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // !defined(ASIO_NO_IOSTREAM) 66 | 67 | #endif // ASIO_IP_IMPL_ADDRESS_HPP 68 | -------------------------------------------------------------------------------- /redist/asio/ip/impl/address_v4.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address_v4.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_IP_IMPL_ADDRESS_V4_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_V4_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | #if !defined(ASIO_NO_DEPRECATED) 28 | 29 | inline address_v4 address_v4::from_string(const char* str) 30 | { 31 | return asio::ip::make_address_v4(str); 32 | } 33 | 34 | inline address_v4 address_v4::from_string( 35 | const char* str, asio::error_code& ec) 36 | { 37 | return asio::ip::make_address_v4(str, ec); 38 | } 39 | 40 | inline address_v4 address_v4::from_string(const std::string& str) 41 | { 42 | return asio::ip::make_address_v4(str); 43 | } 44 | 45 | inline address_v4 address_v4::from_string( 46 | const std::string& str, asio::error_code& ec) 47 | { 48 | return asio::ip::make_address_v4(str, ec); 49 | } 50 | 51 | #endif // !defined(ASIO_NO_DEPRECATED) 52 | 53 | template 54 | std::basic_ostream& operator<<( 55 | std::basic_ostream& os, const address_v4& addr) 56 | { 57 | return os << addr.to_string().c_str(); 58 | } 59 | 60 | } // namespace ip 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // !defined(ASIO_NO_IOSTREAM) 66 | 67 | #endif // ASIO_IP_IMPL_ADDRESS_V4_HPP 68 | -------------------------------------------------------------------------------- /redist/asio/ip/impl/address_v6.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address_v6.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_IP_IMPL_ADDRESS_V6_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_V6_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | #if !defined(ASIO_NO_DEPRECATED) 28 | 29 | inline address_v6 address_v6::from_string(const char* str) 30 | { 31 | return asio::ip::make_address_v6(str); 32 | } 33 | 34 | inline address_v6 address_v6::from_string( 35 | const char* str, asio::error_code& ec) 36 | { 37 | return asio::ip::make_address_v6(str, ec); 38 | } 39 | 40 | inline address_v6 address_v6::from_string(const std::string& str) 41 | { 42 | return asio::ip::make_address_v6(str); 43 | } 44 | 45 | inline address_v6 address_v6::from_string( 46 | const std::string& str, asio::error_code& ec) 47 | { 48 | return asio::ip::make_address_v6(str, ec); 49 | } 50 | 51 | #endif // !defined(ASIO_NO_DEPRECATED) 52 | 53 | template 54 | std::basic_ostream& operator<<( 55 | std::basic_ostream& os, const address_v6& addr) 56 | { 57 | return os << addr.to_string().c_str(); 58 | } 59 | 60 | } // namespace ip 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // !defined(ASIO_NO_IOSTREAM) 66 | 67 | #endif // ASIO_IP_IMPL_ADDRESS_V6_HPP 68 | -------------------------------------------------------------------------------- /redist/asio/ip/impl/basic_endpoint.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/basic_endpoint.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_IP_IMPL_BASIC_ENDPOINT_HPP 12 | #define ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, 30 | const basic_endpoint& endpoint) 31 | { 32 | asio::ip::detail::endpoint tmp_ep(endpoint.address(), endpoint.port()); 33 | return os << tmp_ep.to_string().c_str(); 34 | } 35 | 36 | } // namespace ip 37 | } // namespace asio 38 | 39 | #include "asio/detail/pop_options.hpp" 40 | 41 | #endif // !defined(ASIO_NO_IOSTREAM) 42 | 43 | #endif // ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 44 | -------------------------------------------------------------------------------- /redist/asio/ip/impl/host_name.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/host_name.ipp 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_IP_IMPL_HOST_NAME_IPP 12 | #define ASIO_IP_IMPL_HOST_NAME_IPP 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 | #include "asio/detail/socket_ops.hpp" 20 | #include "asio/detail/throw_error.hpp" 21 | #include "asio/detail/winsock_init.hpp" 22 | #include "asio/ip/host_name.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ip { 28 | 29 | std::string host_name() 30 | { 31 | char name[1024]; 32 | asio::error_code ec; 33 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 34 | { 35 | asio::detail::throw_error(ec); 36 | return std::string(); 37 | } 38 | return std::string(name); 39 | } 40 | 41 | std::string host_name(asio::error_code& ec) 42 | { 43 | char name[1024]; 44 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 45 | return std::string(); 46 | return std::string(name); 47 | } 48 | 49 | } // namespace ip 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_IP_IMPL_HOST_NAME_IPP 55 | -------------------------------------------------------------------------------- /redist/asio/ip/impl/network_v4.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/network_v4.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail 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_IP_IMPL_NETWORK_V4_HPP 13 | #define ASIO_IP_IMPL_NETWORK_V4_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #if !defined(ASIO_NO_IOSTREAM) 20 | 21 | #include "asio/detail/throw_error.hpp" 22 | 23 | #include "asio/detail/push_options.hpp" 24 | 25 | namespace asio { 26 | namespace ip { 27 | 28 | template 29 | std::basic_ostream& operator<<( 30 | std::basic_ostream& os, const network_v4& addr) 31 | { 32 | asio::error_code ec; 33 | std::string s = addr.to_string(ec); 34 | if (ec) 35 | { 36 | if (os.exceptions() & std::basic_ostream::failbit) 37 | asio::detail::throw_error(ec); 38 | else 39 | os.setstate(std::basic_ostream::failbit); 40 | } 41 | else 42 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 43 | os << os.widen(*i); 44 | return os; 45 | } 46 | 47 | } // namespace ip 48 | } // namespace asio 49 | 50 | #include "asio/detail/pop_options.hpp" 51 | 52 | #endif // !defined(ASIO_NO_IOSTREAM) 53 | 54 | #endif // ASIO_IP_IMPL_NETWORK_V4_HPP 55 | -------------------------------------------------------------------------------- /redist/asio/ip/impl/network_v6.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/network_v6.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_IP_IMPL_NETWORK_V6_HPP 12 | #define ASIO_IP_IMPL_NETWORK_V6_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, const network_v6& addr) 30 | { 31 | asio::error_code ec; 32 | std::string s = addr.to_string(ec); 33 | if (ec) 34 | { 35 | if (os.exceptions() & std::basic_ostream::failbit) 36 | asio::detail::throw_error(ec); 37 | else 38 | os.setstate(std::basic_ostream::failbit); 39 | } 40 | else 41 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 42 | os << os.widen(*i); 43 | return os; 44 | } 45 | 46 | } // namespace ip 47 | } // namespace asio 48 | 49 | #include "asio/detail/pop_options.hpp" 50 | 51 | #endif // !defined(ASIO_NO_IOSTREAM) 52 | 53 | #endif // ASIO_IP_IMPL_NETWORK_V6_HPP 54 | -------------------------------------------------------------------------------- /redist/asio/ip/resolver_query_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/resolver_query_base.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_IP_RESOLVER_QUERY_BASE_HPP 12 | #define ASIO_IP_RESOLVER_QUERY_BASE_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 | #include "asio/ip/resolver_base.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace ip { 25 | 26 | /// The resolver_query_base class is used as a base for the 27 | /// basic_resolver_query class templates to provide a common place to define 28 | /// the flag constants. 29 | class resolver_query_base : public resolver_base 30 | { 31 | protected: 32 | /// Protected destructor to prevent deletion through this type. 33 | ~resolver_query_base() 34 | { 35 | } 36 | }; 37 | 38 | } // namespace ip 39 | } // namespace asio 40 | 41 | #include "asio/detail/pop_options.hpp" 42 | 43 | #endif // ASIO_IP_RESOLVER_QUERY_BASE_HPP 44 | -------------------------------------------------------------------------------- /redist/asio/is_executor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_executor.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_IS_EXECUTOR_HPP 12 | #define ASIO_IS_EXECUTOR_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 | #include "asio/detail/type_traits.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | /// The is_executor trait detects whether a type T meets the Executor type 26 | /// requirements. 27 | /** 28 | * Meets the UnaryTypeTrait requirements. The asio library implementation 29 | * provides a definition that is derived from false_type. A program may 30 | * specialise this template to derive from true_type for a user-defined type T 31 | * that meets the Executor requirements. 32 | */ 33 | template 34 | struct is_executor : false_type {}; 35 | 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_IS_EXECUTOR_HPP 41 | -------------------------------------------------------------------------------- /redist/asio/is_read_buffered.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_read_buffered.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_IS_READ_BUFFERED_HPP 12 | #define ASIO_IS_READ_BUFFERED_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 | #include "asio/buffered_read_stream_fwd.hpp" 20 | #include "asio/buffered_stream_fwd.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | 26 | namespace detail { 27 | 28 | template 29 | char is_read_buffered_helper(buffered_stream* s); 30 | 31 | template 32 | char is_read_buffered_helper(buffered_read_stream* s); 33 | 34 | struct is_read_buffered_big_type { char data[10]; }; 35 | is_read_buffered_big_type is_read_buffered_helper(...); 36 | 37 | } // namespace detail 38 | 39 | /// The is_read_buffered class is a traits class that may be used to determine 40 | /// whether a stream type supports buffering of read data. 41 | template 42 | class is_read_buffered 43 | { 44 | public: 45 | #if defined(GENERATING_DOCUMENTATION) 46 | /// The value member is true only if the Stream type supports buffering of 47 | /// read data. 48 | static const bool value; 49 | #else 50 | ASIO_STATIC_CONSTANT(bool, 51 | value = sizeof(detail::is_read_buffered_helper((Stream*)0)) == 1); 52 | #endif 53 | }; 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IS_READ_BUFFERED_HPP 60 | -------------------------------------------------------------------------------- /redist/asio/is_write_buffered.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_write_buffered.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_IS_WRITE_BUFFERED_HPP 12 | #define ASIO_IS_WRITE_BUFFERED_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 | #include "asio/buffered_stream_fwd.hpp" 20 | #include "asio/buffered_write_stream_fwd.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | 26 | namespace detail { 27 | 28 | template 29 | char is_write_buffered_helper(buffered_stream* s); 30 | 31 | template 32 | char is_write_buffered_helper(buffered_write_stream* s); 33 | 34 | struct is_write_buffered_big_type { char data[10]; }; 35 | is_write_buffered_big_type is_write_buffered_helper(...); 36 | 37 | } // namespace detail 38 | 39 | /// The is_write_buffered class is a traits class that may be used to determine 40 | /// whether a stream type supports buffering of written data. 41 | template 42 | class is_write_buffered 43 | { 44 | public: 45 | #if defined(GENERATING_DOCUMENTATION) 46 | /// The value member is true only if the Stream type supports buffering of 47 | /// written data. 48 | static const bool value; 49 | #else 50 | ASIO_STATIC_CONSTANT(bool, 51 | value = sizeof(detail::is_write_buffered_helper((Stream*)0)) == 1); 52 | #endif 53 | }; 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IS_WRITE_BUFFERED_HPP 60 | -------------------------------------------------------------------------------- /redist/asio/posix/stream_descriptor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // posix/stream_descriptor.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_POSIX_STREAM_DESCRIPTOR_HPP 12 | #define ASIO_POSIX_STREAM_DESCRIPTOR_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_HAS_POSIX_STREAM_DESCRIPTOR) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/posix/basic_stream_descriptor.hpp" 24 | 25 | namespace asio { 26 | namespace posix { 27 | 28 | /// Typedef for the typical usage of a stream-oriented descriptor. 29 | typedef basic_stream_descriptor<> stream_descriptor; 30 | 31 | } // namespace posix 32 | } // namespace asio 33 | 34 | #endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) 35 | // || defined(GENERATING_DOCUMENTATION) 36 | 37 | #endif // ASIO_POSIX_STREAM_DESCRIPTOR_HPP 38 | -------------------------------------------------------------------------------- /redist/asio/serial_port.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // serial_port.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.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_SERIAL_PORT_HPP 13 | #define ASIO_SERIAL_PORT_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_HAS_SERIAL_PORT) \ 22 | || defined(GENERATING_DOCUMENTATION) 23 | 24 | #include "asio/basic_serial_port.hpp" 25 | 26 | namespace asio { 27 | 28 | /// Typedef for the typical usage of a serial port. 29 | typedef basic_serial_port<> serial_port; 30 | 31 | } // namespace asio 32 | 33 | #endif // defined(ASIO_HAS_SERIAL_PORT) 34 | // || defined(GENERATING_DOCUMENTATION) 35 | 36 | #endif // ASIO_SERIAL_PORT_HPP 37 | -------------------------------------------------------------------------------- /redist/asio/signal_set.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // signal_set.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_SIGNAL_SET_HPP 12 | #define ASIO_SIGNAL_SET_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 | #include "asio/basic_signal_set.hpp" 20 | 21 | namespace asio { 22 | 23 | /// Typedef for the typical usage of a signal set. 24 | typedef basic_signal_set<> signal_set; 25 | 26 | } // namespace asio 27 | 28 | #endif // ASIO_SIGNAL_SET_HPP 29 | -------------------------------------------------------------------------------- /redist/asio/ssl.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl.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_HPP 12 | #define ASIO_SSL_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/ssl/context.hpp" 19 | #include "asio/ssl/context_base.hpp" 20 | #include "asio/ssl/error.hpp" 21 | #include "asio/ssl/rfc2818_verification.hpp" 22 | #include "asio/ssl/stream.hpp" 23 | #include "asio/ssl/stream_base.hpp" 24 | #include "asio/ssl/verify_context.hpp" 25 | #include "asio/ssl/verify_mode.hpp" 26 | 27 | #endif // ASIO_SSL_HPP 28 | -------------------------------------------------------------------------------- /redist/asio/ssl/detail/handshake_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/handshake_op.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_HANDSHAKE_OP_HPP 12 | #define ASIO_SSL_DETAIL_HANDSHAKE_OP_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 | #include "asio/ssl/detail/engine.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ssl { 26 | namespace detail { 27 | 28 | class handshake_op 29 | { 30 | public: 31 | handshake_op(stream_base::handshake_type type) 32 | : type_(type) 33 | { 34 | } 35 | 36 | engine::want operator()(engine& eng, 37 | asio::error_code& ec, 38 | std::size_t& bytes_transferred) const 39 | { 40 | bytes_transferred = 0; 41 | return eng.handshake(type_, ec); 42 | } 43 | 44 | template 45 | void call_handler(Handler& handler, 46 | const asio::error_code& ec, 47 | const std::size_t&) const 48 | { 49 | handler(ec); 50 | } 51 | 52 | private: 53 | stream_base::handshake_type type_; 54 | }; 55 | 56 | } // namespace detail 57 | } // namespace ssl 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 63 | -------------------------------------------------------------------------------- /redist/asio/ssl/detail/openssl_types.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/openssl_types.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_OPENSSL_TYPES_HPP 12 | #define ASIO_SSL_DETAIL_OPENSSL_TYPES_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 | #include 20 | #include 21 | #if !defined(OPENSSL_NO_ENGINE) 22 | # include 23 | #endif // !defined(OPENSSL_NO_ENGINE) 24 | #include 25 | #include 26 | #include "asio/detail/socket_types.hpp" 27 | 28 | #endif // ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 29 | -------------------------------------------------------------------------------- /redist/asio/ssl/detail/password_callback.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/password_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_PASSWORD_CALLBACK_HPP 12 | #define ASIO_SSL_DETAIL_PASSWORD_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 | #include 21 | #include 22 | #include "asio/ssl/context_base.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | namespace detail { 29 | 30 | class password_callback_base 31 | { 32 | public: 33 | virtual ~password_callback_base() 34 | { 35 | } 36 | 37 | virtual std::string call(std::size_t size, 38 | context_base::password_purpose purpose) = 0; 39 | }; 40 | 41 | template 42 | class password_callback : public password_callback_base 43 | { 44 | public: 45 | explicit password_callback(PasswordCallback callback) 46 | : callback_(callback) 47 | { 48 | } 49 | 50 | virtual std::string call(std::size_t size, 51 | context_base::password_purpose purpose) 52 | { 53 | return callback_(size, purpose); 54 | } 55 | 56 | private: 57 | PasswordCallback callback_; 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace ssl 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // ASIO_SSL_DETAIL_PASSWORD_CALLBACK_HPP 67 | -------------------------------------------------------------------------------- /redist/asio/ssl/detail/shutdown_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/shutdown_op.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_SHUTDOWN_OP_HPP 12 | #define ASIO_SSL_DETAIL_SHUTDOWN_OP_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 | #include "asio/ssl/detail/engine.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ssl { 26 | namespace detail { 27 | 28 | class shutdown_op 29 | { 30 | public: 31 | engine::want operator()(engine& eng, 32 | asio::error_code& ec, 33 | std::size_t& bytes_transferred) const 34 | { 35 | bytes_transferred = 0; 36 | return eng.shutdown(ec); 37 | } 38 | 39 | template 40 | void call_handler(Handler& handler, 41 | const asio::error_code& ec, 42 | const std::size_t&) const 43 | { 44 | handler(ec); 45 | } 46 | }; 47 | 48 | } // namespace detail 49 | } // namespace ssl 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 55 | -------------------------------------------------------------------------------- /redist/asio/ssl/detail/verify_callback.hpp: -------------------------------------------------------------------------------- 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 | #include "asio/ssl/verify_context.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ssl { 26 | namespace detail { 27 | 28 | class verify_callback_base 29 | { 30 | public: 31 | virtual ~verify_callback_base() 32 | { 33 | } 34 | 35 | virtual bool call(bool preverified, verify_context& ctx) = 0; 36 | }; 37 | 38 | template 39 | class verify_callback : public verify_callback_base 40 | { 41 | public: 42 | explicit verify_callback(VerifyCallback callback) 43 | : callback_(callback) 44 | { 45 | } 46 | 47 | virtual bool call(bool preverified, verify_context& ctx) 48 | { 49 | return callback_(preverified, ctx); 50 | } 51 | 52 | private: 53 | VerifyCallback callback_; 54 | }; 55 | 56 | } // namespace detail 57 | } // namespace ssl 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 63 | -------------------------------------------------------------------------------- /redist/asio/ssl/detail/write_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/write_op.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_WRITE_OP_HPP 12 | #define ASIO_SSL_DETAIL_WRITE_OP_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 | #include "asio/detail/buffer_sequence_adapter.hpp" 21 | #include "asio/ssl/detail/engine.hpp" 22 | 23 | #include "asio/detail/push_options.hpp" 24 | 25 | namespace asio { 26 | namespace ssl { 27 | namespace detail { 28 | 29 | template 30 | class write_op 31 | { 32 | public: 33 | write_op(const ConstBufferSequence& buffers) 34 | : buffers_(buffers) 35 | { 36 | } 37 | 38 | engine::want operator()(engine& eng, 39 | asio::error_code& ec, 40 | std::size_t& bytes_transferred) const 41 | { 42 | asio::const_buffer buffer = 43 | asio::detail::buffer_sequence_adapter::first(buffers_); 45 | 46 | return eng.write(buffer, ec, bytes_transferred); 47 | } 48 | 49 | template 50 | void call_handler(Handler& handler, 51 | const asio::error_code& ec, 52 | const std::size_t& bytes_transferred) const 53 | { 54 | handler(ec, bytes_transferred); 55 | } 56 | 57 | private: 58 | ConstBufferSequence buffers_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace ssl 63 | } // namespace asio 64 | 65 | #include "asio/detail/pop_options.hpp" 66 | 67 | #endif // ASIO_SSL_DETAIL_WRITE_OP_HPP 68 | -------------------------------------------------------------------------------- /redist/asio/ssl/error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/error.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_ERROR_HPP 12 | #define ASIO_SSL_ERROR_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 | #include "asio/error_code.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace error { 25 | 26 | enum ssl_errors 27 | { 28 | }; 29 | 30 | extern ASIO_DECL 31 | const asio::error_category& get_ssl_category(); 32 | 33 | static const asio::error_category& ssl_category 34 | = asio::error::get_ssl_category(); 35 | 36 | } // namespace error 37 | } // namespace asio 38 | 39 | #if defined(ASIO_HAS_STD_SYSTEM_ERROR) 40 | namespace std { 41 | 42 | template<> struct is_error_code_enum 43 | { 44 | static const bool value = true; 45 | }; 46 | 47 | } // namespace std 48 | #endif // defined(ASIO_HAS_STD_SYSTEM_ERROR) 49 | 50 | namespace asio { 51 | namespace error { 52 | 53 | inline asio::error_code make_error_code(ssl_errors e) 54 | { 55 | return asio::error_code( 56 | static_cast(e), get_ssl_category()); 57 | } 58 | 59 | } // namespace error 60 | } // namespace asio 61 | 62 | #include "asio/detail/pop_options.hpp" 63 | 64 | #if defined(ASIO_HEADER_ONLY) 65 | # include "asio/ssl/impl/error.ipp" 66 | #endif // defined(ASIO_HEADER_ONLY) 67 | 68 | #endif // ASIO_SSL_ERROR_HPP 69 | -------------------------------------------------------------------------------- /redist/asio/ssl/impl/error.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/impl/error.ipp 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_IMPL_ERROR_IPP 12 | #define ASIO_SSL_IMPL_ERROR_IPP 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 | #include "asio/ssl/error.hpp" 20 | #include "asio/ssl/detail/openssl_init.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace error { 26 | 27 | namespace detail { 28 | 29 | class ssl_category : public asio::error_category 30 | { 31 | public: 32 | const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT 33 | { 34 | return "asio.ssl"; 35 | } 36 | 37 | std::string message(int value) const 38 | { 39 | const char* s = ::ERR_reason_error_string(value); 40 | return s ? s : "asio.ssl error"; 41 | } 42 | }; 43 | 44 | } // namespace detail 45 | 46 | const asio::error_category& get_ssl_category() 47 | { 48 | static detail::ssl_category instance; 49 | return instance; 50 | } 51 | 52 | } // namespace error 53 | } // namespace asio 54 | 55 | #include "asio/detail/pop_options.hpp" 56 | 57 | #endif // ASIO_SSL_IMPL_ERROR_IPP 58 | -------------------------------------------------------------------------------- /redist/asio/ssl/impl/src.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/ssl/src.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_IMPL_SRC_HPP 12 | #define ASIO_SSL_IMPL_SRC_HPP 13 | 14 | #define ASIO_SOURCE 15 | 16 | #include "asio/detail/config.hpp" 17 | 18 | #if defined(ASIO_HEADER_ONLY) 19 | # error Do not compile Asio library source with ASIO_HEADER_ONLY defined 20 | #endif 21 | 22 | #include "asio/ssl/impl/context.ipp" 23 | #include "asio/ssl/impl/error.ipp" 24 | #include "asio/ssl/detail/impl/engine.ipp" 25 | #include "asio/ssl/detail/impl/openssl_init.ipp" 26 | #include "asio/ssl/impl/rfc2818_verification.ipp" 27 | 28 | #endif // ASIO_SSL_IMPL_SRC_HPP 29 | -------------------------------------------------------------------------------- /redist/asio/ssl/stream_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/stream_base.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_STREAM_BASE_HPP 12 | #define ASIO_SSL_STREAM_BASE_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 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace ssl { 24 | 25 | /// The stream_base class is used as a base for the asio::ssl::stream 26 | /// class template so that we have a common place to define various enums. 27 | class stream_base 28 | { 29 | public: 30 | /// Different handshake types. 31 | enum handshake_type 32 | { 33 | /// Perform handshaking as a client. 34 | client, 35 | 36 | /// Perform handshaking as a server. 37 | server 38 | }; 39 | 40 | protected: 41 | /// Protected destructor to prevent deletion through this type. 42 | ~stream_base() 43 | { 44 | } 45 | }; 46 | 47 | } // namespace ssl 48 | } // namespace asio 49 | 50 | #include "asio/detail/pop_options.hpp" 51 | 52 | #endif // ASIO_SSL_STREAM_BASE_HPP 53 | -------------------------------------------------------------------------------- /redist/asio/streambuf.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // streambuf.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_STREAMBUF_HPP 12 | #define ASIO_STREAMBUF_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_NO_IOSTREAM) 21 | 22 | #include "asio/basic_streambuf.hpp" 23 | 24 | namespace asio { 25 | 26 | /// Typedef for the typical usage of basic_streambuf. 27 | typedef basic_streambuf<> streambuf; 28 | 29 | } // namespace asio 30 | 31 | #endif // !defined(ASIO_NO_IOSTREAM) 32 | 33 | #endif // ASIO_STREAMBUF_HPP 34 | -------------------------------------------------------------------------------- /redist/asio/ts/buffer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/buffer.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_TS_BUFFER_HPP 12 | #define ASIO_TS_BUFFER_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/buffer.hpp" 19 | #include "asio/streambuf.hpp" 20 | #include "asio/completion_condition.hpp" 21 | #include "asio/read.hpp" 22 | #include "asio/write.hpp" 23 | #include "asio/read_until.hpp" 24 | 25 | #endif // ASIO_TS_BUFFER_HPP 26 | -------------------------------------------------------------------------------- /redist/asio/ts/executor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/executor.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_TS_EXECUTOR_HPP 12 | #define ASIO_TS_EXECUTOR_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/handler_type.hpp" 19 | #include "asio/async_result.hpp" 20 | #include "asio/associated_allocator.hpp" 21 | #include "asio/execution_context.hpp" 22 | #include "asio/is_executor.hpp" 23 | #include "asio/associated_executor.hpp" 24 | #include "asio/bind_executor.hpp" 25 | #include "asio/executor_work_guard.hpp" 26 | #include "asio/system_executor.hpp" 27 | #include "asio/executor.hpp" 28 | #include "asio/dispatch.hpp" 29 | #include "asio/post.hpp" 30 | #include "asio/defer.hpp" 31 | #include "asio/strand.hpp" 32 | #include "asio/package.hpp" 33 | #include "asio/use_future.hpp" 34 | 35 | #endif // ASIO_TS_EXECUTOR_HPP 36 | -------------------------------------------------------------------------------- /redist/asio/ts/internet.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/internet.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_TS_INTERNET_HPP 12 | #define ASIO_TS_INTERNET_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/ip/address.hpp" 19 | #include "asio/ip/address_v4.hpp" 20 | #include "asio/ip/address_v4_iterator.hpp" 21 | #include "asio/ip/address_v4_range.hpp" 22 | #include "asio/ip/address_v6.hpp" 23 | #include "asio/ip/address_v6_iterator.hpp" 24 | #include "asio/ip/address_v6_range.hpp" 25 | #include "asio/ip/bad_address_cast.hpp" 26 | #include "asio/ip/basic_endpoint.hpp" 27 | #include "asio/ip/basic_resolver_query.hpp" 28 | #include "asio/ip/basic_resolver_entry.hpp" 29 | #include "asio/ip/basic_resolver_iterator.hpp" 30 | #include "asio/ip/basic_resolver.hpp" 31 | #include "asio/ip/host_name.hpp" 32 | #include "asio/ip/tcp.hpp" 33 | #include "asio/ip/udp.hpp" 34 | #include "asio/ip/v6_only.hpp" 35 | #include "asio/ip/unicast.hpp" 36 | #include "asio/ip/multicast.hpp" 37 | 38 | #endif // ASIO_TS_INTERNET_HPP 39 | -------------------------------------------------------------------------------- /redist/asio/ts/io_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/io_context.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_TS_IO_CONTEXT_HPP 12 | #define ASIO_TS_IO_CONTEXT_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/io_context.hpp" 19 | 20 | #endif // ASIO_TS_IO_CONTEXT_HPP 21 | -------------------------------------------------------------------------------- /redist/asio/ts/networking.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/networking.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_TS_NETWORKING_HPP 12 | #define ASIO_TS_NETWORKING_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/ts/executor.hpp" 19 | #include "asio/ts/io_context.hpp" 20 | #include "asio/ts/timer.hpp" 21 | #include "asio/ts/buffer.hpp" 22 | #include "asio/ts/socket.hpp" 23 | #include "asio/ts/internet.hpp" 24 | 25 | #endif // ASIO_TS_NETWORKING_HPP 26 | -------------------------------------------------------------------------------- /redist/asio/ts/socket.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/socket.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_TS_SOCKET_HPP 12 | #define ASIO_TS_SOCKET_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/socket_base.hpp" 19 | #include "asio/basic_socket.hpp" 20 | #include "asio/basic_datagram_socket.hpp" 21 | #include "asio/basic_stream_socket.hpp" 22 | #include "asio/basic_socket_acceptor.hpp" 23 | #include "asio/basic_socket_streambuf.hpp" 24 | #include "asio/basic_socket_iostream.hpp" 25 | #include "asio/connect.hpp" 26 | 27 | #endif // ASIO_TS_SOCKET_HPP 28 | -------------------------------------------------------------------------------- /redist/asio/ts/thread_pool.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/thread_pool.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_TS_THREAD_POOL_HPP 12 | #define ASIO_TS_THREAD_POOL_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/thread_pool.hpp" 19 | 20 | #endif // ASIO_TS_THREAD_POOL_HPP 21 | -------------------------------------------------------------------------------- /redist/asio/ts/timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/timer.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_TS_TIMER_HPP 12 | #define ASIO_TS_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include 19 | 20 | #include "asio/wait_traits.hpp" 21 | #include "asio/basic_waitable_timer.hpp" 22 | #include "asio/system_timer.hpp" 23 | #include "asio/steady_timer.hpp" 24 | #include "asio/high_resolution_timer.hpp" 25 | 26 | #endif // ASIO_TS_TIMER_HPP 27 | -------------------------------------------------------------------------------- /redist/asio/unyield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // unyield.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 | #ifdef reenter 12 | # undef reenter 13 | #endif 14 | 15 | #ifdef yield 16 | # undef yield 17 | #endif 18 | 19 | #ifdef fork 20 | # undef fork 21 | #endif 22 | -------------------------------------------------------------------------------- /redist/asio/version.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // version.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_VERSION_HPP 12 | #define ASIO_VERSION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | // ASIO_VERSION % 100 is the sub-minor version 19 | // ASIO_VERSION / 100 % 1000 is the minor version 20 | // ASIO_VERSION / 100000 is the major version 21 | #define ASIO_VERSION 101100 // 1.11.0 22 | 23 | #endif // ASIO_VERSION_HPP 24 | -------------------------------------------------------------------------------- /redist/asio/wait_traits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // wait_traits.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_WAIT_TRAITS_HPP 12 | #define ASIO_WAIT_TRAITS_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/push_options.hpp" 19 | 20 | namespace asio { 21 | 22 | /// Wait traits suitable for use with the basic_waitable_timer class template. 23 | template 24 | struct wait_traits 25 | { 26 | /// Convert a clock duration into a duration used for waiting. 27 | /** 28 | * @returns @c d. 29 | */ 30 | static typename Clock::duration to_wait_duration( 31 | const typename Clock::duration& d) 32 | { 33 | return d; 34 | } 35 | 36 | /// Convert a clock duration into a duration used for waiting. 37 | /** 38 | * @returns @c d. 39 | */ 40 | static typename Clock::duration to_wait_duration( 41 | const typename Clock::time_point& t) 42 | { 43 | typename Clock::time_point now = Clock::now(); 44 | if (now + (Clock::duration::max)() < t) 45 | return (Clock::duration::max)(); 46 | if (now + (Clock::duration::min)() > t) 47 | return (Clock::duration::min)(); 48 | return t - now; 49 | } 50 | }; 51 | 52 | } // namespace asio 53 | 54 | #include "asio/detail/pop_options.hpp" 55 | 56 | #endif // ASIO_WAIT_TRAITS_HPP 57 | -------------------------------------------------------------------------------- /redist/asio/windows/object_handle.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // windows/object_handle.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2011 Boris Schaeling (boris@highscore.de) 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_WINDOWS_OBJECT_HANDLE_HPP 13 | #define ASIO_WINDOWS_OBJECT_HANDLE_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_HAS_WINDOWS_OBJECT_HANDLE) \ 22 | || defined(GENERATING_DOCUMENTATION) 23 | 24 | #include "asio/windows/basic_object_handle.hpp" 25 | 26 | namespace asio { 27 | namespace windows { 28 | 29 | /// Typedef for the typical usage of an object handle. 30 | typedef basic_object_handle<> object_handle; 31 | 32 | } // namespace windows 33 | } // namespace asio 34 | 35 | #endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) 36 | // || defined(GENERATING_DOCUMENTATION) 37 | 38 | #endif // ASIO_WINDOWS_OBJECT_HANDLE_HPP 39 | -------------------------------------------------------------------------------- /redist/asio/windows/random_access_handle.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // windows/random_access_handle.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_WINDOWS_RANDOM_ACCESS_HANDLE_HPP 12 | #define ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_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_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/windows/basic_random_access_handle.hpp" 24 | 25 | namespace asio { 26 | namespace windows { 27 | 28 | /// Typedef for the typical usage of a random-access handle. 29 | typedef basic_random_access_handle<> random_access_handle; 30 | 31 | } // namespace windows 32 | } // namespace asio 33 | 34 | #endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) 35 | // || defined(GENERATING_DOCUMENTATION) 36 | 37 | #endif // ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_HPP 38 | -------------------------------------------------------------------------------- /redist/asio/windows/stream_handle.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // windows/stream_handle.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_WINDOWS_STREAM_HANDLE_HPP 12 | #define ASIO_WINDOWS_STREAM_HANDLE_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_HAS_WINDOWS_STREAM_HANDLE) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/windows/basic_stream_handle.hpp" 24 | 25 | namespace asio { 26 | namespace windows { 27 | 28 | /// Typedef for the typical usage of a stream-oriented handle. 29 | typedef basic_stream_handle<> stream_handle; 30 | 31 | } // namespace windows 32 | } // namespace asio 33 | 34 | #endif // defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) 35 | // || defined(GENERATING_DOCUMENTATION) 36 | 37 | #endif // ASIO_WINDOWS_STREAM_HANDLE_HPP 38 | -------------------------------------------------------------------------------- /redist/asio/yield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // yield.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 | #include "coroutine.hpp" 12 | 13 | #ifndef reenter 14 | # define reenter(c) ASIO_CORO_REENTER(c) 15 | #endif 16 | 17 | #ifndef yield 18 | # define yield ASIO_CORO_YIELD 19 | #endif 20 | 21 | #ifndef fork 22 | # define fork ASIO_CORO_FORK 23 | #endif 24 | -------------------------------------------------------------------------------- /redist/threadbarrier.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2002-2003 2 | // David Moore, William E. Kempf 3 | // Copyright (C) 2007-8 Anthony Williams 4 | // Copyright (C) 2015 James Weaver 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 7 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 | 9 | /* Modified version of boost::barrier designed to work with std::thread */ 10 | 11 | #ifndef __THREAD_BARRIER_HPP__ 12 | #define __THREAD_BARRIER_HPP__ 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | class barrier 20 | { 21 | public: 22 | barrier(unsigned int count) 23 | : m_threshold(count), m_count(count), m_generation(0), m_unblocked(false) 24 | { 25 | if (count == 0) 26 | throw std::invalid_argument("barrier constructor: count cannot be zero."); 27 | } 28 | 29 | bool wait() 30 | { 31 | std::unique_lock lock(m_mutex); 32 | unsigned int gen = m_generation; 33 | 34 | if (m_unblocked) 35 | return false; 36 | 37 | if (--m_count == 0) 38 | { 39 | m_generation++; 40 | m_count = m_threshold; 41 | m_cond.notify_all(); 42 | return true; 43 | } 44 | 45 | while (!m_unblocked && gen == m_generation) 46 | m_cond.wait(lock); 47 | return false; 48 | } 49 | 50 | void unblock() 51 | { 52 | std::unique_lock lock(m_mutex); 53 | 54 | m_unblocked = true; 55 | m_cond.notify_all(); 56 | } 57 | 58 | private: 59 | std::mutex m_mutex; 60 | std::condition_variable m_cond; 61 | unsigned int m_threshold; 62 | unsigned int m_count; 63 | unsigned int m_generation; 64 | 65 | bool m_unblocked; 66 | }; 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /testprogs/COPYING: -------------------------------------------------------------------------------- 1 | The files testprogs/tclap/* are distributed under the MIT 2 | license as explained at the start of those files. 3 | 4 | All other files are distributed under the GPL as described in the 5 | parent directory. 6 | -------------------------------------------------------------------------------- /testprogs/Makefile.am: -------------------------------------------------------------------------------- 1 | if IS_LINUX 2 | linux_only_progs = 3 | else 4 | linux_only_progs = 5 | endif 6 | 7 | noinst_PROGRAMS = vc2decode $(linux_only_progs) 8 | 9 | AM_CPPFLAGS = $(VC2HQDECODE_CPPFLAGS) 10 | 11 | AM_CFLAGS = $(VC2HQDECODE_CFLAGS) 12 | 13 | AM_CXXFLAGS = $(VC2HQDECODE_CXXFLAGS) 14 | 15 | AM_LDFLAGS = $(VC2HQDECODE_LDFLAGS) 16 | 17 | LDADD = $(VC2HQDECODE_LIBS) 18 | 19 | vc2decode_SOURCES = \ 20 | vc2decode.cpp 21 | 22 | noinst_HEADERS = \ 23 | tclap/ArgException.h \ 24 | tclap/CmdLine.h \ 25 | tclap/Constraint.h \ 26 | tclap/IgnoreRestVisitor.h \ 27 | tclap/OptionalUnlabeledTracker.h \ 28 | tclap/SwitchArg.h \ 29 | tclap/ValueArg.h \ 30 | tclap/Visitor.h \ 31 | tclap/Arg.h \ 32 | tclap/CmdLineInterface.h \ 33 | tclap/DocBookOutput.h \ 34 | tclap/MultiArg.h \ 35 | tclap/StandardTraits.h \ 36 | tclap/UnlabeledMultiArg.h \ 37 | tclap/ValuesConstraint.h \ 38 | tclap/XorHandler.h \ 39 | tclap/ArgTraits.h \ 40 | tclap/CmdLineOutput.h \ 41 | tclap/HelpVisitor.h \ 42 | tclap/MultiSwitchArg.h \ 43 | tclap/StdOutput.h \ 44 | tclap/UnlabeledValueArg.h \ 45 | tclap/VersionVisitor.h \ 46 | tclap/ZshCompletionOutput.h 47 | -------------------------------------------------------------------------------- /testprogs/tclap/COPYING: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright (c) 2003 Michael E. Smoot 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without restriction, 8 | including without limitation the rights to use, copy, modify, merge, 9 | publish, distribute, sublicense, and/or sell copies of the Software, 10 | and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | 25 | 26 | -------------------------------------------------------------------------------- /testprogs/tclap/IgnoreRestVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: IgnoreRestVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in this directory for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_IGNORE_REST_VISITOR_H 24 | #define TCLAP_IGNORE_REST_VISITOR_H 25 | 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Vistor that tells the CmdLine to begin ignoring arguments after 33 | * this one is parsed. 34 | */ 35 | class IgnoreRestVisitor: public Visitor 36 | { 37 | public: 38 | 39 | /** 40 | * Constructor. 41 | */ 42 | IgnoreRestVisitor() : Visitor() {} 43 | 44 | /** 45 | * Sets Arg::_ignoreRest. 46 | */ 47 | void visit() { Arg::beginIgnoring(); } 48 | }; 49 | 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /testprogs/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Visitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in this directory for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_VISITOR_H 24 | #define TCLAP_VISITOR_H 25 | 26 | namespace TCLAP { 27 | 28 | /** 29 | * A base class that defines the interface for visitors. 30 | */ 31 | class Visitor 32 | { 33 | public: 34 | 35 | /** 36 | * Constructor. Does nothing. 37 | */ 38 | Visitor() { } 39 | 40 | /** 41 | * Destructor. Does nothing. 42 | */ 43 | virtual ~Visitor() { } 44 | 45 | /** 46 | * Does nothing. Should be overridden by child. 47 | */ 48 | virtual void visit() { } 49 | }; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /testsuite/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS = vc2decodertest 2 | 3 | TESTS = vc2decodertest 4 | 5 | AM_CFLAGS = $(VC2HQDECODE_CFLAGS) 6 | 7 | AM_CPPFLAGS = $(VC2HQDECODE_CPPFLAGS) 8 | 9 | AM_CXXFLAGS = $(VC2HQDECODE_CXXFLAGS) \ 10 | -I$(top_srcdir)/vc2hqdecode \ 11 | -I$(top_srcdir)/vc2inversetransform_c/ 12 | 13 | AM_LDFLAGS = $(VC2HQDECODE_LDFLAGS) 14 | 15 | LDADD = $(top_builddir)/vc2inversetransform_sse4_2/libvc2invtransform-sse4-2.la \ 16 | $(top_builddir)/vc2inversetransform_c/libvc2invtransform-c.la \ 17 | $(top_builddir)/vc2hqdecode/libvc2hqdecode_0.1_la-quantmatrix.lo \ 18 | $(top_builddir)/vc2hqdecode/libvc2hqdecode_0.1_la-logger.lo 19 | 20 | vc2decodertest_SOURCES = \ 21 | tests.cpp \ 22 | test_invtransform.cpp \ 23 | test_dequantise.cpp \ 24 | randomiser.cpp 25 | 26 | noinst_HEADERS = tests.hpp randomiser.hpp 27 | -------------------------------------------------------------------------------- /testsuite/randomiser.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * randomiser.hpp : generate some random input data 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #ifndef __RANDOMISER_HPP__ 27 | #define __RANDOMISER_HPP__ 28 | 29 | bool randomiser(char *out, int length); 30 | 31 | #endif /* __RANDOMISER_HPP__ */ 32 | -------------------------------------------------------------------------------- /testsuite/tests.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * tests.hpp : Test everything 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #ifndef __TESTS_HPP__ 27 | #define __TESTS_HPP__ 28 | 29 | #endif /* __TESTS_HPP__ */ 30 | -------------------------------------------------------------------------------- /tools/Makefile.am: -------------------------------------------------------------------------------- 1 | dist_bin_SCRIPTS = vc2streamdebugger 2 | 3 | EXTRADIST = psnr_calculator viddiff 4 | -------------------------------------------------------------------------------- /tools/viddiff: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | def DIFF(l, *args): 4 | return [ (args[0][x] - args[1][x])/2 + 0x8000 for x in range(0, l*2) ] 5 | 6 | if __name__ == "__main__": 7 | import argparse 8 | import struct 9 | 10 | parser = argparse.ArgumentParser(description='VC2 Stream debugging tool.') 11 | parser.add_argument('infilename', metavar='filename', type=str, nargs=2, 12 | help='input 16p2 files') 13 | parser.add_argument('outfilename', metavar='outfilename', type=str, default="diff.16p2", nargs='?', 14 | help='input 16p2 files') 15 | 16 | parser.add_argument('--width', metavar='width', type=int, default=1920, 17 | help='image width (default: 1920)') 18 | parser.add_argument('--height', metavar='height', type=int, default=1080, 19 | help='image height (default: 1080)') 20 | 21 | args = parser.parse_args() 22 | 23 | f = [ open(x, "r") for x in args.infilename ] 24 | data = [ x.read() for x in f ] 25 | data = [ struct.unpack(">" + ("H"*(len(x)/2)), x) for x in data ] 26 | 27 | diff = DIFF(args.width*args.height, *data) 28 | f = open(args.outfilename, "w") 29 | 30 | f.write(struct.pack(">" + ("H"*(len(diff))), *diff)) 31 | -------------------------------------------------------------------------------- /vc2hqdecode-uninstalled.pc.in: -------------------------------------------------------------------------------- 1 | prefix= 2 | exec_prefix= 3 | libdir=${pcfiledir}/vc2hqdecode/ 4 | includedir=${pcfiledir}/ 5 | 6 | Name: vc2hqdecode-@VC2HQDECODE_MAJORMINOR@ uninstalled 7 | Description: Decode Library for VC2 High Quality Profile 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lvc2hqdecode-@VC2HQDECODE_MAJORMINOR@ 10 | Cflags: -I${includedir} -I@srcdir@ 11 | -------------------------------------------------------------------------------- /vc2hqdecode.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@/vc2hqdecode-@VC2HQDECODE_MAJORMINOR@ 5 | toolsdir=${exec_prefix}/bin 6 | 7 | 8 | Name: vc2hqdecode-@VC2HQDECODE_MAJORMINOR@ 9 | Description: Decode Library for VC2 High Quality Profile 10 | Requires.private: @VC2HQDECODE_PKG_DEPS@ 11 | Version: @VERSION@ 12 | Libs: -L${libdir} -lvc2hqdecode-@VC2HQDECODE_MAJORMINOR@ 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /vc2hqdecode/Makefile.am: -------------------------------------------------------------------------------- 1 | configfile_DATA = 2 | 3 | pkgincludedir = $(includedir)/vc2hqdecode-@VC2HQDECODE_MAJORMINOR@/vc2hqdecode 4 | 5 | lib_LTLIBRARIES = libvc2hqdecode-@VC2HQDECODE_MAJORMINOR@.la 6 | 7 | libvc2hqdecode_@VC2HQDECODE_MAJORMINOR@_la_LIBADD = \ 8 | $(NUMA_LIBS) \ 9 | $(top_builddir)/vc2inversetransform_c/libvc2invtransform-c.la \ 10 | $(top_builddir)/vc2inversetransform_sse4_2/libvc2invtransform-sse4-2.la 11 | 12 | libvc2hqdecode_@VC2HQDECODE_MAJORMINOR@_la_LDFLAGS = \ 13 | -no-undefined \ 14 | -version-info $(VC2HQDECODE_LIBVERSION) \ 15 | $(VC2HQDECODE_LDFLAGS) \ 16 | -lpthread \ 17 | -export-symbols-regex 'vc2decode' \ 18 | -lgcc 19 | 20 | libvc2hqdecode_@VC2HQDECODE_MAJORMINOR@_la_CPPFLAGS = $(VC2HQDECODE_CPPFLAGS) \ 21 | $(REDIST_CPPFLAGS) 22 | 23 | libvc2hqdecode_@VC2HQDECODE_MAJORMINOR@_la_CXXFLAGS = $(VC2HQDECODE_CXXFLAGS) \ 24 | $(REDIST_CXXFLAGS) 25 | 26 | libvc2hqdecode_@VC2HQDECODE_MAJORMINOR@_la_SOURCES = vc2hqdecode.cpp \ 27 | logger.cpp \ 28 | VC2Decoder.cpp \ 29 | quantmatrix.cpp \ 30 | stream.cpp 31 | 32 | pkginclude_HEADERS = \ 33 | vc2hqdecode.h \ 34 | vc2hqdecodestrings.h 35 | 36 | noinst_HEADERS = VC2Decoder.hpp \ 37 | lut.hpp \ 38 | datastructures.hpp \ 39 | invtransform.hpp \ 40 | vlc.hpp \ 41 | dequantise.hpp \ 42 | VideoFormat.hpp \ 43 | logger.hpp \ 44 | ThreadPool.hpp \ 45 | stream.hpp \ 46 | internal.h \ 47 | thread_group.hpp \ 48 | platform_variant.hpp 49 | 50 | nodist_pkginclude_HEADERS = vc2hqdecode-stdint.h 51 | 52 | DISTCLEANFILES = vc2hqdecode-stdint.h 53 | 54 | EXTRA_DIST = 55 | -------------------------------------------------------------------------------- /vc2hqdecode/debug.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * debug.hpp : controlable debug features 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #ifndef __DEBUG_HPP__ 27 | #define __DEBUG_HPP__ 28 | 29 | #include 30 | #include "logger.hpp" 31 | 32 | //#define DEBUG_OP_LENGTHS 33 | //#define DEBUG_OP_TRANSFORMED 34 | //#define DEBUG_P_BLOCK 35 | //#define DEBUG_OP_SLICESIZES 36 | //#define DEBUG_ONE_JOB 37 | 38 | #ifdef DEBUG_P_BLOCK 39 | const int DEBUG_P_COMP = 0; 40 | const int DEBUG_P_BLOCK_Y = 3; 41 | const int DEBUG_P_BLOCK_X = 30; 42 | #endif 43 | 44 | #endif /* __DEBUG_HPP__ */ 45 | -------------------------------------------------------------------------------- /vc2hqdecode/logger.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * logger.hpp : logging tools 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #ifndef __VC2ENCODER_LOGGER_HPP__ 27 | #define __VC2ENCODER_LOGGER_HPP__ 28 | 29 | #include 30 | 31 | #define LOG_ERROR 0 32 | #define LOG_WARN 1 33 | #define LOG_INFO 2 34 | #define LOG_DEBUG 3 35 | 36 | void writelog(int level, const char *fmt, ...); 37 | 38 | #endif /* __VC2ENCODER_LOGGER_HPP__ */ 39 | -------------------------------------------------------------------------------- /vc2hqdecode/stream.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * stream.hpp : VC2 Stream syntax processing 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #ifndef __STREAM_HPP__ 27 | #define __STREAM_HPP__ 28 | 29 | #include "internal.h" 30 | 31 | VC2DecoderParseSegment parse_info(char *data, const char *end); 32 | 33 | #endif /* __STREAM_HPP__ */ 34 | -------------------------------------------------------------------------------- /vc2inversetransform_c/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libvc2invtransform-c.la 2 | 3 | libvc2invtransform_c_la_LDFLAGS = \ 4 | -no-undefined \ 5 | $(VC2HQDECODE_LDFLAGS) \ 6 | -lpthread 7 | 8 | libvc2invtransform_c_la_CPPFLAGS = $(VC2HQDECODE_CPPFLAGS) \ 9 | -I$(top_srcdir)/vc2hqdecode 10 | 11 | libvc2invtransform_c_la_CXXFLAGS = $(VC2HQDECODE_CXXFLAGS) 12 | 13 | libvc2invtransform_c_la_SOURCES = \ 14 | invtransform_c.cpp \ 15 | dequantise_c.cpp \ 16 | vlc_c.cpp 17 | 18 | noinst_HEADERS = \ 19 | vlc_c.hpp \ 20 | dequantise_c.hpp \ 21 | invtransform_c.hpp \ 22 | legall_invtransform.hpp \ 23 | haar_invtransform.hpp \ 24 | deslauriers_dubuc_9_7_invtransform.hpp \ 25 | deslauriers_dubuc_13_7_invtransform.hpp \ 26 | fidelity_invtransform.hpp \ 27 | $(top_srcdir)/common/attributes.h 28 | -------------------------------------------------------------------------------- /vc2inversetransform_c/dequantise_c.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * dequantise_c.hpp : dequantiser header file: plain C++ version 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #ifndef __DEQUANTISE_C_CPP__ 27 | #define __DEQUANTISE_C_CPP__ 28 | 29 | #include "common/attributes.h" 30 | 31 | #include "dequantise.hpp" 32 | 33 | VC2EXPORT DequantiseFunction getDequantiseFunction_c(int slice_width, 34 | int slice_height, 35 | int depth, 36 | int sample_size); 37 | #endif /* __DEQUANTISE_C_CPP__ */ 38 | -------------------------------------------------------------------------------- /vc2inversetransform_c/vlc_c.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * vlc_c.hpp : Variable Length Decoding header: plain C++ version 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #ifndef __VLC_C_HPP__ 27 | #define __VLC_C_HPP__ 28 | 29 | #include "vlc.hpp" 30 | 31 | SliceDecoderFunc get_slice_decoder_c(int sample_size); 32 | 33 | 34 | 35 | #endif /* __VLC_C_HPP__ */ 36 | -------------------------------------------------------------------------------- /vc2inversetransform_sse4_2/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES = libvc2invtransform-sse4-2.la 2 | 3 | libvc2invtransform_sse4_2_la_LDFLAGS = \ 4 | -no-undefined \ 5 | $(VC2HQDECODE_LDFLAGS) \ 6 | -lpthread 7 | 8 | libvc2invtransform_sse4_2_la_CPPFLAGS = $(VC2HQDECODE_CPPFLAGS) \ 9 | -I$(top_srcdir)/vc2hqdecode 10 | 11 | libvc2invtransform_sse4_2_la_CXXFLAGS = $(VC2HQDECODE_CXXFLAGS) \ 12 | $(SSE4_2_FLAGS) 13 | 14 | libvc2invtransform_sse4_2_la_SOURCES = \ 15 | invtransform_sse4_2.cpp \ 16 | dequantise_sse4_2.cpp \ 17 | vlc_sse4_2.cpp 18 | 19 | noinst_HEADERS = \ 20 | dequantise_sse4_2.hpp \ 21 | invtransform_sse4_2.hpp \ 22 | legall_invtransform.hpp \ 23 | haar_invtransform.hpp \ 24 | vlc_sse4_2.hpp \ 25 | $(top_srcdir)/common/attributes.h 26 | -------------------------------------------------------------------------------- /vc2inversetransform_sse4_2/vlc_sse4_2.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * vlc_sse4_2.hpp : Variable Length Decoding header: SSE4.2 version 3 | ***************************************************************************** 4 | * Copyright (C) 2014-2015 BBC 5 | * 6 | * Authors: James P. Weaver 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. 21 | * 22 | * This program is also available under a commercial proprietary license. 23 | * For more information, contact us at ipstudio@bbc.co.uk. 24 | *****************************************************************************/ 25 | 26 | #ifndef __VLC_SSE4_2_HPP__ 27 | #define __VLC_SSE4_2_HPP__ 28 | 29 | #include "vlc.hpp" 30 | 31 | SliceDecoderFunc get_slice_decoder_sse4_2(int sample_size); 32 | 33 | 34 | 35 | #endif /* __VLC_SSE4_2_HPP__ */ 36 | --------------------------------------------------------------------------------