mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
pass params to destination
This commit is contained in:
parent
aaf9a70153
commit
7e52f8af5e
10
api.cpp
10
api.cpp
|
@ -47,17 +47,19 @@ namespace api
|
||||||
StopLog ();
|
StopLog ();
|
||||||
}
|
}
|
||||||
|
|
||||||
i2p::client::ClientDestination * CreateLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic)
|
i2p::client::ClientDestination * CreateLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic,
|
||||||
|
const std::map<std::string, std::string> * params)
|
||||||
{
|
{
|
||||||
auto localDestination = new i2p::client::ClientDestination (keys, isPublic);
|
auto localDestination = new i2p::client::ClientDestination (keys, isPublic, params);
|
||||||
localDestination->Start ();
|
localDestination->Start ();
|
||||||
return localDestination;
|
return localDestination;
|
||||||
}
|
}
|
||||||
|
|
||||||
i2p::client::ClientDestination * CreateLocalDestination (bool isPublic, i2p::data::SigningKeyType sigType)
|
i2p::client::ClientDestination * CreateLocalDestination (bool isPublic, i2p::data::SigningKeyType sigType,
|
||||||
|
const std::map<std::string, std::string> * params)
|
||||||
{
|
{
|
||||||
i2p::data::PrivateKeys keys = i2p::data::PrivateKeys::CreateRandomKeys (sigType);
|
i2p::data::PrivateKeys keys = i2p::data::PrivateKeys::CreateRandomKeys (sigType);
|
||||||
auto localDestination = new i2p::client::ClientDestination (keys, isPublic);
|
auto localDestination = new i2p::client::ClientDestination (keys, isPublic, params);
|
||||||
localDestination->Start ();
|
localDestination->Start ();
|
||||||
return localDestination;
|
return localDestination;
|
||||||
}
|
}
|
||||||
|
|
6
api.h
6
api.h
|
@ -18,8 +18,10 @@ namespace api
|
||||||
void StopI2P ();
|
void StopI2P ();
|
||||||
|
|
||||||
// destinations
|
// destinations
|
||||||
i2p::client::ClientDestination * CreateLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic = true);
|
i2p::client::ClientDestination * CreateLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic = true,
|
||||||
i2p::client::ClientDestination * CreateLocalDestination (bool isPublic = false, i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256); // transient destinations usually not published
|
const std::map<std::string, std::string> * params = nullptr);
|
||||||
|
i2p::client::ClientDestination * CreateLocalDestination (bool isPublic = false, i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256,
|
||||||
|
const std::map<std::string, std::string> * params = nullptr); // transient destinations usually not published
|
||||||
void DestroyLocalDestination (i2p::client::ClientDestination * dest);
|
void DestroyLocalDestination (i2p::client::ClientDestination * dest);
|
||||||
|
|
||||||
// streams
|
// streams
|
||||||
|
|
Loading…
Reference in a new issue