plebble
shell.h
Go to the documentation of this file.
1 /*
2 -------------------------------------------------------------------------------
3  PLEBBLE
4 -------------------------------------------------------------------------------
5  Copyright (C) 2019-2020 KATLAS Technology. (http://katlastechnology.com)
6  Copyright (C) 2017-2020 Marcos Mayorga. (mm@mm-studios.com)
7 
8  This file is part of our Plebble(R) Platform.
9 
10  The code below cannot be copied, used for any purpose other than the one
11  agreed and/or distributed without the express permission of
12  KATLAS Technology.
13 -------------------------------------------------------------------------------
14 
15 
16 */
17 #ifndef USGOV_a77bb134f65a2d28d9cf7823a14041036d606c371217ddd8b91b59f77a73b6b1
18 #define USGOV_a77bb134f65a2d28d9cf7823a14041036d606c371217ddd8b91b59f77a73b6b1
19 
20 #include <cstdint>
21 #include <string>
22 #include <iostream>
23 
24 namespace us { namespace gov {
25 namespace engine {
26  using namespace std;
27  struct daemon;
28  struct shell {
29  static constexpr int max_type_errors{3};
30  shell(daemon&d):d(d) {}
31  void help(ostream&) const;
32  string command(const string&);
33  void command(istream&, ostream&os);
34  bool test_node(const string& n, ostream& os);
35 
37  int level{7};
38  int cur_app{-1};
40  //int type_errors_left{max_type_errors};
41  };
42 
43 }}
44 }
45 
46 #endif
test_client::test_client
test_client(ostream &fos)
Definition: shell.cpp:113
app.h
cfg.h
test_client::b
us::gov::engine::peer_t b
Definition: shell.cpp:111
us::gov::cash::hash_t
hasher_t::value_type hash_t
Definition: app.h:55
us::gov::engine::shell::command
string command(const string &)
vcs.h
us
Definition: daemon.h:22
us::gov::crypto::ripemd160::value_type
Definition: ripemd160.h:38
test_client::os
ofstream * os
Definition: shell.cpp:158
PLATFORM
#define PLATFORM
Definition: config.h:19
app.h
test_client::verification_completed
void verification_completed(uint16_t rpport) override
Definition: shell.cpp:139
test_client::disconnect
void disconnect(uint16_t seq, const string &reason) override
Definition: shell.cpp:127
us::gov::engine::streams_version
static constexpr char streams_version
Definition: diff.h:44
daemon.h
us::gov::crypto::ec::keys::pub_t
Definition: ec.h:44
us.vcs.version
static String version()
Definition: vcs.java:39
us::gov::engine::peer_t
Definition: peer_t.h:27
us::gov::auth::daemon
id::daemon daemon
Definition: daemon.h:25
us::gov::socket::datagram::system_channel
static uint16_t system_channel
Definition: datagram.h:199
test_client::authorize
bool authorize(const pubkey_t &p, uint16_t pin) const override
Definition: shell.cpp:152
us::gov::socket::server::dump
void dump(const string &prefix, ostream &os) const
us::gov::engine::shell
Definition: shell.h:28
us::gov::engine::shell::test_node
bool test_node(const string &n, ostream &os)
us::gov::engine::db_analyst::print_chain
static void print_chain(const string &home, const string &tip, ostream &os)
us::gov::id::daemon
Definition: daemon.h:28
us::gov::dfs::daemon
Definition: daemon.h:44
us::gov::engine::daemon
Definition: daemon.h:71
test_client
Definition: shell.cpp:110
us::gov::socket::server
Definition: server.h:45
test_client::~test_client
~test_client() override
Definition: shell.cpp:122
us::gov::engine
Definition: hmi.h:32
std
Definition: app.h:380
db_analyst.h
auth.h
stacktrace.h
us::gov::engine::shell::command
void command(istream &, ostream &os)
us::gov::io::cfg::parse_host
static pair< uint32_t, uint16_t > parse_host(const string &addrport)
us::gov::crypto::ec::keys
Definition: ec.h:43
us::gov::socket::client::is_valid_ip
static bool is_valid_ip(uint32_t)
c
us::gov::engine::shell c
Definition: shell.cpp:37
test_client::get_keys
const keys & get_keys() const override
Definition: shell.cpp:133
gov.h
shell.h
us::gov::id::peer_t
Definition: peer_t.h:35
us::gov::engine::shell::memory_cmd_lvl
string memory_cmd_lvl
Definition: shell.h:39
auth_app.h
client.h
LOGDIR
#define LOGDIR
Definition: config.h:12
us::gov::engine::shell::shell
shell(daemon &d)
Definition: shell.h:30
us::gov::engine::shell::help
void help(ostream &) const
us::gov::socket::client::ip4_decode
static string ip4_decode(uint32_t addr)
us::gov::engine::shell::d
daemon & d
Definition: shell.h:36