From f0c3eb8915b2c34162a4d9cc92de0eef918ef988 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 19 Dec 2019 22:02:26 +0100 Subject: [PATCH] docs improvement --- Makefile.am | 2 ++ docs/gen_reference_doc.py | 14 +++++++++++--- docs/makefile | 2 ++ include/libtorrent/disk_io_job.hpp | 1 + include/libtorrent/natpmp.hpp | 2 +- include/libtorrent/storage_defs.hpp | 2 +- include/libtorrent/torrent.hpp | 1 + include/libtorrent/torrent_handle.hpp | 2 +- 8 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 053d69c6a..b121475b2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -96,10 +96,12 @@ DOCS_PAGES = \ docs/reference-Core.html \ docs/reference-Create_Torrents.html \ docs/reference-Custom_Storage.html \ + docs/reference-DHT.html \ docs/reference-ed25519.html \ docs/reference-Error_Codes.html \ docs/reference-Filter.html \ docs/reference-Plugins.html \ + docs/reference-Session.html \ docs/reference-Settings.html \ docs/reference-Storage.html \ docs/reference-Utility.html \ diff --git a/docs/gen_reference_doc.py b/docs/gen_reference_doc.py index 2afd5a906..fe9dbedba 100644 --- a/docs/gen_reference_doc.py +++ b/docs/gen_reference_doc.py @@ -75,9 +75,12 @@ anon_index = 0 category_mapping = { 'ed25519.hpp': 'ed25519', - 'session.hpp': 'Core', + 'session.hpp': 'Session', + 'session_handle.hpp': 'Session', 'add_torrent_params.hpp': 'Core', - 'session_status.hpp': 'Core', + 'session_status.hpp': 'Session', + 'session_stats.hpp': 'Session', + 'session_params.hpp': 'Session', 'error_code.hpp': 'Error Codes', 'storage.hpp': 'Custom Storage', 'storage_defs.hpp': 'Storage', @@ -127,7 +130,8 @@ def categorize_symbol(name, filename): if name.endswith('_category()') \ or name.endswith('_error_code') \ - or name.endswith('error_code_enum'): + or name.endswith('error_code_enum') \ + or name.endswith('errors'): return 'Error Codes' if name in category_fun_mapping: @@ -136,6 +140,9 @@ def categorize_symbol(name, filename): if f in category_mapping: return category_mapping[f] + if filename.startswith('libtorrent/kademlia/'): + return 'DHT' + return 'Core' @@ -1197,6 +1204,7 @@ def render_enums(out, enums, print_declared_reference, header_level): sections = \ { 'Core': 0, + 'DHT': 0, 'Session': 0, 'Settings': 0, diff --git a/docs/makefile b/docs/makefile index 89c0f3e03..0f3510a2f 100644 --- a/docs/makefile +++ b/docs/makefile @@ -18,6 +18,8 @@ REFERENCE_TARGETS = \ upgrade_to_1.2-ref \ reference \ reference-Core \ + reference-DHT \ + reference-Session \ reference-Plugins \ reference-Create_Torrents \ reference-Error_Codes \ diff --git a/include/libtorrent/disk_io_job.hpp b/include/libtorrent/disk_io_job.hpp index c3c9dc477..40accd884 100644 --- a/include/libtorrent/disk_io_job.hpp +++ b/include/libtorrent/disk_io_job.hpp @@ -56,6 +56,7 @@ namespace libtorrent { struct cached_piece_entry; + // internal enum class job_action_t : std::uint8_t { read diff --git a/include/libtorrent/natpmp.hpp b/include/libtorrent/natpmp.hpp index bd7d4bf17..deb1d4cbc 100644 --- a/include/libtorrent/natpmp.hpp +++ b/include/libtorrent/natpmp.hpp @@ -69,7 +69,7 @@ namespace libtorrent { boost::system::error_code make_error_code(pcp_errors e); } - boost::system::error_category& pcp_category(); + TORRENT_EXPORT boost::system::error_category& pcp_category(); } namespace boost { namespace system { diff --git a/include/libtorrent/storage_defs.hpp b/include/libtorrent/storage_defs.hpp index 18a61454a..6c1bc0436 100644 --- a/include/libtorrent/storage_defs.hpp +++ b/include/libtorrent/storage_defs.hpp @@ -61,9 +61,9 @@ namespace libtorrent { storage_mode_sparse }; + // return values from check_fastresume, and move_storage enum class status_t : std::uint8_t { - // return values from check_fastresume, and move_storage no_error, fatal_disk_error, need_full_check, diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 444e1dc1b..d62f8b568 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -105,6 +105,7 @@ namespace libtorrent { using web_seed_flag_t = flags::bitfield_flag; + // internal enum class waste_reason { piece_timed_out, piece_cancelled, piece_unknown, piece_seed diff --git a/include/libtorrent/torrent_handle.hpp b/include/libtorrent/torrent_handle.hpp index 850653147..ef34f21fa 100644 --- a/include/libtorrent/torrent_handle.hpp +++ b/include/libtorrent/torrent_handle.hpp @@ -450,7 +450,7 @@ namespace aux { // the vector is empty when returning, if none of the files in the // torrent are currently open. // - // see open_file_state + // See open_file_state std::vector file_status() const; // If the torrent is in an error state (i.e. ``torrent_status::error`` is