Files
rtorrent/src/rpc/jsonrpc.h
T
kannibalox 9f48226663 Add JSON-RPC capability
Inline nlohmann/json for the JSON parsing itself, and handle requests
with the same SCGI interface as XML-RPC.

Based off the work in https://github.com/jesec/rtorrent
2025-01-20 12:31:04 +01:00

25 lines
447 B
C++

#ifndef RTORRENT_RPC_JSONRPC_H
#define RTORRENT_RPC_JSONRPC_H
#include <functional>
#include <cstdint>
namespace rpc {
class JsonRpc {
public:
using slot_write = std::function<bool(const char*, uint32_t)>;
void initialize() {};
void cleanup() {};
bool process(const char* in_buffer, uint32_t length, slot_write callback);
void insert_command(const char* name, const char* parm, const char* doc) {};
};
} // namespace rpc
#endif