Commit Graph

3 Commits

Author SHA1 Message Date
Charles Kerr
5e305a2d26 refactor: simplify session callbacks (#8646)
* refactor: add a Torrent.id property

* feat: add Controller.torrentForId

* refactor: make tr_session_idle_limit_hit_func a std::function

* refactor: make tr_session_metadata_func a std::function

* refactor: make tr_session_ratio_limit_hit_func a std::function

* refactor: make tr_torrent_completeness_func a std::function

* refactor: make tr_altSpeedFunc a std::function

* refactor: make tr_sessionSetQueueStartCallback callback a std::function

* refactor: make tr_rpc_callback_status callback a std::function

* refactor: remove user_data arg from tr_torrent_rename_done_func

* refactor: harden `tr_torrentFindFromId()` by making it safe to pass in a nullptr session
2026-03-03 16:02:54 -06:00
Charles Kerr
aa8039cfb5 refactor: safeguard against nullptr tr_torrent* args in tr_torrentFoo() methods (#8550)
* refactor: safeguard against nullptr `tr_torrent*` args in `tr_torrentFoo()` methods (#8504)

* feat: safeguard tr_torrentFoo() calls against nullptr torrents

* refactor: tr_log_if_fail(tr_isTorrent(tor))

* test: add tests for invalid args to torrent C API

* fix: cppcoreguidelines-pro-type-member-init

* fix: readability-simplify-boolean-expr
2026-02-17 17:58:34 -06:00
Charles Kerr
cbaefab599 refactor: add libtransmission/types.h (#8449)
refactor: add libtransission/constants.h
2026-02-11 16:52:29 -06:00