feat: add libtransmission::api_compat::convert() (#7917)

Add a module to convert between tr4 and tr5 RPC / settings / config file payloads.

This will be used as a compatibility layer between Transmission 5's naming scheme
and Transmission <= 4.

Co-authored-by: Yat Ho <lagoho7@gmail.com>
Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
This commit is contained in:
Charles Kerr
2025-12-14 10:56:07 -06:00
committed by GitHub
parent 98fdf2dc0b
commit 9a792046f3
13 changed files with 1600 additions and 335 deletions

View File

@@ -5,6 +5,7 @@
#pragma once
#include <cstdint> // int16_t
#include <functional>
struct tr_session;
@@ -34,7 +35,9 @@ enum Code : int16_t
HTTP_ERROR,
CORRUPT_TORRENT
};
}
[[nodiscard]] std::string_view to_string(Code code);
} // namespace Error
} // namespace JsonRpc
using tr_rpc_response_func = std::function<void(tr_session* session, tr_variant&& response)>;