plebble
peer_t.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_5369cd4184b5cf59017909fa4ac73e6f59eb5af656bfd6f5212953d549e6aba5
18 #define USGOV_5369cd4184b5cf59017909fa4ac73e6f59eb5af656bfd6f5212953d549e6aba5
19 
20 #include <us/gov/net_daemon.h>
21 #include <us/gov/net_peer.h>
22 
23 namespace us { namespace gov {
24 namespace engine {
25  using namespace std;
26 
29  enum stage_t {
30  unknown=0,
32  out,
36  num_stages
37  };
38  constexpr static array<const char*,num_stages> stagestr={"unknown","sysop","out","hall","node","device"};
39 
40  peer_t(int sock);
41  ~peer_t() override;
42  void dump(const string& prefix, ostream& os) const;
43  void dump_all(const string& prefix, ostream& os) const override;
44  void verification_completed(uint16_t rpport) override;
45  bool authorize(const pub_t& p, uint16_t pin) const override;
46  const keys& get_keys() const override;
47 
48  stage_t stage{unknown};
49  };
50 
51 }
52 }}
53 
54 #endif
55 
us::gov::auth::peer_t::stage_t
stage_t
Definition: peer_t.h:29
net_daemon.h
us::gov::engine::peer_t::device
@ device
Definition: peer_t.h:35
us::gov::engine::peer_t::verification_completed
void verification_completed(uint16_t rpport) override
us::gov::engine::peer_t::out
@ out
Definition: peer_t.h:32
us
Definition: daemon.h:22
us::gov::engine::peer_t::dump
void dump(const string &prefix, ostream &os) const
us::gov::engine::peer_t::sysop
@ sysop
Definition: peer_t.h:31
us::gov::engine::peer_t::authorize
bool authorize(const pub_t &p, uint16_t pin) const override
us::gov::engine::peer_t::~peer_t
~peer_t() override
us::gov::crypto::ec::keys::pub_t
Definition: ec.h:44
us::gov::engine::peer_t
Definition: peer_t.h:27
us::gov::engine::peer_t::hall
@ hall
Definition: peer_t.h:33
us::gov::peer::peer_t
Definition: peer_t.h:38
net_peer.h
us::gov::engine::peer_t::peer_t
peer_t(int sock)
us::gov::engine::peer_t::b
us::gov::net_peer b
Definition: peer_t.h:28
us::gov::engine::peer_t::get_keys
const keys & get_keys() const override
us::gov::engine::peer_t::dump_all
void dump_all(const string &prefix, ostream &os) const override
std
Definition: app.h:380
us::gov::crypto::ec::keys
Definition: ec.h:43
us::gov::engine::peer_t::node
@ node
Definition: peer_t.h:34