mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
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:
@@ -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)>;
|
||||
|
||||
Reference in New Issue
Block a user