#ifndef API_H__ #define API_H__ #include #include #include "Identity.h" #include "Destination.h" #include "Streaming.h" namespace dotnet { namespace api { // initialization start and stop void InitDOTNET (int argc, char* argv[], const char * appName); void TerminateDOTNET (); void StartDOTNET (std::shared_ptr logStream = nullptr); // write system log to logStream, if not specified to .log in application's folder void StopDOTNET (); void RunPeerTest (); // should be called after UPnP // destinations std::shared_ptr CreateLocalDestination (const dotnet::data::PrivateKeys& keys, bool isPublic = true, const std::map * params = nullptr); std::shared_ptr CreateLocalDestination (bool isPublic = false, dotnet::data::SigningKeyType sigType = dotnet::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256, const std::map * params = nullptr); // transient destinations usually not published void DestroyLocalDestination (std::shared_ptr dest); // streams void RequestLeaseSet (std::shared_ptr dest, const dotnet::data::IdentHash& remote); std::shared_ptr CreateStream (std::shared_ptr dest, const dotnet::data::IdentHash& remote); void AcceptStream (std::shared_ptr dest, const dotnet::stream::StreamingDestination::Acceptor& acceptor); void DestroyStream (std::shared_ptr stream); } } #endif