plebble
us::gov::io::cfg Class Reference

#include <cfg.h>

Inheritance diagram for us::gov::io::cfg:
Collaboration diagram for us::gov::io::cfg:

Public Types

typedef cfg1 b
 
typedef crypto::ripemd160::value_type pubkeyh_t
 
- Public Types inherited from us::gov::io::cfg1
typedef cfg0 b
 
typedef crypto::ec::keys keys_t
 

Public Member Functions

 cfg (const keys_t::priv_t &privk, const string &home, vector< pair< uint32_t, uint16_t >> &&seed_nodes)
 
 cfg (const cfg &other)
 
virtual ~cfg ()
 
- Public Member Functions inherited from us::gov::io::cfg1
virtual ~cfg1 ()
 
 cfg1 (const keys_t::priv_t &privk, const string &home)
 
 cfg1 (const cfg1 &other)
 
 cfg1 (PrivateKey privk, String home_)
 
 cfg1 (cfg1 other)
 
- Public Member Functions inherited from us::gov::io::cfg0
virtual ~cfg0 ()
 
 cfg0 (const string &home)
 
 cfg0 (const cfg0 &other)
 
 cfg0 (String home_)
 
 cfg0 (cfg0 other)
 

Static Public Member Functions

static vector< pair< pubkeyh_t, pair< uint32_t, uint16_t > > > parse_nodes_file2 (const string &absfile)
 
static void parse_nodes_file (vector< pair< uint32_t, uint16_t >> &, const string &absfile)
 
static pair< uint32_t, uint16_t > parse_host (const string &addrport)
 
static pair< ko, cfg * > load (const string &home, bool gen)
 
- Static Public Member Functions inherited from us::gov::io::cfg1
static pair< us::ko, keys_t::priv_tload_sk (const string &home)
 
static string k_file (const string &home)
 
static ko write_k (const string &home, const keys_t::priv_t &priv)
 
static pair< ko, cfg1 * > load (const string &home, bool gen)
 
static String k_file (String home)
 
static ko write_k (String home, PrivateKey priv)
 
static String read_file (String path, Charset encoding) throws IOException
 
static pair< ko, PrivateKey > load_sk (String home)
 
static pair< ko, cfg1load (String home, boolean gen)
 
- Static Public Member Functions inherited from us::gov::io::cfg0
static void check_platform ()
 
static bool is_big_endian ()
 
static bool mkdir (const string &d)
 
static bool file_exists (const string &f)
 
static uint32_t file_size (const string &f)
 
static bool ensure_dir (const string &d)
 
static string rewrite_path (const string &)
 
static bool dir_exists (const string &d)
 
static string abs_file (const string &home, const string &fn)
 
static void mkdir_tree (string sub, string dir)
 
static pair< us::ko, cfg0load (const string &home)
 
static void trim (string &)
 
static void to_identifier (string &)
 
static string directory_of_file (const string &file)
 
static bool ensure_writable (const string &file)
 
static string file_content (const string &file)
 
static void check_platform ()
 
static String abs_file (String home, String fn)
 
static boolean dir_exists (String d)
 
static boolean file_exists (String s)
 
static boolean ensure_dir (String d)
 
static pair< ko, cfg0load (String home)
 
static String rewrite_path (String d)
 
static byte[] read_file (String filename)
 
static String read_text_file (String filename)
 

Public Attributes

vector< pair< uint32_t, uint16_t > > seed_nodes
 
- Public Attributes inherited from us::gov::io::cfg1
keys_t keys
 
KeyPair keys
 
- Public Attributes inherited from us::gov::io::cfg0
string home
 

Additional Inherited Members

- Static Public Attributes inherited from us::gov::io::cfg1
static const char * KO_97832
 
static const char * KO_96857
 
static const char * KO_30291
 
static const char * KO_50493
 
static const char * KO_60987
 
static final ko KO_30291 =new ko("KO 30291 invalid k file.")
 
static final ko KO_97832 =new ko("KO 97832 Secret key not found.")
 
static final ko KO_96857 =new ko("KO 96857 Invalid private key.")
 
static final ko KO_50493 =new ko("KO 50493 Cannot create home dir.")
 
static final ko KO_97032 =new ko("KO 97032 Cannot create k file.")
 
static final ko KO_60593 =new ko("KO 60593 Failure generating keys.")
 
static final ko KO_86059 =new ko("KO 86059 Unable to set posix permissions.")
 
- Static Public Attributes inherited from us::gov::io::cfg0
static const char * KO_96857
 
static const char * KO_60534
 
static final ko KO_60534 =new ko("KO 60534 Cannot create home dir.")
 
- Package Attributes inherited from us::gov::io::cfg0
String home
 

Member Typedef Documentation

◆ b

◆ pubkeyh_t

Constructor & Destructor Documentation

◆ cfg() [1/2]

us::gov::io::cfg::cfg ( const keys_t::priv_t privk,
const string &  home,
vector< pair< uint32_t, uint16_t >> &&  seed_nodes 
)

◆ cfg() [2/2]

us::gov::io::cfg::cfg ( const cfg other)

◆ ~cfg()

virtual us::gov::io::cfg::~cfg ( )
virtual

Member Function Documentation

◆ load()

static pair<ko,cfg*> us::gov::io::cfg::load ( const string &  home,
bool  gen 
)
static

◆ parse_host()

static pair<uint32_t,uint16_t> us::gov::io::cfg::parse_host ( const string &  addrport)
static

◆ parse_nodes_file()

static void us::gov::io::cfg::parse_nodes_file ( vector< pair< uint32_t, uint16_t >> &  ,
const string &  absfile 
)
static

◆ parse_nodes_file2()

static vector<pair<pubkeyh_t,pair<uint32_t,uint16_t> > > us::gov::io::cfg::parse_nodes_file2 ( const string &  absfile)
static

Member Data Documentation

◆ seed_nodes

vector<pair<uint32_t,uint16_t> > us::gov::io::cfg::seed_nodes

The documentation for this class was generated from the following file: