mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
Remove ClientContext.h dependency
This commit is contained in:
parent
75f6cc4319
commit
c1a29b08ac
@ -23,6 +23,8 @@ namespace client
|
|||||||
const int CONTINIOUS_SUBSCRIPTION_UPDATE_TIMEOUT = 240; // in minutes
|
const int CONTINIOUS_SUBSCRIPTION_UPDATE_TIMEOUT = 240; // in minutes
|
||||||
const int CONTINIOUS_SUBSCRIPTION_RETRY_TIMEOUT = 5; // in minutes
|
const int CONTINIOUS_SUBSCRIPTION_RETRY_TIMEOUT = 5; // in minutes
|
||||||
const int SUBSCRIPTION_REQUEST_TIMEOUT = 60; //in second
|
const int SUBSCRIPTION_REQUEST_TIMEOUT = 60; //in second
|
||||||
|
|
||||||
|
inline std::string GetB32Address(const i2p::data::IdentHash& ident) { return ident.ToBase32().append(".b32.i2p"); }
|
||||||
|
|
||||||
class AddressBookStorage // interface for storage
|
class AddressBookStorage // interface for storage
|
||||||
{
|
{
|
||||||
@ -55,7 +57,7 @@ namespace client
|
|||||||
void LoadHostsFromStream (std::istream& f);
|
void LoadHostsFromStream (std::istream& f);
|
||||||
void DownloadComplete (bool success);
|
void DownloadComplete (bool success);
|
||||||
//This method returns the ".b32.i2p" address
|
//This method returns the ".b32.i2p" address
|
||||||
std::string ToAddress(const i2p::data::IdentHash& ident) { return ident.ToBase32().append(".b32.i2p"); }
|
std::string ToAddress(const i2p::data::IdentHash& ident) { return GetB32Address(ident); }
|
||||||
std::string ToAddress(const i2p::data::IdentityEx& ident) { return ToAddress(ident.GetIdentHash ()); }
|
std::string ToAddress(const i2p::data::IdentityEx& ident) { return ToAddress(ident.GetIdentHash ()); }
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "ElGamal.h"
|
#include "ElGamal.h"
|
||||||
#include "Timestamp.h"
|
#include "Timestamp.h"
|
||||||
#include "NetDb.h"
|
#include "NetDb.h"
|
||||||
#include "ClientContext.h"
|
#include "AddressBook.h"
|
||||||
#include "Destination.h"
|
#include "Destination.h"
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
@ -47,7 +47,7 @@ namespace client
|
|||||||
}
|
}
|
||||||
m_Pool = i2p::tunnel::tunnels.CreateTunnelPool (this, inboundTunnelLen, outboundTunnelLen);
|
m_Pool = i2p::tunnel::tunnels.CreateTunnelPool (this, inboundTunnelLen, outboundTunnelLen);
|
||||||
if (m_IsPublic)
|
if (m_IsPublic)
|
||||||
LogPrint (eLogInfo, "Local address ", i2p::client::context.GetAddressBook ().ToAddress(GetIdentHash()), " created");
|
LogPrint (eLogInfo, "Local address ", i2p::client::GetB32Address(GetIdentHash()), " created");
|
||||||
m_StreamingDestination = new i2p::stream::StreamingDestination (*this); // TODO:
|
m_StreamingDestination = new i2p::stream::StreamingDestination (*this); // TODO:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user