1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-21 23:32:35 +00:00

chore: iwyu (#6201)

This commit is contained in:
Yat Ho 2023-11-04 01:03:26 +08:00 committed by GitHub
parent d681fa9293
commit a2b547fb50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 133 additions and 133 deletions

View file

@ -33,6 +33,7 @@
#include <libtransmission/error.h>
#include <libtransmission/file.h>
#include <libtransmission/log.h>
#include <libtransmission/quark.h>
#include <libtransmission/timer-ev.h>
#include <libtransmission/tr-getopt.h>
#include <libtransmission/tr-strbuf.h>

View file

@ -6,6 +6,7 @@
#include <algorithm>
#include <string>
#include <string_view>
#include <utility>
#include <fmt/core.h>
@ -17,7 +18,6 @@
#include "libtransmission/error.h"
#include "libtransmission/quark.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/torrent-metainfo.h"
#include "libtransmission/utils.h"
#include "libtransmission/variant.h"
#include "libtransmission/web-utils.h"

View file

@ -13,7 +13,6 @@
#include "libtransmission/transmission.h"
#include "libtransmission/quark.h"
#include "libtransmission/interned-string.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/variant.h"

View file

@ -7,7 +7,6 @@
#include <cctype>
#include <cstddef> // std::byte, size_t
#include <cstdint> // int64_t, uint8_t, uint...
#include <cstdio> /* fprintf() */
#include <iomanip>
#include <iostream>
#include <iterator>
@ -34,7 +33,6 @@
#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

View file

@ -16,9 +16,9 @@
#include <utility> // for std::move()
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "tr-assert.h"
#include "libtransmission/tr-assert.h"
class tr_peerIo;

View file

@ -14,7 +14,7 @@
#include <string_view>
#include <utility> // make_pair
#include "error.h"
#include "libtransmission/error.h"
namespace transmission::benc
{

View file

@ -13,7 +13,7 @@
#include <cstdint> // uint8_t
#include <vector> // std::vector
#include "tr-macros.h" // TR_CONSTEXPR20
#include "libtransmission/tr-macros.h" // TR_CONSTEXPR20
/**
* @brief Implementation of the BitTorrent spec's Bitfield array of bits.

View file

@ -7,7 +7,7 @@
#include <cstdint> // uint32_t, uint64_t
#include "transmission.h"
#include "libtransmission/transmission.h"
struct tr_block_info
{

View file

@ -9,6 +9,8 @@
#error only libtransmission should #include this header.
#endif
#include <algorithm> // std::any_of
#include <cstddef> // size_t
#include <numeric>
#include <optional>
#include <string>

View file

@ -17,9 +17,9 @@
#include <small/vector.hpp>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "block-info.h"
#include "libtransmission/block-info.h"
class tr_torrents;
struct tr_torrent;

View file

@ -8,6 +8,7 @@
#include <algorithm>
#include <array>
#include <cctype> /* isprint() */
#include <cstdint> // uint8_t
#include <optional>
#include <string_view>
#include <tuple>
@ -17,6 +18,7 @@
#include <fmt/core.h>
#include "libtransmission/clients.h"
#include "libtransmission/tr-macros.h" // tr_peer_id_t
#include "libtransmission/utils.h"
using namespace std::literals;

View file

@ -11,7 +11,7 @@
#include <cstddef> // size_t
#include "tr-macros.h" // tr_peer_id_t
#include "libtransmission/tr-macros.h" // tr_peer_id_t
/**
* @brief parse a peer-id into a human-readable client name and version number

View file

@ -5,6 +5,9 @@
#include <algorithm>
#include <cerrno>
#include <cstdint> // int64_t
#include <cstdio> // FILE
#include <optional>
#include <string>
#include <string_view>
@ -63,12 +66,10 @@
#include <xfs/xqm.h>
#endif
#include "libtransmission/transmission.h"
#include "libtransmission/error.h"
#include "libtransmission/file.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/utils.h"
#include "libtransmission/utils.h" // tr_win32_utf8_to_native
namespace
{

View file

@ -11,6 +11,7 @@
#include <cerrno>
#include <climits> /* PATH_MAX */
#include <cstdint> /* SIZE_MAX */
#include <cstdio> // remove, rename
#include <cstdlib> // mkdtemp, mkstemp, realpath
#include <optional>
#include <string_view>
@ -50,11 +51,8 @@
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/error.h"
#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"

View file

@ -20,7 +20,6 @@
#include "libtransmission/log.h"
#include "libtransmission/global-ip-cache.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/utils.h"
namespace

View file

@ -23,13 +23,19 @@
#include "libtransmission/transmission.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;
struct tr_socket_address;
namespace libtransmission
{
template<typename value_type>
class BufferWriter;
}
// short-term class which manages the handshake phase of a tr_peerIo
class tr_handshake

View file

@ -19,7 +19,6 @@
#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"

View file

@ -9,7 +9,7 @@
#include <fmt/core.h>
#include "quark.h"
#include "libtransmission/quark.h"
/**
* Helper functions wrapped around tr_quark

View file

@ -12,8 +12,6 @@
#include <string_view>
#include <utility> // std::pair
#include <sys/types.h>
#ifdef _WIN32
#include <ws2tcpip.h>
#else
@ -24,15 +22,13 @@
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/log.h"
#include "libtransmission/net.h"
#include "libtransmission/peer-socket.h"
#include "libtransmission/session.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/tr-utp.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils.h"
using namespace std::literals;

View file

@ -11,6 +11,7 @@
#include <algorithm> // for std::copy_n
#include <array>
#include <cstddef> // size_t
#include <cstdint> // uint16_t, uint32_t, uint8_t
#include <functional>
#include <optional>
#include <string>
@ -269,7 +270,7 @@ struct tr_address
[[nodiscard]] auto is_any() const noexcept
{
return is_valid() ? *this == any(type) : false;
return is_valid() && *this == any(type);
}
};

View file

@ -9,13 +9,13 @@
#error only libtransmission should #include this header.
#endif
#include <algorithm> // for std::move
#include <cstddef> // for size_t
#include <functional>
#include <utility> // for std::move
#include <small/map.hpp>
#include "tr-assert.h"
#include "libtransmission/tr-assert.h"
namespace libtransmission
{
@ -30,13 +30,12 @@ public:
ObserverTag() = default;
ObserverTag(ObserverTag&& that)
ObserverTag(ObserverTag&& that) noexcept
{
on_destroy_ = std::move(that.on_destroy_);
that.on_destroy_ = nullptr;
*this = std::forward<ObserverTag>(that);
}
ObserverTag& operator=(ObserverTag&& that)
ObserverTag& operator=(ObserverTag&& that) noexcept
{
on_destroy_ = std::move(that.on_destroy_);
that.on_destroy_ = nullptr;
@ -46,7 +45,7 @@ public:
ObserverTag(ObserverTag const&) = delete;
ObserverTag& operator=(ObserverTag const&) = delete;
ObserverTag(Callback on_destroy)
explicit ObserverTag(Callback on_destroy)
: on_destroy_{ std::move(on_destroy) }
{
}
@ -54,7 +53,9 @@ public:
~ObserverTag()
{
if (on_destroy_)
{
on_destroy_();
}
}
private:
@ -92,7 +93,7 @@ public:
{
for (auto& [tag, observer] : observers_)
{
observer((args)...);
observer(args...);
}
}

View file

@ -15,10 +15,10 @@
#include <string_view>
#include <utility>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "file.h" // tr_sys_file_t
#include "lru-cache.h"
#include "libtransmission/file.h" // tr_sys_file_t
#include "libtransmission/lru-cache.h"
// A pool of open files that are cached while reading / writing torrents' data
class tr_open_files

View file

@ -3,10 +3,10 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <array>
#include <cerrno>
#include <cstdint>
#include <type_traits>
#include <functional>
#include <type_traits> // std::underlying_type_t
#ifdef _WIN32
#include <ws2tcpip.h>

View file

@ -22,7 +22,6 @@
#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"
@ -32,6 +31,7 @@
struct struct_utp_context;
struct tr_error;
struct tr_session;
struct tr_socket_address;
namespace libtransmission::test
{

View file

@ -46,6 +46,7 @@
#include "libtransmission/timer.h"
#include "libtransmission/torrent-magnet.h"
#include "libtransmission/torrent.h"
#include "libtransmission/torrents.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/utils.h"

View file

@ -7,8 +7,8 @@
#include <array>
#include <bitset>
#include <cerrno>
#include <cstdint>
#include <cstring>
#include <cstddef>
#include <cstdint> // uint8_t, uint32_t, int64_t
#include <ctime>
#include <iterator>
#include <map>
@ -17,6 +17,7 @@
#include <queue>
#include <string>
#include <string_view>
#include <tuple>
#include <utility>
#include <vector>

View file

@ -3,12 +3,15 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <algorithm> // std::min
#include <cerrno>
#include <fmt/core.h>
#include <libutp/utp.h>
#include "libtransmission/transmission.h"
#include "libtransmission/error.h"
#include "libtransmission/log.h"
#include "libtransmission/peer-socket.h"
#include "libtransmission/net.h"
#include "libtransmission/session.h"

View file

@ -12,15 +12,10 @@
#include <atomic>
#include <cstddef> // size_t
#include <string>
#include <string_view>
#include <utility> // for std::make_pair()
#include "transmission.h"
#include "error.h"
#include "net.h"
#include "tr-assert.h"
#include "tr-buffer.h"
#include "libtransmission/net.h"
#include "libtransmission/tr-buffer.h"
struct UTPSocket;
struct tr_session;

View file

@ -43,14 +43,11 @@
#include "libtransmission/log.h"
#include "libtransmission/platform.h"
#include "libtransmission/session.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils.h"
using namespace std::literals;
// FIXME(ckerr) do not merge these three lines.
// This comment is to make CI think libtransmission has
// changed so that it will run the libtransmission CI tests
namespace
{
#ifdef _WIN32

View file

@ -3,6 +3,8 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <algorithm> // std::min
#include <array>
#include <cstring>
#include <ctime>
#include <string_view>
@ -12,14 +14,17 @@
#include "libtransmission/transmission.h"
#include "libtransmission/bitfield.h"
#include "libtransmission/error.h"
#include "libtransmission/file.h"
#include "libtransmission/log.h"
#include "libtransmission/magnet-metainfo.h"
#include "libtransmission/net.h"
#include "libtransmission/peer-mgr.h" /* pex */
#include "libtransmission/quark.h"
#include "libtransmission/resume.h"
#include "libtransmission/session.h"
#include "libtransmission/torrent.h"
#include "libtransmission/torrent-metainfo.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/utils.h"
#include "libtransmission/variant.h"

View file

@ -5,6 +5,7 @@
#include <chrono>
#include <cstddef> // size_t
#include <utility>
#include <fmt/chrono.h>

View file

@ -49,11 +49,13 @@
#include "libtransmission/open-files.h"
#include "libtransmission/port-forwarding.h"
#include "libtransmission/quark.h"
#include "libtransmission/rpc-server.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/timer.h"
#include "libtransmission/torrents.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-dht.h"
@ -67,17 +69,10 @@ tr_peer_id_t tr_peerIdInit();
class tr_peer_socket;
struct tr_pex;
class tr_rpc_server;
struct tr_torrent;
struct struct_utp_context;
struct tr_variant;
namespace libtransmission
{
class Timer;
class TimerMaker;
} // namespace libtransmission
namespace libtransmission::test
{

View file

@ -3,6 +3,10 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <array>
#include <optional>
#include <utility>
#include "libtransmission/transmission.h"
#include "libtransmission/file.h"

View file

@ -3,9 +3,10 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <array>
#include <cerrno> // EINVAL
#include <cstddef> // size_t
#include <cstdint> //uint16_t
#include <cstdint> // uint16_t
#include <optional>
#include <string>
#include <string_view>
@ -15,7 +16,6 @@
#include "libtransmission/transmission.h"
#include "libtransmission/error.h"
#include "libtransmission/quark.h"
#include "libtransmission/session.h"
#include "libtransmission/torrent-metainfo.h"
#include "libtransmission/torrent.h"

View file

@ -9,7 +9,9 @@
#include <ctime>
#include <deque>
#include <fstream>
#include <memory>
#include <string>
#include <utility> // std::move
#include <vector>
#include <fmt/core.h>

View file

@ -11,11 +11,12 @@
#include <string_view>
#include <vector>
#include "transmission.h"
#include "libtransmission/transmission.h"
#include "block-info.h"
#include "magnet-metainfo.h"
#include "torrent-files.h"
#include "libtransmission/block-info.h"
#include "libtransmission/magnet-metainfo.h"
#include "libtransmission/torrent-files.h"
#include "libtransmission/tr-macros.h"
struct tr_error;

View file

@ -7,6 +7,7 @@
#include <array>
#include <cerrno> // EINVAL
#include <climits> /* INT_MAX */
#include <cstddef> // size_t
#include <ctime>
#include <map>
#include <sstream>
@ -15,13 +16,6 @@
#include <utility>
#include <vector>
#ifndef _WIN32
#include <sys/wait.h> /* wait() */
#include <unistd.h> /* fork(), execvp(), _exit() */
#else
#include <windows.h> /* CreateProcess(), GetLastError() */
#endif
#include <fmt/chrono.h>
#include <fmt/core.h>
@ -47,10 +41,13 @@
#include "libtransmission/torrent-metainfo.h"
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils.h"
#include "libtransmission/version.h"
#include "libtransmission/web-utils.h"
struct tr_ctor;
using namespace std::literals;
// ---

View file

@ -10,6 +10,7 @@
#endif
#include <cstddef> // size_t
#include <cstdint> // uint64_t, uint16_t
#include <ctime>
#include <functional>
#include <memory>
@ -32,17 +33,16 @@
#include "libtransmission/log.h"
#include "libtransmission/observable.h"
#include "libtransmission/session.h"
#include "libtransmission/torrent-files.h"
#include "libtransmission/torrent-magnet.h"
#include "libtransmission/torrent-metainfo.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/verify.h"
struct tr_ctor;
class tr_swarm;
struct tr_error;
struct tr_magnet_info;
struct tr_metainfo_parsed;
struct tr_session;
struct tr_torrent;
struct tr_torrent_announcer;

View file

@ -24,7 +24,6 @@
#include "libtransmission/tr-macros.h"
struct tr_torrent;
struct tr_torrent_metainfo;
// A helper class to manage tracking sets of tr_torrent objects.
class tr_torrents

View file

@ -9,7 +9,7 @@
#include <fmt/core.h>
#include "tr-assert.h"
#include "libtransmission/tr-assert.h"
#if !defined(NDEBUG) || defined(TR_FORCE_ASSERTIONS)

View file

@ -14,9 +14,9 @@
#include <small/vector.hpp>
#include "error.h"
#include "net.h" // tr_socket_t
#include "utils.h" // for tr_htonll(), tr_ntohll()
#include "libtransmission/error.h"
#include "libtransmission/net.h" // tr_socket_t
#include "libtransmission/utils.h" // for tr_htonll(), tr_ntohll()
namespace libtransmission
{

View file

@ -5,8 +5,10 @@
#include <algorithm>
#include <array>
#include <chrono>
#include <cstdint>
#include <cstddef> // std::byte
#include <cstdint> // uint16_t
#include <cstring>
#include <ctime> // time_t
#include <functional>
#include <memory>
#include <optional>
@ -15,7 +17,6 @@
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <ctime>
#include <sys/socket.h> /* socket(), bind() */
#include <netinet/in.h> /* sockaddr_in */
#endif

View file

@ -9,16 +9,12 @@
#include <libutp/utp.h>
#include "libtransmission/transmission.h"
#include "libtransmission/crypto-utils.h" // tr_rand_int()
#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/session.h"
#include "libtransmission/timer.h"
#include "libtransmission/tr-utp.h"
#include "libtransmission/utils.h"

View file

@ -10,6 +10,12 @@
#include <cstddef> // size_t
#ifndef _WIN32
#include <sys/socket.h>
#else
#include <ws2tcpip.h>
#endif
struct tr_session;
void tr_utpInit(tr_session* session);

View file

@ -21,7 +21,7 @@
#include <stdbool.h> // bool
#endif
#include "tr-macros.h"
#include "libtransmission/tr-macros.h"
using tr_file_index_t = size_t;
using tr_piece_index_t = uint32_t;

View file

@ -17,9 +17,11 @@
#include <locale>
#include <optional>
#include <set>
#include <stdexcept> // std::runtime_error
#include <string>
#include <string_view>
#include <system_error>
#include <utility>
#include <vector>
#ifdef _WIN32

View file

@ -5,7 +5,6 @@
#pragma once
#include <algorithm>
#include <cctype>
#include <cstdint> // uint8_t, uint32_t, uint64_t
#include <cstddef> // size_t
@ -19,6 +18,7 @@
#include <vector>
#include "libtransmission/tr-macros.h"
#include "libtransmission/variant.h"
struct tr_error;

View file

@ -8,7 +8,7 @@
#include <string>
#include <string_view>
#include "utils.h"
#include "libtransmission/utils.h"
// macOS implementation of tr_strv_convert_utf8() that autodetects the encoding.
// This replaces the generic implementation of the function in utils.cc.

View file

@ -9,9 +9,10 @@
#include <cstddef> // size_t, std::byte
#include <cstdint> // int64_t
#include <deque>
#include <optional>
#include <string>
#include <string_view>
#include <optional>
#include <utility>
#include <fmt/core.h>
#include <fmt/compile.h>
@ -24,8 +25,6 @@
#include "libtransmission/utils.h"
#include "libtransmission/variant.h"
struct tr_error;
using namespace std::literals;
auto constexpr MaxBencStrLength = size_t{ 128 * 1024 * 1024 }; // arbitrary

View file

@ -9,7 +9,6 @@
#include <cstddef> // size_t
#include <cstdint> // int64_t
#include <optional>
#include <numeric>
#include <string>
#include <string_view>
#include <type_traits> // std::is_same_v

View file

@ -5,17 +5,15 @@
#include <algorithm>
#include <chrono>
#include <ctime>
#include <cstddef> // std::byte
#include <cstdint> // uint64_t, uint32_t
#include <mutex>
#include <optional>
#include <thread>
#include <vector>
#include <fmt/core.h>
#include "libtransmission/transmission.h"
#include "libtransmission/completion.h"
#include "libtransmission/crypto-utils.h"
#include "libtransmission/file.h"
#include "libtransmission/verify.h"

View file

@ -11,16 +11,18 @@
#include <atomic>
#include <condition_variable>
#include <cstdint>
#include <functional>
#include <list>
#include <memory>
#include <mutex>
#include <optional>
#include <set>
#include <string>
#include <thread>
#include <utility> // std::move
#include "libtransmission/transmission.h"
#include "libtransmission/torrent-metainfo.h"
#include "libtransmission/tr-macros.h"
class tr_verify_worker
{

View file

@ -20,8 +20,8 @@
#include <string_view>
#include <utility>
#include "timer.h"
#include "watchdir.h"
#include "libtransmission/timer.h"
#include "libtransmission/watchdir.h"
namespace libtransmission::impl
{

View file

@ -25,8 +25,11 @@
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils.h"
#include "libtransmission/watchdir.h"
#include "libtransmission/watchdir-base.h"
struct event_base;
namespace libtransmission
{

View file

@ -10,10 +10,7 @@
#include <memory>
#include <string_view>
extern "C"
{
struct event_base;
}
struct event_base;
namespace libtransmission
{

View file

@ -13,7 +13,6 @@
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include <event2/buffer.h>
@ -32,17 +31,19 @@
#include "libtransmission/torrent.h"
#include "libtransmission/tr-assert.h"
#include "libtransmission/tr-macros.h"
#include "libtransmission/tr-strbuf.h"
#include "libtransmission/utils-ev.h"
#include "libtransmission/utils.h"
#include "libtransmission/web-utils.h"
#include "libtransmission/web.h"
#include "libtransmission/webseed.h"
struct evbuffer;
using namespace std::literals;
namespace
{
class tr_webseed;
void on_idle(tr_webseed* w);

View file

@ -17,7 +17,6 @@
#include <libtransmission/announce-list.h>
#include <libtransmission/error.h>
#include <libtransmission/quark.h>
#include <libtransmission/torrent-metainfo.h>
#include <libtransmission/tr-strbuf.h>
#include <libtransmission/utils.h>

View file

@ -11,13 +11,10 @@
#define LIBTRANSMISSION_ANNOUNCER_MODULE
#include <libtransmission/transmission.h>
#include <libtransmission/announcer-common.h>
#include <libtransmission/net.h>
#include "gtest/gtest.h"
#include "test-fixtures.h"
using AnnouncerTest = ::testing::Test;

View file

@ -8,8 +8,6 @@
#include <fmt/core.h>
#include <libtransmission/transmission.h>
#include <libtransmission/benc.h>
#include <libtransmission/error.h>

View file

@ -8,13 +8,10 @@
#include <memory>
#include <string_view>
#include <libtransmission/transmission.h>
#include <libtransmission/crypto-utils.h>
#include <libtransmission/tr-buffer.h>
#include "gtest/gtest.h"
#include "test-fixtures.h"
using BufferTest = ::testing::Test;
using namespace std::literals;

View file

@ -10,6 +10,7 @@
#include <cstddef> // size_t, std::byte
#include <ctime> // time(), time_t
#include <fstream>
#include <functional>
#include <iterator> // std::back_inserter
#include <map>
#include <memory>
@ -35,6 +36,7 @@
#include <libtransmission/crypto-utils.h> // tr_rand_obj
#include <libtransmission/file.h>
#include <libtransmission/log.h>
#include <libtransmission/net.h>
#include <libtransmission/quark.h>
#include <libtransmission/session-thread.h> // for tr_evthread_init();

View file

@ -14,6 +14,7 @@
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#ifndef _WIN32
#include <sys/stat.h>

View file

@ -6,6 +6,7 @@
#include <array>
#include <chrono>
#include <cstddef> // size_t
#include <functional>
#include <memory>
#include <optional>
#include <string>

View file

@ -8,7 +8,6 @@
#include <cstdint> // int64_t
#include <locale>
#include <optional>
#include <stdexcept> // std::runtime_error
#include <string>
#include <string_view>

View file

@ -16,6 +16,7 @@
#include <libtransmission/crypto-utils.h> // tr_rand_obj()
#include <libtransmission/net.h>
#include <libtransmission/session.h>
#include <libtransmission/timer.h>
#include <libtransmission/tr-lpd.h>
#include <libtransmission/utils.h>

View file

@ -9,8 +9,6 @@
#include "gtest/gtest.h"
#include <libtransmission/transmission.h>
#include <libtransmission/crypto-utils.h> // tr_rand_buffer()
#include <libtransmission/magnet-metainfo.h>
#include <libtransmission/tr-macros.h>

View file

@ -3,11 +3,6 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <cstring>
#include <libtransmission/transmission.h>
#include <libtransmission/peer-msgs.h>
#include "gtest/gtest.h"
TEST(PeerMsgs, placeholder)

View file

@ -6,6 +6,7 @@
#include <array>
#include <cstdint> // uint64_t
#include <set>
#include <string>
#include <string_view>
#include <utility>

View file

@ -8,7 +8,6 @@
#include <vector>
#include <libtransmission/transmission.h>
#include <libtransmission/session.h>
#include <libtransmission/session-alt-speeds.h>
#include "gtest/gtest.h"

View file

@ -12,6 +12,7 @@
#include <libtransmission/log.h>
#include <libtransmission/net.h>
#include <libtransmission/peer-io.h>
#include <libtransmission/quark.h>
#include <libtransmission/session-settings.h>
#include <libtransmission/variant.h>

View file

@ -4,10 +4,13 @@
// License text can be found in the licenses/ folder.
#include <array>
#include <ctime>
#include <optional>
#include <tuple>
#include <utility>
#include <libtransmission/transmission.h>
#include <libtransmission/net.h>
#include <libtransmission/peer-mgr.h>

View file

@ -8,11 +8,11 @@
#include <cassert>
#include <cerrno>
#include <cmath> // lrint()
#include <cctype> // isspace()
#include <cstddef> // size_t
#include <cstdint> // int64_t
#include <string>
#include <string_view>
#include <vector>
#define LIBTRANSMISSION_VARIANT_MODULE