mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-01 05:02:29 +02:00
Reformat code
This commit is contained in:
parent
3ddb370718
commit
55534ea002
140 changed files with 46068 additions and 48277 deletions
|
@ -15,31 +15,41 @@
|
|||
#include "Destination.h"
|
||||
#include "Streaming.h"
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace api
|
||||
{
|
||||
// initialization start and stop
|
||||
void InitI2P (int argc, char* argv[], const char * appName);
|
||||
void TerminateI2P ();
|
||||
void StartI2P (std::shared_ptr<std::ostream> logStream = nullptr);
|
||||
// write system log to logStream, if not specified to <appName>.log in application's folder
|
||||
void StopI2P ();
|
||||
void RunPeerTest (); // should be called after UPnP
|
||||
namespace i2p {
|
||||
namespace api {
|
||||
// initialization start and stop
|
||||
void InitI2P(int argc, char *argv[], const char *appName);
|
||||
|
||||
// destinations
|
||||
std::shared_ptr<i2p::client::ClientDestination> CreateLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic = true,
|
||||
const std::map<std::string, std::string> * params = nullptr);
|
||||
std::shared_ptr<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 (std::shared_ptr<i2p::client::ClientDestination> dest);
|
||||
void TerminateI2P();
|
||||
|
||||
// streams
|
||||
void RequestLeaseSet (std::shared_ptr<i2p::client::ClientDestination> dest, const i2p::data::IdentHash& remote);
|
||||
std::shared_ptr<i2p::stream::Stream> CreateStream (std::shared_ptr<i2p::client::ClientDestination> dest, const i2p::data::IdentHash& remote);
|
||||
void AcceptStream (std::shared_ptr<i2p::client::ClientDestination> dest, const i2p::stream::StreamingDestination::Acceptor& acceptor);
|
||||
void DestroyStream (std::shared_ptr<i2p::stream::Stream> stream);
|
||||
}
|
||||
void StartI2P(std::shared_ptr<std::ostream> logStream = nullptr);
|
||||
|
||||
// write system log to logStream, if not specified to <appName>.log in application's folder
|
||||
void StopI2P();
|
||||
|
||||
void RunPeerTest(); // should be called after UPnP
|
||||
|
||||
// destinations
|
||||
std::shared_ptr<i2p::client::ClientDestination>
|
||||
CreateLocalDestination(const i2p::data::PrivateKeys &keys, bool isPublic = true,
|
||||
const std::map<std::string, std::string> *params = nullptr);
|
||||
|
||||
std::shared_ptr<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(std::shared_ptr<i2p::client::ClientDestination> dest);
|
||||
|
||||
// streams
|
||||
void RequestLeaseSet(std::shared_ptr<i2p::client::ClientDestination> dest, const i2p::data::IdentHash &remote);
|
||||
|
||||
std::shared_ptr<i2p::stream::Stream>
|
||||
CreateStream(std::shared_ptr<i2p::client::ClientDestination> dest, const i2p::data::IdentHash &remote);
|
||||
|
||||
void AcceptStream(std::shared_ptr<i2p::client::ClientDestination> dest,
|
||||
const i2p::stream::StreamingDestination::Acceptor &acceptor);
|
||||
|
||||
void DestroyStream(std::shared_ptr<i2p::stream::Stream> stream);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue