1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-02-02 15:14:14 +00:00
i2pd/api/api.h

32 lines
1.1 KiB
C
Raw Permalink Normal View History

2014-11-17 12:37:40 -05:00
#ifndef API_H__
#define API_H__
2014-11-17 17:00:30 -05:00
#include "Identity.h"
2014-11-18 09:33:58 -05:00
#include "Destination.h"
#include "Streaming.h"
2014-11-17 17:00:30 -05:00
2014-11-17 12:37:40 -05:00
namespace i2p
{
namespace api
{
2014-11-18 09:33:58 -05:00
// initialization start and stop
void InitI2P (int argc, char* argv[], const char * appName);
2014-11-17 14:42:45 -05:00
void StartI2P ();
void StopI2P ();
2014-11-17 17:00:30 -05:00
2014-11-18 09:33:58 -05:00
// destinations
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_DSA_SHA1); // transient destinations usually not published
2014-11-17 17:00:30 -05:00
void DestoroyLocalDestination (i2p::client::ClientDestination * dest);
2014-11-18 09:33:58 -05:00
// streams
void RequestLeaseSet (i2p::client::ClientDestination * dest, const i2p::data::IdentHash& remote);
i2p::stream::Stream * CreateStream (i2p::client::ClientDestination * dest, const i2p::data::IdentHash& remote);
void AcceptStream (i2p::client::ClientDestination * dest, const i2p::stream::StreamingDestination::Acceptor& acceptor);
void DestroyStream (i2p::stream::Stream * stream);
2014-11-17 12:37:40 -05:00
}
}
#endif