mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
601 B
37 lines
601 B
#ifndef ADDRESS_BOOK_H__ |
|
#define ADDRESS_BOOK_H__ |
|
|
|
#include <string.h> |
|
#include <string> |
|
#include <map> |
|
#include "base64.h" |
|
#include "util.h" |
|
#include "Identity.h" |
|
#include "Log.h" |
|
|
|
namespace i2p |
|
{ |
|
namespace data |
|
{ |
|
class AddressBook |
|
{ |
|
public: |
|
|
|
AddressBook (); |
|
const IdentHash * FindAddress (const std::string& address); |
|
void InsertAddress (const std::string& address, const std::string& base64); // for jump service |
|
|
|
private: |
|
|
|
void LoadHosts (); |
|
void LoadHostsFromI2P (); |
|
|
|
std::map<std::string, IdentHash> m_Addresses; |
|
bool m_IsLoaded, m_IsDowloading; |
|
}; |
|
} |
|
} |
|
|
|
#endif |
|
|
|
|
|
|