crate::ix!();
pub const DEFAULT_RPC_SERIALIZE_VERSION: u32 = 1;
pub mod rpc_server {
pub fn on_started(slot: fn() -> ()) {
todo!();
}
pub fn on_stopped(slot: fn() -> ()) {
todo!();
}
}
pub trait RPCTimerBase { }
pub trait RPCTimerInterface: GetName {
}
pub trait NewTimer {
fn new_timer(&mut self,
func: &mut fn() -> (),
millis: i64) -> Rc<RefCell<dyn RPCTimerBase>>;
}
pub type RpcMethodFnType = fn() -> RPCHelpMan;
pub struct RPCCommand {
pub category: String,
pub name: String,
pub actor: rpc_command::Actor,
pub arg_names: Vec<String>,
pub unique_id: libc::intptr_t,
}
pub mod rpc_command {
use super::*;
pub type Actor = fn(
request: &JSONRPCRequest,
result: &mut UniValue,
last_handler: bool
) -> bool;
}
impl RPCCommand {
pub fn new(
category: String,
name: String,
actor: rpc_command::Actor,
args: Vec<String>,
unique_id: libc::intptr_t) -> Self {
todo!();
}
pub fn new_from_category_and_callback(
category: &str,
fn_: RpcMethodFnType) -> Self {
todo!();
}
}
pub struct RPCTable {
map_commands: HashMap<String,Vec<*const RPCCommand>>,
}
lazy_static!{
}
lazy_static!{
}
pub struct RPCCommandExecutionInfo
{
method: String,
start: i64,
}
pub struct RPCServerInfo
{
mutex: std::sync::Mutex<rpc_server_info::Inner>,
}
pub mod rpc_server_info {
use super::*;
pub struct Inner {
active_commands: LinkedList<RPCCommandExecutionInfo>,
}
}
lazy_static!{
}
pub struct RPCCommandExecution {
it: Box<dyn Iterator<Item = RPCCommandExecutionInfo>>,
}
impl Drop for RPCCommandExecution {
fn drop(&mut self) {
todo!();
}
}
impl RPCCommandExecution {
pub fn new(method: &String) -> Self {
todo!();
}
}
lazy_static!{
}
pub struct RPCServer {}
impl RPCServer {
pub fn on_started(&mut self, slot: fn() -> ()) {
todo!();
}
pub fn on_stopped(&mut self, slot: fn() -> ()) {
todo!();
}
}
impl RPCTable {
pub fn help(&self,
str_command: &String,
helpreq: &JSONRPCRequest) -> String {
todo!();
}
}
pub fn help() -> RPCHelpMan {
todo!();
}
pub fn stop() -> RPCHelpMan {
todo!();
}
pub fn uptime() -> RPCHelpMan {
todo!();
}
pub fn getrpcinfo() -> RPCHelpMan {
todo!();
}
lazy_static!{
}
impl Default for RPCTable {
fn default() -> Self {
todo!();
}
}
impl RPCTable {
pub fn append_command(&mut self,
name: &String,
pcmd: *const RPCCommand) {
todo!();
}
pub fn remove_command(&mut self,
name: &String,
pcmd: *const RPCCommand) -> bool {
todo!();
}
}
pub fn startrpc() {
todo!();
}
pub fn interruptrpc() {
todo!();
}
pub fn stoprpc() {
todo!();
}
pub fn is_rpc_running() -> bool {
todo!();
}
pub fn rpc_interruption_point() {
todo!();
}
pub fn set_rpc_warmup_status(new_status: &String) {
todo!();
}
pub fn set_rpc_warmup_finished() {
todo!();
}
pub fn rpc_is_in_warmup(out_status: *mut String) -> bool {
todo!();
}
pub fn is_deprecated_rpc_enabled(method: &String) -> bool {
todo!();
}
pub fn jsonrpc_exec_one(
jreq: JSONRPCRequest,
req: &UniValue) -> UniValue {
todo!();
}
pub fn jsonrpc_exec_batch(
jreq: &JSONRPCRequest,
req: &UniValue) -> String {
todo!();
}
#[inline] pub fn transform_named_arguments(
in_: &JSONRPCRequest,
arg_names: &Vec<String>) -> JSONRPCRequest {
todo!();
}
pub fn execute_commands(
commands: &Vec<*const RPCCommand>,
request: &JSONRPCRequest,
result: &mut UniValue) -> bool {
todo!();
}
impl RPCTable {
pub fn execute(&self, request: &JSONRPCRequest) -> UniValue {
todo!();
}
pub fn list_commands(&self) -> Vec<String> {
todo!();
}
pub fn dump_arg_map(&self, args_request: &JSONRPCRequest) -> UniValue {
todo!();
}
}
pub fn rpc_set_timer_interface_if_unset<'a>(iface: &'a mut dyn RPCTimerInterface) {
todo!();
}
pub fn rpc_set_timer_interface<'a>(iface: &'a mut dyn RPCTimerInterface) {
todo!();
}
pub fn rpc_unset_timer_interface<'a>(iface: &'a mut dyn RPCTimerInterface) {
todo!();
}
pub fn rpc_run_later(
name: &String,
func: fn() -> (),
n_seconds: i64) {
todo!();
}
pub fn rpc_serialization_flags() -> i32 {
todo!();
}
lazy_static!{
}
pub fn execute_command(
command: &RPCCommand,
request: &JSONRPCRequest,
result: &mut UniValue,
last_handler: bool) -> bool {
todo!();
}