1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-30 10:52:00 +00:00

chore: iwyu (#5746)

This commit is contained in:
tearfur 2023-07-08 23:24:03 +08:00 committed by GitHub
parent 82f08420fd
commit 5ec4ca550e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
167 changed files with 819 additions and 458 deletions

View file

@ -5,20 +5,23 @@
#include <cassert>
#include <cerrno>
#include <pthread.h>
#include <csignal>
#include <string_view>
#include <fcntl.h>
#include <unistd.h> /* fork(), setsid(), chdir(), dup2(), close(), pipe() */
#ifdef HAVE_SYS_SIGNALFD_H
#include <sys/signalfd.h>
#endif /* signalfd API */
#include <event2/event.h>
#include <csignal>
#include <cstdlib> /* abort(), daemon(), exit() */
#include <fcntl.h> /* open() */
#include <unistd.h> /* fork(), setsid(), chdir(), dup2(), close(), pipe() */
#include <string_view>
#include <event2/event.h>
#include <fmt/core.h>
#include <libtransmission/error.h>
#include <libtransmission/utils.h>
#include "daemon.h"
static void set_system_error(tr_error** error, int code, std::string_view message)

View file

@ -10,6 +10,10 @@
#include <fmt/core.h>
#include <libtransmission/error.h>
#include <libtransmission/log.h>
#include <libtransmission/utils.h>
#include "daemon.h"
#ifndef SERVICE_ACCEPT_PRESHUTDOWN

View file

@ -8,7 +8,10 @@
#include <cstdio> /* printf */
#include <cstdlib> /* atoi */
#include <iostream>
#include <iterator> /* std::back_inserter */
#include <memory>
#include <string_view>
#include <vector>
#ifdef HAVE_SYSLOG
#include <syslog.h>
@ -17,6 +20,7 @@
#ifdef _WIN32
#include <process.h> /* getpid */
#else
#include <sys/time.h> /* timeval */
#include <unistd.h> /* getpid */
#endif
@ -24,16 +28,25 @@
#include <fmt/core.h>
#include "daemon.h"
#include <libtransmission/transmission.h>
#include <libtransmission/error.h>
#include <libtransmission/file.h>
#include <libtransmission/log.h>
#include <libtransmission/timer-ev.h>
#include <libtransmission/tr-getopt.h>
#include <libtransmission/tr-macros.h>
#include <libtransmission/tr-strbuf.h>
#include <libtransmission/utils.h>
#include <libtransmission/variant.h>
#include <libtransmission/version.h>
#include <libtransmission/watchdir.h>
#include "daemon.h"
struct tr_ctor;
struct tr_session;
struct tr_torrent;
#ifdef USE_SYSTEMD
#include <systemd/sd-daemon.h>

View file

@ -6,14 +6,17 @@
#pragma once
#include <string>
#include <string_view>
#include <libtransmission/transmission.h>
#ifdef HAVE_SYS_SIGNALFD_H
#include <unistd.h>
#endif
#include <libtransmission/variant.h>
#include <libtransmission/error.h>
#include <libtransmission/utils.h>
#include <libtransmission/quark.h>
#include <libtransmission/file.h>
#include <libtransmission/log.h>
struct tr_error;
struct tr_session;
class tr_daemon
{

View file

@ -7,6 +7,8 @@
#include <string>
#include <string_view>
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/announce-list.h"

View file

@ -11,10 +11,11 @@
#include <string_view>
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "quark.h"
#include "interned-string.h"
#include "libtransmission/quark.h"
#include "libtransmission/interned-string.h"
#include "libtransmission/tr-macros.h"
struct tr_error;
struct tr_url_parsed_t;

View file

@ -17,12 +17,12 @@
#include <string_view>
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "announcer.h"
#include "interned-string.h"
#include "net.h"
#include "peer-mgr.h" // tr_pex
#include "libtransmission/announcer.h"
#include "libtransmission/interned-string.h"
#include "libtransmission/net.h"
#include "libtransmission/peer-mgr.h" // tr_pex
struct tr_url_parsed_t;

View file

@ -5,6 +5,8 @@
#include <algorithm> // std::copy_n()
#include <cctype>
#include <cstddef> // std::byte, size_t
#include <cstdint> // int64_t, uint8_t, uint...
#include <cstdio> /* fprintf() */
#include <iomanip>
#include <iostream>
@ -31,8 +33,11 @@
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/peer-mgr.h" /* pex */
#include "libtransmission/session.h"
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/tr-strbuf.h" // tr_strbuf, tr_urlbuf
#include "libtransmission/utils.h"
#include "libtransmission/web-utils.h"
#include "libtransmission/web.h"

View file

@ -4,13 +4,20 @@
// License text can be found in the licenses/ folder.
#include <algorithm> // for std::find_if()
#include <climits> // for CHAR_BIT
#include <cstring> // for memset()
#include <array>
#include <chrono> // operator""ms, literals
#include <climits> // CHAR_BIT
#include <cstddef> // std::byte
#include <cstdint> // uint32_t, uint64_t
#include <cstring> // memcpy()
#include <ctime>
#include <future>
#include <list>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#ifdef _WIN32
@ -19,17 +26,18 @@
#define gai_strerror gai_strerrorA
#else
#include <netdb.h> // gai_strerror()
#include <netinet/in.h> // IPPROTO_UDP, in_addr
#include <sys/socket.h> // sockaddr_storage, AF_INET
#endif
#include <fmt/core.h>
#define LIBTRANSMISSION_ANNOUNCER_MODULE
#include "libtransmission/transmission.h"
#include "libtransmission/announcer.h"
#include "libtransmission/announcer-common.h"
#include "libtransmission/crypto-utils.h" // for tr_rand_obj()
#include "libtransmission/interned-string.h"
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/peer-mgr.h" // for tr_pex::fromCompact4()

View file

@ -5,6 +5,7 @@
#include <algorithm>
#include <array>
#include <chrono> // operator""ms
#include <cstdio>
#include <ctime>
#include <deque>
@ -15,6 +16,7 @@
#include <set>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include <fmt/core.h>
@ -27,11 +29,13 @@
#include "libtransmission/announcer-common.h"
#include "libtransmission/announcer.h"
#include "libtransmission/crypto-utils.h" /* tr_rand_int() */
#include "libtransmission/interned-string.h" // tr_interned_string
#include "libtransmission/log.h"
#include "libtransmission/session.h"
#include "libtransmission/timer.h"
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h" // tr_sha1_digest_t, TR_C...
#include "libtransmission/utils.h"
#include "libtransmission/web-utils.h"

View file

@ -19,19 +19,25 @@
#include <string_view>
#include <vector>
#include "transmission.h"
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <sys/socket.h> // socklen_t
#endif
#include "interned-string.h"
#include "net.h"
#include "libtransmission/transmission.h"
class tr_announcer;
#include "libtransmission/interned-string.h"
#include "libtransmission/peer-mgr.h"
struct tr_address;
class tr_announcer_udp;
struct tr_session;
struct tr_torrent;
struct tr_torrent_announcer;
// --- Tracker Publish / Subscribe
struct tr_pex;
/** @brief Notification object to tell listeners about announce or scrape occurrences */
struct tr_tracker_event
{

View file

@ -4,6 +4,7 @@
// License text can be found in the licenses/ folder.
#include <algorithm>
#include <initializer_list>
#include <utility> // for std::swap()
#include <vector>

View file

@ -3,14 +3,12 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <algorithm>
#include <vector>
#include "libtransmission/transmission.h"
#include <algorithm> // std::copy, std::fill_n, std::min, std::max
#include <vector> // std::vector
#include "libtransmission/bitfield.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-popcount.h"
#include "libtransmission/tr-assert.h" // TR_ASSERT, TR_ENABLE_ASSERTS
#include "libtransmission/tr-popcount.h" // tr_popcnt
// ---

View file

@ -9,11 +9,11 @@
#error only libtransmission should #include this header.
#endif
#include <cstddef>
#include <cstdint>
#include <vector>
#include <cstddef> // size_t
#include <cstdint> // uint8_t
#include <vector> // std::vector
#include "tr-macros.h"
#include "tr-macros.h" // TR_CONSTEXPR20
/**
* @brief Implementation of the BitTorrent spec's Bitfield array of bits.

View file

@ -3,10 +3,8 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include "libtransmission/transmission.h"
#include "libtransmission/block-info.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-assert.h" // TR_ASSERT
void tr_block_info::init_sizes(uint64_t total_size_in, uint32_t piece_size_in) noexcept
{

View file

@ -5,13 +5,22 @@
#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <fstream>
#include <initializer_list>
#include <string_view>
#include <vector>
#include <fmt/core.h>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <arpa/inet.h>
#include <cerrno>
#include <netinet/in.h>
#endif
#include "libtransmission/transmission.h"
#include <fmt/core.h>
#include "libtransmission/blocklist.h"
#include "libtransmission/error.h"

View file

@ -17,8 +17,6 @@
#include "net.h" // for tr_address
struct tr_address;
namespace libtransmission
{

View file

@ -4,7 +4,8 @@
// License text can be found in the licenses/ folder.
#include <algorithm>
#include <cstdlib> // std::lldiv()
#include <cerrno>
#include <cstdint> // uint8_t
#include <iterator> // std::distance(), std::next(), std::prev()
#include <memory>
#include <numeric> // std::accumulate()
@ -12,6 +13,7 @@
#include <vector>
#include <fmt/core.h>
#include <small/vector.hpp>
#include "libtransmission/transmission.h"

View file

@ -16,8 +16,6 @@
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/clients.h"
#include "libtransmission/utils.h"

View file

@ -9,8 +9,9 @@
#include "libtransmission/transmission.h"
#include "libtransmission/bitfield.h"
#include "libtransmission/block-info.h"
#include "libtransmission/completion.h"
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
uint64_t tr_completion::compute_has_valid() const

View file

@ -15,10 +15,11 @@
#include <optional>
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "block-info.h"
#include "bitfield.h"
#include "libtransmission/block-info.h"
#include "libtransmission/bitfield.h"
#include "libtransmission/tr-macros.h"
/**
* @brief knows which blocks and pieces we have

View file

@ -9,10 +9,7 @@
#ifdef TR_CRYPTO_X509_FALLBACK
#include "libtransmission/transmission.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/tr-macros.h"
tr_x509_store_t tr_ssl_get_x509_store(tr_ssl_ctx_t /*handle*/)
{

View file

@ -8,6 +8,8 @@
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#include <array>
#include <cstddef> // size_t
#include <memory>
#include <openssl/crypto.h>
@ -20,11 +22,10 @@
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/log.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h" // tr_sha1_digest_t, tr_sha25...
#include "libtransmission/utils.h"
namespace

View file

@ -20,8 +20,6 @@ extern "C"
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/utils.h"

View file

@ -16,8 +16,7 @@
#include <string>
#include <string_view>
#include "libtransmission/transmission.h" // tr_sha1_digest_t
#include "libtransmission/tr-macros.h" // tr_sha1_digest_t, tr_sha256_d...
#include "libtransmission/tr-strbuf.h"
/**

View file

@ -8,8 +8,6 @@
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/error.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/utils.h"

View file

@ -7,8 +7,6 @@
#include <string_view>
#include "tr-macros.h"
/**
* @addtogroup error Error reporting
* @{

View file

@ -9,6 +9,7 @@
#include "libtransmission/transmission.h"
#include "libtransmission/bitfield.h"
#include "libtransmission/block-info.h"
#include "libtransmission/file-piece-map.h"
#include "libtransmission/torrent-metainfo.h"

View file

@ -14,10 +14,10 @@
#include <cstddef> // for size_t
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "bitfield.h"
#include "torrent-metainfo.h"
#include "libtransmission/bitfield.h"
#include "libtransmission/tr-macros.h" // TR_CONSTEXPR20
struct tr_block_info;
struct tr_torrent_metainfo;

View file

@ -6,24 +6,24 @@
#undef _GNU_SOURCE
#define _GNU_SOURCE // NOLINT
#include <algorithm>
#include <array>
#include <cerrno>
#include <climits> /* PATH_MAX */
#include <cstdint> /* SIZE_MAX */
#include <cstdio>
#include <cstdlib> // mkdtemp, mkstemp, realpath
#include <optional>
#include <string_view>
#include <string>
#include <vector>
#include <dirent.h>
#include <fcntl.h> /* O_LARGEFILE, posix_fadvise(), [posix_]fallocate(), fcntl() */
#include <libgen.h> /* basename(), dirname() */
#include <sys/file.h> /* flock() */
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h> /* lseek(), write(), ftruncate(), pread(), pwrite(), pathconf(), etc */
#ifdef HAVE_XFS_XFS_H
#include <sys/file.h> /* flock() */
#include <xfs/xfs.h>
#endif
@ -56,6 +56,7 @@
#include "libtransmission/file.h"
#include "libtransmission/log.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h" // TR_UCLIBC_CHECK_VERSION
#include "libtransmission/tr-strbuf.h"
#ifndef O_LARGEFILE

View file

@ -7,9 +7,6 @@
#include <string_view>
#include <vector>
#include "libtransmission/transmission.h"
#include "libtransmission/error.h"
#include "libtransmission/file.h"
#include "libtransmission/tr-assert.h"

View file

@ -17,8 +17,6 @@
#include <windows.h>
#endif
#include "tr-macros.h"
struct tr_error;
/**

View file

@ -7,7 +7,6 @@
#include <atomic>
#include <chrono> // std::chrono::milliseconds
#include <condition_variable>
#include <cstddef> // size_t
#include <memory> // std::unique_ptr
#include <mutex>
#include <optional>

View file

@ -5,6 +5,7 @@
#include <algorithm>
#include <array>
#include <cerrno> // ECONNREFUSED, ETIMEDOUT
#include <string_view>
#include <utility>
@ -15,13 +16,14 @@
#include "libtransmission/bitfield.h"
#include "libtransmission/clients.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/error.h"
#include "libtransmission/handshake.h"
#include "libtransmission/log.h"
#include "libtransmission/peer-io.h"
#include "libtransmission/peer-mse.h" // tr_message_stream_encryption::DH
#include "libtransmission/timer.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-buffer.h"
#include "libtransmission/utils.h"
#define tr_logAddTraceHand(handshake, msg) tr_logAddTrace(msg, (handshake)->peer_io_->display_name())

View file

@ -19,13 +19,17 @@
#include <mutex>
#include <optional>
#include <string_view>
#include <utility>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "net.h"
#include "peer-mse.h" // tr_message_stream_encryption::DH
#include "peer-io.h"
#include "timer.h"
#include "libtransmission/net.h"
#include "libtransmission/peer-mse.h" // tr_message_stream_encryption::DH
#include "libtransmission/peer-io.h"
#include "libtransmission/timer.h"
#include "libtransmission/tr-macros.h" // tr_sha1_digest_t, tr_peer_id_t
struct tr_error;
// short-term class which manages the handshake phase of a tr_peerIo
class tr_handshake

View file

@ -7,19 +7,25 @@
#include <array>
#include <cerrno>
#include <optional>
#include <string_view>
#include <utility> // std::move
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/cache.h" /* tr_cacheReadBlock() */
#include "libtransmission/block-info.h" // tr_block_info
#include "libtransmission/crypto-utils.h"
#include "libtransmission/error.h"
#include "libtransmission/file.h"
#include "libtransmission/inout.h"
#include "libtransmission/log.h"
#include "libtransmission/session.h"
#include "libtransmission/torrent.h"
#include "libtransmission/torrent-files.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h" // tr_sha1_digest_t
#include "libtransmission/tr-strbuf.h" // tr_pathbuf
#include "libtransmission/utils.h"
using namespace std::literals;

View file

@ -12,9 +12,9 @@
#include <cstddef> // size_t
#include <cstdint> // uint8_t, uint32_t
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "block-info.h"
#include "libtransmission/block-info.h"
struct tr_torrent;

View file

@ -6,7 +6,8 @@
#include <array>
#include <cerrno>
#include <chrono>
#include <cstdio>
#include <cstddef> // size_t
#include <iterator> // back_insert_iterator, empty
#include <map>
#include <mutex>
#include <string>
@ -20,8 +21,6 @@
#include <fmt/chrono.h>
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/file.h"
#include "libtransmission/log.h"
#include "libtransmission/tr-assert.h"

View file

@ -5,19 +5,19 @@
#include <algorithm>
#include <array>
#include <cstdint> // uint8_t
#include <cstring>
#include <iterator> // back_inserter
#include <string>
#include <optional>
#include <string_view>
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/error.h"
#include "libtransmission/error-types.h"
#include "libtransmission/magnet-metainfo.h"
#include "libtransmission/tr-strbuf.h" // for tr_urlbuf
#include "libtransmission/utils.h"
#include "libtransmission/web-utils.h"

View file

@ -10,15 +10,13 @@
#include <string_view>
#include <vector>
#include "transmission.h"
#include "announce-list.h"
#include "crypto-utils.h"
#include "tr-strbuf.h" // tr_urlbuf
#include "utils.h" // tr_strv_convert_utf8()
#include "libtransmission/announce-list.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/tr-macros.h" // TR_CONSTEXPR20, tr_sha1_digest_t
#include "libtransmission/tr-strbuf.h" // tr_urlbuf
#include "libtransmission/utils.h" // tr_strv_convert_utf8()
struct tr_error;
struct tr_variant;
class tr_magnet_metainfo
{

View file

@ -6,6 +6,7 @@
#include <algorithm>
#include <cerrno> // for ENOENT
#include <cmath>
#include <ctime> // time()
#include <optional>
#include <set>
#include <string>
@ -17,13 +18,17 @@
#include "libtransmission/transmission.h"
#include "libtransmission/block-info.h" // tr_block_info
#include "libtransmission/crypto-utils.h"
#include "libtransmission/error.h"
#include "libtransmission/file.h"
#include "libtransmission/log.h"
#include "libtransmission/makemeta.h"
#include "libtransmission/quark.h" // TR_KEY_length, TR_KEY_a...
#include "libtransmission/session.h" // TR_NAME
#include "libtransmission/torrent-files.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-strbuf.h" // tr_pathbuf
#include "libtransmission/utils.h" // for _()
#include "libtransmission/variant.h"
#include "libtransmission/version.h"

View file

@ -5,7 +5,6 @@
#pragma once
#include <algorithm> // std::move
#include <cstddef> // std::byte
#include <cstdint>
#include <future>
@ -14,13 +13,16 @@
#include <utility> // std::pair
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "announce-list.h"
#include "block-info.h"
#include "file.h"
#include "torrent-files.h"
#include "utils.h" // for tr_file_save()
#include "libtransmission/announce-list.h"
#include "libtransmission/block-info.h"
#include "libtransmission/file.h"
#include "libtransmission/torrent-files.h"
#include "libtransmission/tr-macros.h" // TR_CONSTEXPR20
#include "libtransmission/utils.h" // for tr_file_save()
struct tr_error;
class tr_metainfo_builder
{

View file

@ -19,10 +19,10 @@
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <arpa/inet.h>
#include <cerrno>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
#ifdef _WIN32

View file

@ -3,6 +3,7 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <algorithm> // std::min
#include <array>
#include <cstdint> // uint8_t, uint64_t
#include <string_view>

View file

@ -20,8 +20,6 @@
#include "file.h" // tr_sys_file_t
#include "lru-cache.h"
struct tr_session;
// A pool of open files that are cached while reading / writing torrents' data
class tr_open_files
{

View file

@ -6,11 +6,14 @@
#include <array>
#include <cerrno>
#include <cstdint>
#include <cstring>
#include <string>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <arpa/inet.h> // ntohl, ntohs
#endif
#include <event2/event.h>
#include <event2/bufferevent.h>
#include <libutp/utp.h>
@ -18,15 +21,19 @@
#include "libtransmission/transmission.h"
#include "libtransmission/session.h"
#include "libtransmission/bandwidth.h"
#include "libtransmission/block-info.h" // tr_block_info
#include "libtransmission/error.h" // tr_error_clear, tr_error_s...
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/peer-io.h"
#include "libtransmission/peer-socket.h" // tr_peer_socket, tr_netOpen...
#include "libtransmission/session.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-utp.h"
#include "libtransmission/utils.h" // for _()
struct sockaddr;
#ifdef _WIN32
#undef EAGAIN
#define EAGAIN WSAEWOULDBLOCK

View file

@ -9,6 +9,7 @@
#error only libtransmission should #include this header.
#endif
#include <algorithm>
#include <cstddef> // size_t
#include <cstdint> // uintX_t
#include <deque>
@ -17,17 +18,20 @@
#include <event2/util.h> // for evutil_socket_t
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "bandwidth.h"
#include "block-info.h"
#include "net.h" // tr_address
#include "peer-mse.h"
#include "peer-socket.h"
#include "tr-buffer.h"
#include "utils-ev.h"
#include "libtransmission/bandwidth.h"
#include "libtransmission/block-info.h"
#include "libtransmission/net.h" // tr_address
#include "libtransmission/peer-mse.h"
#include "libtransmission/peer-socket.h"
#include "libtransmission/tr-buffer.h"
#include "libtransmission/tr-macros.h" // tr_sha1_digest_t, TR_CONSTEXPR20
#include "libtransmission/utils-ev.h"
struct struct_utp_context;
struct tr_error;
struct tr_session;
namespace libtransmission::test
{

View file

@ -4,6 +4,7 @@
// License text can be found in the licenses/ folder.
#include <algorithm>
#include <cstddef> // size_t
#include <ctime>
#include <memory>
#include <utility>
@ -20,6 +21,8 @@
#include "libtransmission/peer-mgr-wishlist.h"
#include "libtransmission/tr-assert.h"
class tr_peer;
class ActiveRequests::Impl
{
public:

View file

@ -15,8 +15,9 @@
#include <utility>
#include <vector>
#include "transmission.h" // tr_block_index_t
#include "peer-common.h" // tr_peer*
#include "libtransmission/transmission.h" // tr_block_index_t
class tr_peer;
/**
* Bookkeeping for the active requests we have --

View file

@ -3,6 +3,7 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <algorithm> // std::min, std::partial_sort
#include <cstddef>
#include <set>
#include <utility>
@ -14,6 +15,7 @@
#include "libtransmission/crypto-utils.h" // for tr_salt_shaker
#include "libtransmission/peer-mgr-wishlist.h"
#include "libtransmission/utils.h"
namespace
{

View file

@ -12,9 +12,7 @@
#include <cstddef> // size_t
#include <vector>
#include "transmission.h"
#include "torrent.h"
#include "libtransmission/transmission.h"
/**
* Figures out what blocks we want to request next.

View file

@ -28,21 +28,21 @@
#include "libtransmission/transmission.h"
#include "libtransmission/announcer.h"
#include "libtransmission/bandwidth.h"
#include "libtransmission/blocklist.h"
#include "libtransmission/cache.h"
#include "libtransmission/block-info.h" // tr_block_info
#include "libtransmission/clients.h"
#include "libtransmission/completion.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/handshake.h"
#include "libtransmission/interned-string.h"
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/observable.h"
#include "libtransmission/peer-common.h"
#include "libtransmission/peer-io.h"
#include "libtransmission/peer-mgr-active-requests.h"
#include "libtransmission/peer-mgr-wishlist.h"
#include "libtransmission/peer-mgr.h"
#include "libtransmission/peer-msgs.h"
#include "libtransmission/peer-socket.h"
#include "libtransmission/quark.h"
#include "libtransmission/session.h"
#include "libtransmission/timer.h"
@ -50,7 +50,6 @@
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/tr-utp.h"
#include "libtransmission/utils.h"
#include "libtransmission/webseed.h"

View file

@ -12,29 +12,22 @@
#include <cstddef> // size_t
#include <cstdint> // uint8_t, uint64_t
#include <string>
#include <utility>
#include <vector>
#ifdef _WIN32
#include <winsock2.h> /* struct in_addr */
#endif
#include "libtransmission/transmission.h" // tr_block_span_t (ptr only)
#include "net.h" /* tr_address */
#include "peer-common.h"
#include "peer-socket.h"
#include "libtransmission/net.h" /* tr_address */
/**
* @addtogroup peers Peers
* @{
*/
class tr_peerIo;
class tr_peerMsgs;
class tr_swarm;
struct UTPSocket;
struct peer_atom;
class tr_peer;
struct tr_peerMgr;
class tr_peer_socket;
struct tr_peer_stat;
struct tr_session;
struct tr_torrent;
/* added_f's bitwise-or'ed flags */

View file

@ -4,14 +4,15 @@
// License text can be found in the licenses/ folder.
#include <array>
#include <limits> // std::numeric_limits
#include <string_view>
#include <math/wide_integer/uintwide_t.h>
#include "libtransmission/transmission.h"
#include "libtransmission/crypto-utils.h" // tr_sha1
#include "libtransmission/peer-mse.h"
#include "libtransmission/tr-arc4.h"
#include "libtransmission/tr-macros.h" // tr_sha1_digest_t
using namespace std::literals;

View file

@ -14,11 +14,10 @@
#include <algorithm> // for std::copy_n()
#include <array>
#include <cstddef> // size_t, std::byte
#include <cstdint> // uint8_t
#include "tr-macros.h" // tr_sha1_digest_t
#include "tr-arc4.h"
class tr_arc4;
#include "libtransmission/tr-macros.h" // tr_sha1_digest_t
#include "libtransmission/tr-arc4.h"
// Spec: https://wiki.vuze.com/w/Message_Stream_Encryption
namespace tr_message_stream_encryption

View file

@ -7,6 +7,7 @@
#include <array>
#include <bitset>
#include <cerrno>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <iterator>
@ -14,6 +15,8 @@
#include <memory> // std::unique_ptr
#include <optional>
#include <queue>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
@ -22,10 +25,12 @@
#include "libtransmission/transmission.h"
#include "libtransmission/bitfield.h"
#include "libtransmission/block-info.h"
#include "libtransmission/cache.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/file.h"
#include "libtransmission/interned-string.h"
#include "libtransmission/log.h"
#include "libtransmission/peer-common.h"
#include "libtransmission/peer-io.h"
#include "libtransmission/peer-mgr.h"
#include "libtransmission/peer-msgs.h"
@ -36,11 +41,14 @@
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-buffer.h"
#include "libtransmission/tr-dht.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/utils.h"
#include "libtransmission/variant.h"
#include "libtransmission/version.h"
struct peer_atom;
struct tr_error;
#ifndef EBADMSG
#define EBADMSG EINVAL
#endif

View file

@ -15,12 +15,14 @@
#include <memory>
#include <utility> // for std::pair<>
#include "interned-string.h"
#include "peer-common.h" // for tr_peer
#include "libtransmission/transmission.h" // for tr_direction, tr_block_ind...
class tr_peer;
#include "libtransmission/interned-string.h"
#include "libtransmission/net.h" // tr_socket_address
#include "libtransmission/peer-common.h" // for tr_peer
struct peer_atom;
class tr_peerIo;
struct tr_address;
struct tr_torrent;
/**

View file

@ -6,6 +6,12 @@
#include <array>
#include <cerrno>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <sys/socket.h> // AF_INET
#endif
#include <event2/util.h> /* evutil_inet_ntop() */
#include <fmt/core.h>
@ -18,8 +24,8 @@
#include "libtransmission/transmission.h"
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/port-forwarding-natpmp.h"
#include "libtransmission/port-forwarding.h"
#include "libtransmission/utils.h"
namespace

View file

@ -12,10 +12,11 @@
#include <ctime> // time_t
#include <cstdint>
#include "transmission.h" // tr_port_forwarding_state
#include "natpmp.h"
#include "net.h" // tr_port
#include "libtransmission/transmission.h" // tr_port_forwarding_state
#include "libtransmission/net.h" // tr_port
class tr_natpmp
{

View file

@ -7,6 +7,7 @@
#include <cerrno>
#include <chrono>
#include <future>
#include <optional>
#include <string>
#include <thread>
#include <utility>
@ -26,9 +27,10 @@
#include "libtransmission/transmission.h"
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/port-forwarding-upnp.h"
#include "libtransmission/port-forwarding.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h" // TR_ADDRSTRLEN
#include "libtransmission/utils.h" // for _(), tr_strerror()
namespace

View file

@ -16,10 +16,9 @@
#include <string>
#include "transmission.h"
#include "net.h" // tr_port
#include "libtransmission/transmission.h"
class tr_port;
struct tr_upnp;
tr_upnp* tr_upnpInit();

View file

@ -14,15 +14,15 @@
#include "libtransmission/transmission.h"
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/port-forwarding-natpmp.h"
#include "libtransmission/port-forwarding-upnp.h"
#include "libtransmission/port-forwarding.h"
#include "libtransmission/timer.h"
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/utils.h" // for _()
struct tr_upnp;
using namespace std::literals;
class tr_port_forwarding_impl final : public tr_port_forwarding

View file

@ -11,9 +11,9 @@
#include <memory> // for std::unique_ptr
#include "transmission.h" // for tr_port_forwarding_state
#include "libtransmission/transmission.h" // for tr_port_forwarding_state
#include "net.h"
#include "libtransmission/net.h"
namespace libtransmission
{

View file

@ -9,8 +9,6 @@
#include <string_view>
#include <vector>
#include "libtransmission/transmission.h"
#include "libtransmission/quark.h"
using namespace std::literals;

View file

@ -8,7 +8,7 @@
#include <string_view>
#include <vector>
#include <fmt/format.h> // fmt::ptr
#include <fmt/core.h>
#include "libtransmission/transmission.h"
@ -919,7 +919,7 @@ void save(tr_torrent* tor)
auto const resume_file = tor->resume_file();
if (auto const err = tr_variantToFile(&top, TR_VARIANT_FMT_BENC, resume_file); err != 0)
{
tor->set_local_error(fmt::format(FMT_STRING("Unable to save resume file: {:s}"), tr_strerror(err)));
tor->set_local_error(fmt::format("Unable to save resume file: {:s}", tr_strerror(err)));
}
tr_variantClear(&top);

View file

@ -14,9 +14,12 @@
#include <utility>
#include <vector>
#ifndef _WIN32
#include <sys/un.h>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <unistd.h>
#endif
@ -46,7 +49,8 @@
#include "libtransmission/utils.h"
#include "libtransmission/variant.h"
#include "libtransmission/web-utils.h"
#include "libtransmission/web.h"
struct evbuffer;
/* session-id is used to make cross-site request forgery attacks difficult.
* Don't disable this feature unless you really know what you're doing!

View file

@ -15,14 +15,15 @@
#include <string_view>
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "net.h"
#include "utils-ev.h"
#include "libtransmission/net.h"
#include "libtransmission/quark.h"
#include "libtransmission/utils-ev.h"
struct evhttp;
struct tr_variant;
class tr_rpc_address;
struct tr_session;
struct tr_variant;
struct libdeflate_compressor;
namespace libtransmission
@ -154,7 +155,7 @@ public:
std::vector<std::string> whitelist_;
std::string const web_client_dir_;
std::unique_ptr<class tr_rpc_address> bind_address_;
std::unique_ptr<tr_rpc_address> bind_address_;
std::unique_ptr<libtransmission::Timer> start_retry_timer;
libtransmission::evhelpers::evhttp_unique_ptr httpd;

View file

@ -6,11 +6,13 @@
#include <algorithm>
#include <array>
#include <cerrno>
#include <cstdint>
#include <ctime>
#include <iterator>
#include <memory>
#include <numeric>
#include <set>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
@ -32,7 +34,6 @@
#include "libtransmission/session.h"
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils.h"
#include "libtransmission/variant.h"

View file

@ -7,8 +7,7 @@
#include <string_view>
#include "transmission.h"
struct tr_session;
struct tr_variant;
using tr_rpc_response_func = void (*)(tr_session* session, tr_variant* response, void* user_data);

View file

@ -3,6 +3,9 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <chrono>
#include <cstddef> // size_t
#include <fmt/chrono.h>
#include "libtransmission/transmission.h"

View file

@ -14,9 +14,9 @@
#include <ctime> // for time_t
#include <optional>
#include "transmission.h" // for TR_SCHED_ALL
#include "libtransmission/transmission.h" // for TR_SCHED_ALL
#include "quark.h"
#include "libtransmission/quark.h"
struct tr_variant;

View file

@ -7,13 +7,12 @@
#include <iterator> // for std::back_inserter
#ifndef _WIN32
#include <cerrno>
#include <sys/stat.h>
#endif
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/crypto-utils.h" // for tr_rand_obj()
#include "libtransmission/error-types.h"
#include "libtransmission/error.h"

View file

@ -10,7 +10,7 @@
#include <ctime> // for time_t
#include <string_view>
#include "file.h" // tr_sys_file_t
#include "libtransmission/file.h" // tr_sys_file_t
class tr_session_id
{

View file

@ -3,10 +3,6 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/session-settings.h"
#include "libtransmission/variant.h"

View file

@ -8,11 +8,11 @@
#include <cstddef> // for size_t
#include <string>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "log.h" // for tr_log_level
#include "net.h" // for tr_port, tr_tos_t
#include "quark.h"
#include "libtransmission/log.h" // for tr_log_level
#include "libtransmission/net.h" // for tr_port, tr_tos_t
#include "libtransmission/quark.h"
struct tr_variant;

View file

@ -22,12 +22,8 @@
#include <event2/event.h>
#include <event2/thread.h>
#include "libtransmission/transmission.h"
#include "libtransmission/log.h"
#include "libtransmission/session-thread.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/utils.h" // for tr_net_init()
#include "libtransmission/utils-ev.h"
using namespace std::literals;

View file

@ -6,11 +6,12 @@
#include <algorithm> // std::partial_sort(), std::min(), std::max()
#include <condition_variable>
#include <csignal>
#include <cstddef> // size_t
#include <cstdint>
#include <cstdlib> // atoi()
#include <ctime>
#include <future>
#include <iterator> // for std::back_inserter
#include <limits> // std::numeric_limits
#include <memory>
#include <numeric> // for std::accumulate()
#include <string>
@ -19,43 +20,46 @@
#include <vector>
#ifndef _WIN32
#include <sys/types.h> /* umask() */
#include <sys/stat.h> /* umask() */
#endif
#include <event2/event.h>
#include <fmt/format.h> // fmt::ptr
#include <fmt/core.h> // fmt::ptr
#include "libtransmission/transmission.h"
#include "libtransmission/announcer.h"
#include "libtransmission/bandwidth.h"
#include "libtransmission/blocklist.h"
#include "libtransmission/cache.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/file.h"
#include "libtransmission/global-ip-cache.h"
#include "libtransmission/interned-string.h"
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/peer-io.h"
#include "libtransmission/peer-mgr.h"
#include "libtransmission/peer-socket.h"
#include "libtransmission/port-forwarding.h"
#include "libtransmission/quark.h"
#include "libtransmission/rpc-server.h"
#include "libtransmission/session-id.h"
#include "libtransmission/session.h"
#include "libtransmission/session-alt-speeds.h"
#include "libtransmission/session-settings.h"
#include "libtransmission/timer-ev.h"
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-dht.h"
#include "libtransmission/tr-lpd.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/tr-utp.h"
#include "libtransmission/utils.h"
#include "libtransmission/variant.h"
#include "libtransmission/verify.h"
#include "libtransmission/version.h"
#include "libtransmission/web.h"
struct tr_ctor;
using namespace std::literals;
namespace
@ -245,7 +249,7 @@ bool tr_session::LpdMediator::onPeerFound(std::string_view info_hash_str, tr_add
// we found a suitable peer, add it to the torrent
auto pex = tr_pex{ address, port };
tr_peerMgrAddPex(tor, TR_PEER_FROM_LPD, &pex, 1U);
tr_logAddDebugTor(tor, fmt::format(FMT_STRING("Found a local peer from LPD ({:s})"), address.display_name(port)));
tr_logAddDebugTor(tor, fmt::format("Found a local peer from LPD ({:s})", address.display_name(port)));
return true;
}

View file

@ -12,6 +12,8 @@
#define TR_NAME "Transmission"
#include <array>
#include <atomic>
#include <chrono>
#include <cstddef> // size_t
#include <cstdint> // uintX_t
#include <ctime> // time_t
@ -26,51 +28,53 @@
#include <utility> // for std::pair
#include <vector>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <sys/socket.h> // socklen_t
#endif
#include <event2/util.h> // for evutil_socket_t
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "announce-list.h"
#include "announcer.h"
#include "bandwidth.h"
#include "bitfield.h"
#include "cache.h"
#include "global-ip-cache.h"
#include "interned-string.h"
#include "net.h" // tr_socket_t
#include "observable.h"
#include "open-files.h"
#include "port-forwarding.h"
#include "quark.h"
#include "session-alt-speeds.h"
#include "session-id.h"
#include "session-settings.h"
#include "session-thread.h"
#include "stats.h"
#include "torrents.h"
#include "tr-dht.h"
#include "tr-lpd.h"
#include "utils-ev.h"
#include "verify.h"
#include "web.h"
#include "libtransmission/announce-list.h"
#include "libtransmission/announcer.h"
#include "libtransmission/bandwidth.h"
#include "libtransmission/blocklist.h"
#include "libtransmission/cache.h"
#include "libtransmission/global-ip-cache.h"
#include "libtransmission/interned-string.h"
#include "libtransmission/net.h" // tr_socket_t
#include "libtransmission/observable.h"
#include "libtransmission/open-files.h"
#include "libtransmission/port-forwarding.h"
#include "libtransmission/quark.h"
#include "libtransmission/session-alt-speeds.h"
#include "libtransmission/session-id.h"
#include "libtransmission/session-settings.h"
#include "libtransmission/session-thread.h"
#include "libtransmission/stats.h"
#include "libtransmission/torrents.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-dht.h"
#include "libtransmission/tr-lpd.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/utils-ev.h"
#include "libtransmission/verify.h"
#include "libtransmission/web.h"
tr_peer_id_t tr_peerIdInit();
struct event_base;
class tr_lpd;
class tr_peer_socket;
class tr_port_forwarding;
struct tr_pex;
class tr_rpc_server;
class tr_session_thread;
class tr_web;
struct tr_torrent;
struct struct_utp_context;
struct tr_variant;
namespace libtransmission
{
class Blocklist;
class Dns;
class Timer;
class TimerMaker;
} // namespace libtransmission

View file

@ -6,6 +6,7 @@
#include "libtransmission/transmission.h"
#include "libtransmission/file.h"
#include "libtransmission/quark.h"
#include "libtransmission/stats.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils.h" // for tr_getRatio(), tr_time()

View file

@ -14,7 +14,7 @@
#include <string>
#include <string_view>
#include "transmission.h" // for tr_session_stats
#include "libtransmission/transmission.h" // for tr_session_stats
// per-session data structure for bandwidth use statistics
class tr_stats

View file

@ -6,22 +6,20 @@
#include <array>
#include <cerrno>
#include <csignal>
#include <cstdlib>
#include <map>
#include <string>
#include <string_view>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/error.h"
#include "libtransmission/subprocess.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils.h"

View file

@ -4,13 +4,19 @@
// License text can be found in the licenses/ folder.
#include <chrono>
#include <functional>
#include <memory>
#include <utility>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <sys/time.h>
#endif
#include <event2/event.h>
#include "libtransmission/transmission.h"
#include "libtransmission/timer.h"
#include "libtransmission/timer-ev.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/utils-ev.h"

View file

@ -7,7 +7,7 @@
#include <memory>
#include "timer.h"
#include "libtransmission/timer.h"
extern "C"
{

View file

@ -4,6 +4,8 @@
// License text can be found in the licenses/ folder.
#include <cerrno> // EINVAL
#include <cstddef> // size_t
#include <cstdint> //uint16_t
#include <optional>
#include <string>
#include <string_view>
@ -13,7 +15,7 @@
#include "libtransmission/transmission.h"
#include "libtransmission/error.h"
#include "libtransmission/magnet-metainfo.h"
#include "libtransmission/quark.h"
#include "libtransmission/session.h"
#include "libtransmission/torrent-metainfo.h"
#include "libtransmission/torrent.h"

View file

@ -4,6 +4,7 @@
// License text can be found in the licenses/ folder.
#include <algorithm> // std::find()
#include <array>
#include <cctype>
#include <functional>
#include <iterator>
@ -17,9 +18,10 @@
#include "libtransmission/transmission.h"
#include "libtransmission/error.h"
#include "libtransmission/file.h"
#include "libtransmission/log.h"
#include "libtransmission/torrent-files.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils.h"
using namespace std::literals;

View file

@ -16,10 +16,11 @@
#include <utility>
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "file.h"
#include "tr-strbuf.h"
#include "libtransmission/file.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/tr-strbuf.h"
struct tr_error;

View file

@ -5,11 +5,11 @@
#include <algorithm>
#include <climits> /* INT_MAX */
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <string>
#include <string_view>
#include <vector>
#include <fmt/core.h>
@ -18,9 +18,8 @@
#include "libtransmission/crypto-utils.h" // for tr_sha1()
#include "libtransmission/error.h"
#include "libtransmission/log.h"
#include "libtransmission/magnet-metainfo.h"
#include "libtransmission/resume.h"
#include "libtransmission/file.h"
#include "libtransmission/quark.h"
#include "libtransmission/torrent-magnet.h"
#include "libtransmission/torrent-metainfo.h"
#include "libtransmission/torrent.h"

View file

@ -15,8 +15,7 @@
#include <optional>
#include <vector>
#include "transmission.h"
struct tr_error;
struct tr_torrent;
struct tr_torrent_metainfo;

View file

@ -38,6 +38,7 @@
#include "libtransmission/inout.h" // tr_ioTestPiece()
#include "libtransmission/log.h"
#include "libtransmission/magnet-metainfo.h"
#include "libtransmission/peer-common.h"
#include "libtransmission/peer-mgr.h"
#include "libtransmission/resume.h"
#include "libtransmission/session.h"

View file

@ -3,6 +3,7 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <algorithm>
#include <set>
#include <string_view>
#include <vector>

View file

@ -15,9 +15,10 @@
#include <utility>
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "torrent-metainfo.h"
#include "libtransmission/torrent-metainfo.h"
#include "libtransmission/tr-macros.h"
struct tr_torrent;
struct tr_torrent_metainfo;

View file

@ -9,7 +9,7 @@
#include <string_view>
#include "tr-macros.h"
#include "libtransmission/tr-macros.h"
[[noreturn]] bool tr_assert_report(std::string_view file, long line, std::string_view message);

View file

@ -3,10 +3,10 @@
// License text can be found in the licenses/ folder.
#include <algorithm>
#include <array>
#include <chrono>
#include <cstdio>
#include <cstdlib> // for abort()
#include <cstring> // for memcpy()
#include <cstdint> // uint16_t
#include <cstring> // memcpy()
#include <ctime>
#include <deque>
#include <fstream>
@ -15,15 +15,14 @@
#include <sstream>
#include <string>
#include <string_view>
#include <tuple> // for std::tie()
#include <tuple> // std::tie()
#include <utility>
#ifdef _WIN32
#include <ws2tcpip.h>
#undef gai_strerror
#define gai_strerror gai_strerrorA
#else
#include <sys/time.h> // for `struct timezone`
#include <sys/types.h>
#include <sys/socket.h> /* socket(), bind() */
#include <netdb.h>
#include <netinet/in.h> /* sockaddr_in */
@ -38,6 +37,7 @@
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/peer-mgr.h" // for tr_peerMgrCompactToPex()
#include "libtransmission/quark.h"
#include "libtransmission/timer.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-dht.h"

View file

@ -14,11 +14,18 @@
#include <string_view>
#include <vector>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <sys/socket.h>
#endif
#include <dht/dht.h>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "net.h" // tr_port
#include "libtransmission/net.h" // tr_port
#include "libtransmission/tr-macros.h"
struct tr_pex;

View file

@ -3,16 +3,16 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <algorithm>
#include <cstdio>
#include <cstdlib> /* exit() */
#include <cstring>
#include <string>
#include <string_view>
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/tr-getopt.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/utils.h"
using namespace std::literals;

View file

@ -5,15 +5,17 @@
#include <algorithm>
#include <array>
#include <chrono>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <sstream>
#include <string>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <ctime>
#include <sys/types.h>
#include <sys/socket.h> /* socket(), bind() */
#include <netinet/in.h> /* sockaddr_in */
#endif

View file

@ -14,9 +14,9 @@
#include <string_view>
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "net.h" // for tr_address, tr_port
#include "libtransmission/net.h" // for tr_address, tr_port
struct event_base;

View file

@ -4,14 +4,19 @@
#include <array>
#include <cerrno>
#include <cstring> /* memcmp(), memset() */
#include <string>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <netinet/in.h> // IPV6_V6ONLY, IPPROTO_IPV6
#include <sys/socket.h> // setsockopt, SOL_SOCKET, bind
#endif
#include <event2/event.h>
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/session.h"

View file

@ -7,8 +7,6 @@
#include <event2/event.h>
#include <event2/http.h>
#include "libtransmission/transmission.h"
#include "libtransmission/utils-ev.h"
namespace libtransmission::evhelpers

View file

@ -11,6 +11,7 @@
#include <cstdint> // SIZE_MAX
#include <cstdlib> // getenv()
#include <cstring> /* strerror() */
#include <exception>
#include <iostream>
#include <iterator> // for std::back_inserter
#include <locale>
@ -18,16 +19,16 @@
#include <set>
#include <string>
#include <string_view>
#include <system_error>
#include <vector>
#ifdef _WIN32
#include <windows.h> /* Sleep(), GetEnvironmentVariable() */
#include <ws2tcpip.h> /* htonl(), ntohl() */
#include <shellapi.h> /* CommandLineToArgv() */
#endif
#ifndef _WIN32
#include <sys/stat.h> // mode_t
#else
#include <arpa/inet.h>
#endif
#define UTF_CPP_CPLUSPLUS 201703L
@ -47,7 +48,7 @@
#include "libtransmission/file.h"
#include "libtransmission/log.h"
#include "libtransmission/mime-types.h"
#include "libtransmission/net.h" // ntohl()
#include "libtransmission/quark.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils.h"

Some files were not shown because too many files have changed in this diff Show more