Struct bitcoin_qt::RPCConsole
source · pub struct RPCConsole { /* private fields */ }
Expand description
| Local Bitcoin RPC console. |
Implementations§
source§impl RPCConsole
impl RPCConsole
pub fn rpc_execute_command_line( node: Rc<RefCell<dyn NodeInterface>>, str_result: &mut String, str_command: &String, pstr_filtered_out: Option<*mut String>, wallet_model: Option<*const WalletModel> ) -> bool
pub fn tabs(&self) -> Vec<TabTypes>
sourcepub fn message(&mut self, category: i32, msg: &String)
pub fn message(&mut self, category: i32, msg: &String)
| Append the message to the message widget |
sourcepub fn cmd_request(
&mut self,
command: &String,
wallet_model: *const WalletModel
)
pub fn cmd_request( &mut self, command: &String, wallet_model: *const WalletModel )
| For RPC command executor |
sourcepub fn time_duration_field(&self, time_now: u64, time_at_event: u64) -> String
pub fn time_duration_field(&self, time_now: u64, time_at_event: u64) -> String
| Helper for the output of a time duration | field. Inputs are UNIX epoch times. |
sourcepub fn rpc_parse_command_line(
&mut self,
node: Rc<RefCell<dyn NodeInterface>>,
str_result: &mut String,
str_command: &String,
execute: bool,
pstr_filtered_out: *mut String,
wallet_model: *const WalletModel
) -> bool
pub fn rpc_parse_command_line( &mut self, node: Rc<RefCell<dyn NodeInterface>>, str_result: &mut String, str_command: &String, execute: bool, pstr_filtered_out: *mut String, wallet_model: *const WalletModel ) -> bool
| Split shell command line into a list | of arguments and optionally execute | the command(s). | | Aims to emulate \c bash and friends. | | - Command nesting is possible with parenthesis; | for example: validateaddress(getnewaddress()) | | - Arguments are delimited with whitespace | or comma | | - Extra whitespace at the beginning | and end and between arguments will be | ignored | | - Text can be “double” or ‘single’ quoted | | - The backslash \c \ is used as escape | character | | - Outside quotes, any character can | be escaped | | - Within double quotes, only escape | \c “ and backslashes before a \c “ or another | backslash | | - Within single quotes, no escaping | is possible and no special interpretation | takes place | | ———– | @param[in] node | | optional node to execute command on | ––––– | @param[out] strResult | | stringified result from the executed | command(chain) | ––––– | @param[in] strCommand | | Command line to split | ––––– | @param[in] fExecute | | set true if you want the command to be | executed | ––––– | @param[out] pstrFilteredOut | | Command line, filtered to remove any | sensitive data |
pub fn new( node: Rc<RefCell<dyn NodeInterface>>, platform_style: &PlatformStyle, parent: *mut u32 ) -> Self
pub fn event_filter(&mut self, obj: *mut u32, event: *mut u32) -> bool
pub fn set_client_model( &mut self, model: *mut ClientModel, bestblock_height: Option<i32>, bestblock_date: Option<i64>, verification_progress: Option<f64> )
pub fn font_bigger(&mut self)
pub fn font_smaller(&mut self)
pub fn set_font_size(&mut self, new_size: i32)
pub fn clear(&mut self, keep_prompt: Option<bool>)
pub fn key_press_event(&mut self, event: *mut u32)
pub fn change_event(&mut self, e: *mut u32)
pub fn message_with_html(&mut self, category: i32, message: &String, html: bool)
sourcepub fn update_network_state(&mut self)
pub fn update_network_state(&mut self)
| Update UI with latest network info from | model. |
sourcepub fn set_num_connections(&mut self, count: i32)
pub fn set_num_connections(&mut self, count: i32)
| Set number of connections shown in the | UI |
sourcepub fn set_network_active(&mut self, network_active: bool)
pub fn set_network_active(&mut self, network_active: bool)
| Set network state shown in the UI |
sourcepub fn set_num_blocks(
&mut self,
count: i32,
block_date: &u32,
n_verification_progress: f64,
headers: bool
)
pub fn set_num_blocks( &mut self, count: i32, block_date: &u32, n_verification_progress: f64, headers: bool )
| Set number of blocks and last block date | shown in the UI |
sourcepub fn set_mempool_size(&mut self, number_of_txs: i64, dyn_usage: usize)
pub fn set_mempool_size(&mut self, number_of_txs: i64, dyn_usage: usize)
| Set size (number of transactions and | memory usage) of the mempool in the UI |
pub fn on_line_edit_return_pressed(&mut self)
sourcepub fn browse_history(&mut self, offset: i32)
pub fn browse_history(&mut self, offset: i32)
| Go forward or back in history |
pub fn start_executor(&mut self)
pub fn on_tab_widget_current_changed(&mut self, index: i32)
| open the debug.log from the current | datadir |
sourcepub fn scroll_to_end(&mut self)
pub fn scroll_to_end(&mut self)
| Scroll console view to end |
sourcepub fn on_sld_graph_range_value_changed(&mut self, value: i32)
pub fn on_sld_graph_range_value_changed(&mut self, value: i32)
| change the time range of the network | traffic graph |
pub fn set_traffic_graph_range(&mut self, mins: i32)
sourcepub fn update_traffic_stats(
&mut self,
total_bytes_in: u64,
total_bytes_out: u64
)
pub fn update_traffic_stats( &mut self, total_bytes_in: u64, total_bytes_out: u64 )
| update traffic statistics |
sourcepub fn update_detail_widget(&mut self)
pub fn update_detail_widget(&mut self)
| show detailed information on ui about | selected node |
pub fn resize_event(&mut self, event: *mut u32)
pub fn show_event(&mut self, event: *mut u32)
pub fn hide_event(&mut self, event: *mut u32)
| Show custom context menu on Peers tab |
| Show custom context menu on Bans tab |
sourcepub fn disconnect_selected_node(&mut self)
pub fn disconnect_selected_node(&mut self)
| Disconnect a selected node on the Peers | tab |
sourcepub fn ban_selected_node(&mut self, bantime: i32)
pub fn ban_selected_node(&mut self, bantime: i32)
| Ban a selected node on the Peers tab |
sourcepub fn unban_selected_node(&mut self)
pub fn unban_selected_node(&mut self)
| Unban a selected node on the Bans tab |
sourcepub fn clear_selected_node(&mut self)
pub fn clear_selected_node(&mut self)
| clear the selected node |
sourcepub fn show_or_hide_ban_table_if_required(&mut self)
pub fn show_or_hide_ban_table_if_required(&mut self)
| Hides ban table if no bans are present |
sourcepub fn set_tab_focus(&mut self, tab_type: TabTypes)
pub fn set_tab_focus(&mut self, tab_type: TabTypes)
| set which tab has the focus (is visible) |