Electroneum
command_parser_executor.h
Go to the documentation of this file.
1 
9 // Copyrights(c) 2017-2019, The Electroneum Project
10 // Copyrights(c) 2014-2017, The Monero Project
11 //
12 // All rights reserved.
13 //
14 // Redistribution and use in source and binary forms, with or without modification, are
15 // permitted provided that the following conditions are met:
16 //
17 // 1. Redistributions of source code must retain the above copyright notice, this list of
18 // conditions and the following disclaimer.
19 //
20 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
21 // of conditions and the following disclaimer in the documentation and/or other
22 // materials provided with the distribution.
23 //
24 // 3. Neither the name of the copyright holder nor the names of its contributors may be
25 // used to endorse or promote products derived from this software without specific
26 // prior written permission.
27 //
28 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
29 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
31 // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
33 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
35 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
36 // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 
38 #pragma once
39 
40 #include <boost/optional/optional_fwd.hpp>
41 
43 #include "common/common_fwd.h"
44 #include "rpc/core_rpc_server.h"
45 
46 namespace daemonize {
47 
49 {
50 private:
52 public:
54  uint32_t ip
55  , uint16_t port
56  , const boost::optional<tools::login>& login
57  , bool is_rpc
58  , cryptonote::core_rpc_server* rpc_server = NULL
59  );
60 
61  bool print_peer_list(const std::vector<std::string>& args);
62 
63  bool print_peer_list_stats(const std::vector<std::string>& args);
64 
65  bool save_blockchain(const std::vector<std::string>& args);
66 
67  bool show_hash_rate(const std::vector<std::string>& args);
68 
69  bool hide_hash_rate(const std::vector<std::string>& args);
70 
71  bool show_difficulty(const std::vector<std::string>& args);
72 
73  bool show_status(const std::vector<std::string>& args);
74 
75  bool print_connections(const std::vector<std::string>& args);
76 
77  bool print_blockchain_info(const std::vector<std::string>& args);
78 
79  bool set_log_level(const std::vector<std::string>& args);
80 
81  bool set_log_categories(const std::vector<std::string>& args);
82 
83  bool print_height(const std::vector<std::string>& args);
84 
85  bool print_block(const std::vector<std::string>& args);
86 
87  bool print_transaction(const std::vector<std::string>& args);
88 
89  bool is_key_image_spent(const std::vector<std::string>& args);
90 
91  bool print_transaction_pool_long(const std::vector<std::string>& args);
92 
93  bool print_transaction_pool_short(const std::vector<std::string>& args);
94 
95  bool print_transaction_pool_stats(const std::vector<std::string>& args);
96 
97  bool start_mining(const std::vector<std::string>& args);
98 
99  bool stop_mining(const std::vector<std::string>& args);
100 
101  bool stop_daemon(const std::vector<std::string>& args);
102 
103  bool print_status(const std::vector<std::string>& args);
104 
105  bool set_limit(const std::vector<std::string>& args);
106 
107  bool set_limit_up(const std::vector<std::string>& args);
108 
109  bool set_limit_down(const std::vector<std::string>& args);
110 
111  bool out_peers(const std::vector<std::string>& args);
112 
113  bool start_save_graph(const std::vector<std::string>& args);
114 
115  bool stop_save_graph(const std::vector<std::string>& args);
116 
117  bool hard_fork_info(const std::vector<std::string>& args);
118 
119  bool show_bans(const std::vector<std::string>& args);
120 
121  bool ban(const std::vector<std::string>& args);
122 
123  bool unban(const std::vector<std::string>& args);
124 
125  bool flush_txpool(const std::vector<std::string>& args);
126 
127  bool output_histogram(const std::vector<std::string>& args);
128 
129  bool print_coinbase_tx_sum(const std::vector<std::string>& args);
130 
131  bool alt_chain_info(const std::vector<std::string>& args);
132 
133  bool print_blockchain_dynamic_stats(const std::vector<std::string>& args);
134 
135  bool update(const std::vector<std::string>& args);
136 
137  bool relay_tx(const std::vector<std::string>& args);
138 
139  bool sync_info(const std::vector<std::string>& args);
140 
141  bool set_validator_key(const std::vector<std::string>& args);
142 
143  bool generate_ed25519_keypair(const std::vector<std::string>& args);
144 
145  bool sign_message(const std::vector<std::string>& args);
146 };
147 
148 } // namespace daemonize
bool start_mining(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:243
bool stop_save_graph(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:412
t_rpc_command_executor m_executor
Definition: command_parser_executor.h:51
bool show_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:90
bool print_transaction_pool_long(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:222
bool show_bans(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:440
bool flush_txpool(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:469
bool print_connections(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:97
bool hide_hash_rate(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:76
bool print_transaction_pool_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:236
bool print_transaction_pool_short(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:229
Definition: command_parser_executor.cpp:36
bool unban(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:462
bool print_block(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:158
bool set_limit_up(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:351
bool print_transaction(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:184
bool sign_message(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:612
bool stop_daemon(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:318
bool stop_mining(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:311
bool set_log_categories(const std::vector< std::string > &args)
bool hard_fork_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:418
Definition: command_parser_executor.h:48
bool relay_tx(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:568
bool set_validator_key(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:590
bool ban(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:446
bool print_coinbase_tx_sum(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:505
bool print_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:325
bool output_histogram(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:487
bool set_log_level(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:127
bool generate_ed25519_keypair(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:605
bool print_peer_list_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:55
bool set_limit_down(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:370
Definition: rpc_command_executor.h:54
bool show_difficulty(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:83
bool update(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:557
bool alt_chain_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:528
bool print_blockchain_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:104
bool show_hash_rate(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:69
t_command_parser_executor(uint32_t ip, uint16_t port, const boost::optional< tools::login > &login, bool is_rpc, cryptonote::core_rpc_server *rpc_server=NULL)
Definition: command_parser_executor.cpp:38
bool print_peer_list(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:48
Definition: core_rpc_server.h:52
bool set_limit(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:332
bool sync_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:583
bool start_save_graph(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:406
bool print_blockchain_dynamic_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:539
bool out_peers(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:389
bool is_key_image_spent(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:202
bool save_blockchain(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:62
bool print_height(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:151