|
|
@ -78,7 +78,7 @@ namespace data |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
RouterInfo (const std::string& fullPath); |
|
|
|
RouterInfo (const std::string& fullPath); |
|
|
|
RouterInfo (): m_Buffer (nullptr) { m_IdentHashBase64[0] = 0; m_IdentHashAbbreviation[0] = 0; }; |
|
|
|
RouterInfo (): m_Buffer (nullptr) { }; |
|
|
|
RouterInfo (const RouterInfo& ) = default; |
|
|
|
RouterInfo (const RouterInfo& ) = default; |
|
|
|
RouterInfo& operator=(const RouterInfo& ) = default; |
|
|
|
RouterInfo& operator=(const RouterInfo& ) = default; |
|
|
|
RouterInfo (const uint8_t * buf, int len); |
|
|
|
RouterInfo (const uint8_t * buf, int len); |
|
|
@ -86,8 +86,8 @@ namespace data |
|
|
|
|
|
|
|
|
|
|
|
const Identity& GetRouterIdentity () const { return m_RouterIdentity; }; |
|
|
|
const Identity& GetRouterIdentity () const { return m_RouterIdentity; }; |
|
|
|
void SetRouterIdentity (const Identity& identity); |
|
|
|
void SetRouterIdentity (const Identity& identity); |
|
|
|
const char * GetIdentHashBase64 () const { return m_IdentHashBase64; }; |
|
|
|
std::string GetIdentHashBase64 () const { return m_IdentHash.ToBase64 (); }; |
|
|
|
const char * GetIdentHashAbbreviation () const { return m_IdentHashAbbreviation; }; |
|
|
|
std::string GetIdentHashAbbreviation () const { return m_IdentHash.ToBase64 ().substr (0, 4); }; |
|
|
|
uint64_t GetTimestamp () const { return m_Timestamp; }; |
|
|
|
uint64_t GetTimestamp () const { return m_Timestamp; }; |
|
|
|
std::vector<Address>& GetAddresses () { return m_Addresses; }; |
|
|
|
std::vector<Address>& GetAddresses () { return m_Addresses; }; |
|
|
|
const Address * GetNTCPAddress (bool v4only = true) const; |
|
|
|
const Address * GetNTCPAddress (bool v4only = true) const; |
|
|
@ -143,7 +143,6 @@ namespace data |
|
|
|
size_t ReadString (char * str, std::istream& s); |
|
|
|
size_t ReadString (char * str, std::istream& s); |
|
|
|
void WriteString (const std::string& str, std::ostream& s); |
|
|
|
void WriteString (const std::string& str, std::ostream& s); |
|
|
|
void ExtractCaps (const char * value); |
|
|
|
void ExtractCaps (const char * value); |
|
|
|
void UpdateIdentHashBase64 (); |
|
|
|
|
|
|
|
const Address * GetAddress (TransportStyle s, bool v4only) const; |
|
|
|
const Address * GetAddress (TransportStyle s, bool v4only) const; |
|
|
|
void UpdateCapsProperty (); |
|
|
|
void UpdateCapsProperty (); |
|
|
|
|
|
|
|
|
|
|
@ -152,7 +151,6 @@ namespace data |
|
|
|
std::string m_FullPath; |
|
|
|
std::string m_FullPath; |
|
|
|
Identity m_RouterIdentity; |
|
|
|
Identity m_RouterIdentity; |
|
|
|
IdentHash m_IdentHash; |
|
|
|
IdentHash m_IdentHash; |
|
|
|
char m_IdentHashBase64[48], m_IdentHashAbbreviation[5]; |
|
|
|
|
|
|
|
uint8_t * m_Buffer; |
|
|
|
uint8_t * m_Buffer; |
|
|
|
int m_BufferLen; |
|
|
|
int m_BufferLen; |
|
|
|
uint64_t m_Timestamp; |
|
|
|
uint64_t m_Timestamp; |
|
|
|