2014-03-13 22:22:32 +04:00
|
|
|
#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:
|
|
|
|
|
2014-04-01 23:18:14 +04:00
|
|
|
AddressBook ();
|
|
|
|
const IdentHash * FindAddress (const std::string& address);
|
2014-03-13 22:22:32 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2014-04-01 23:18:14 +04:00
|
|
|
void LoadHosts ();
|
2014-04-06 23:22:33 +04:00
|
|
|
void LoadHostsFromI2P ();
|
2014-03-13 22:22:32 +04:00
|
|
|
|
|
|
|
std::map<std::string, IdentHash> m_Addresses;
|
2014-08-14 22:32:00 +04:00
|
|
|
bool m_IsLoaded, m_IsDowloading;
|
2014-03-13 22:22:32 +04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|