mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
restructure build to separate the 3 main components into 3 subdirectories
libi2pd for core libs libi2pd_client for i2pd client libs daemon for i2pd daemon libs
This commit is contained in:
parent
b3161dde93
commit
4cc3b7f9fb
140 changed files with 209 additions and 206 deletions
38
libi2pd/api.h
Normal file
38
libi2pd/api.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef API_H__
|
||||
#define API_H__
|
||||
|
||||
#include <memory>
|
||||
#include <iostream>
|
||||
#include "Identity.h"
|
||||
#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
|
||||
|
||||
// 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