transmission/libtransmission
Charles Kerr c42a6c785d
refactor: replace tr_list with std::set in web.cc (#1845)
2021-09-27 11:27:02 -05:00
..
CMakeLists.txt build: use CXX_WARNING_FLAGS in libtransmission (#1824) 2021-09-21 08:56:34 -05:00
ConvertUTF.c
ConvertUTF.h
README.md refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
announcer-common.h perf: prioritize announces based on scrape stats (#1782) 2021-09-09 19:28:22 -05:00
announcer-http.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
announcer-udp.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
announcer.cc refactor: use std container for session torrents (#1832) 2021-09-24 18:31:02 -05:00
announcer.h perf: use scrape to know when a private swarm is all-seeds (#1780) 2021-09-09 15:25:30 -05:00
bandwidth.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
bandwidth.h C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
bitfield.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
bitfield.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
blocklist.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
blocklist.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
cache.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
cache.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
clients.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
clients.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
completion.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
completion.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
crypto-utils-cyassl.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
crypto-utils-fallback.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
crypto-utils-openssl.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
crypto-utils-polarssl.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
crypto-utils.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
crypto-utils.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
crypto.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
crypto.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
error-types.h
error.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
error.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
fdlimit.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
fdlimit.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
file-posix.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
file-win32.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
file.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
file.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
handshake.cc fix: dead store warning in handshake.cc (#1803) 2021-09-14 21:23:53 -05:00
handshake.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
history.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
history.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
inout.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
inout.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
jsonsl.c chore: update jsonsl parser snapshot (#1050) 2019-11-09 18:06:36 -06:00
jsonsl.h C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
libt.dox
list.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
list.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
log.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
log.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
magnet.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
magnet.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
makemeta.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
makemeta.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
metainfo.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
metainfo.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
mime-types.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
mime-types.h feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
mime-types.js feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
natpmp.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
natpmp_local.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
net.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
net.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
peer-common.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
peer-io.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
peer-io.h C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
peer-mgr.cc refactor: use std container for session torrents (#1832) 2021-09-24 18:31:02 -05:00
peer-mgr.h perf: use scrape to know when a private swarm is all-seeds (#1780) 2021-09-09 15:25:30 -05:00
peer-msgs.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
peer-msgs.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
peer-socket.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
platform-quota.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
platform-quota.h
platform.cc refactor: replace tr_list with std::list in tr_getWebClientDir() (#1843) 2021-09-27 08:45:21 -05:00
platform.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
port-forwarding.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
port-forwarding.h
ptrarray.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
ptrarray.h C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
quark.cc Reimplement quarks order check as a static assert (#1836) 2021-09-25 08:56:34 -05:00
quark.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
resume.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
resume.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
rpc-server.cc refactor: replace tr_list with std::list in rpc-server whitelists (#1844) 2021-09-27 10:03:54 -05:00
rpc-server.h configure anti brute force (#1447) 2020-11-14 12:43:42 -06:00
rpcimpl.cc refactor: tr_parseNumberRange returns std::vector. (#1838) 2021-09-25 14:37:28 -05:00
rpcimpl.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
session-id.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
session-id.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
session.cc refactor: replace tr_list with std::list in sessionLoadTorrents() (#1841) 2021-09-26 17:23:11 -05:00
session.h refactor: use std container for session torrents (#1832) 2021-09-24 18:31:02 -05:00
stats.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
stats.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
subprocess-posix.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
subprocess-win32.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
subprocess.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
torrent-ctor.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
torrent-magnet.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
torrent-magnet.h fix: 'enumerated and non-enumerated type' warnings (#1810) 2021-09-16 11:22:33 -05:00
torrent.cc refactor: use std container for session torrents (#1832) 2021-09-24 18:31:02 -05:00
torrent.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
tr-assert.cc refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
tr-assert.h
tr-dht.cc refactor: use std container for session torrents (#1832) 2021-09-24 18:31:02 -05:00
tr-dht.h
tr-getopt.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
tr-getopt.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
tr-lpd.cc refactor: use std container for session torrents (#1832) 2021-09-24 18:31:02 -05:00
tr-lpd.h chore: fix compiler warnings (#1412) 2020-08-27 18:41:26 -05:00
tr-macros.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
tr-udp.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
tr-udp.h
tr-utp.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
tr-utp.h
transmission.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
trevent.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
trevent.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
upnp.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
upnp.h refactor: port libtransmission to C++ (#1787) 2021-09-12 12:41:49 -05:00
utils.cc refactor: tr_parseNumberRange returns std::vector. (#1838) 2021-09-25 14:37:28 -05:00
utils.h refactor: tr_parseNumberRange returns std::vector. (#1838) 2021-09-25 14:37:28 -05:00
variant-benc.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
variant-common.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
variant-json.cc refactor: use std::list in variant-json.cc (#1842) 2021-09-27 07:46:38 -05:00
variant.cc refactor: variant fixups (#1811) 2021-09-15 17:11:00 -05:00
variant.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
verify.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
verify.h
version.h.in
watchdir-common.h Switch to clang-format for code formatting, include Mac client 2021-08-16 00:38:29 +03:00
watchdir-generic.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
watchdir-inotify.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
watchdir-kqueue.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
watchdir-win32.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
watchdir.cc C++ modernization: Replace NULLs with typesafe nullptrs (#1799) 2021-09-14 19:18:09 -05:00
watchdir.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
web.cc refactor: replace tr_list with std::set in web.cc (#1845) 2021-09-27 11:27:02 -05:00
web.h refactor: remove TR_BEGIN_DECLS, TR_END_DECLS (#1837) 2021-09-25 11:07:22 -05:00
webseed.cc C++ modernize: Replace MIN/MAX with type safe std::min/std::max (#1806) 2021-09-19 15:41:35 -05:00
webseed.h
wildmat.c refactor: tr_parseNumberRange returns std::vector. (#1838) 2021-09-25 14:37:28 -05:00

README.md

Notes on the C-to-C++ Conversion

  • libtransmission was written in C for fifteen years, so eliminating all Cisms is nearly impossible. Modernization patches are welcomed but it won't all happen overnight. tr_strdup() and constexpr wil exist side-by-side in the codebase for the forseeable future.

  • It's so tempting to refactor all the things! Please keep modernization patches reasonably focused so that they will be easy to review.

  • Prefer std:: tools over bespoke ones. For example, use std::vector instead of tr_ptrArray. Redundant bespoke code should be removed.

  • Consider ripple effects before adding C++ into public headers. Will it break C code that #includes that header?