diff --git a/Destination.cpp b/Destination.cpp index 80eecaa2..d020d96e 100644 --- a/Destination.cpp +++ b/Destination.cpp @@ -716,6 +716,7 @@ namespace client return false; } +#ifdef I2LUA void ClientDestination::Ready(ReadyPromise & p) { ScheduleCheckForReady(&p); @@ -739,6 +740,7 @@ namespace client else // we are not ready ScheduleCheckForReady(p); } +#endif void ClientDestination::HandleDataMessage (const uint8_t * buf, size_t len) { diff --git a/Destination.h b/Destination.h index 22ffa603..e2d532e8 100644 --- a/Destination.h +++ b/Destination.h @@ -8,7 +8,9 @@ #include #include #include +#ifdef I2LUA #include +#endif #include #include "Identity.h" #include "TunnelPool.h" @@ -145,18 +147,19 @@ namespace client class ClientDestination: public LeaseSetDestination { public: +#ifdef I2LUA // type for informing that a client destination is ready typedef std::promise > ReadyPromise; + // informs promise with shared_from_this() when this destination is ready to use + // if cancelled before ready, informs promise with nullptr + void Ready(ReadyPromise & p); +#endif ClientDestination (const i2p::data::PrivateKeys& keys, bool isPublic, const std::map * params = nullptr); ~ClientDestination (); bool Start (); bool Stop (); - - // informs promise with shared_from_this() when this destination is ready to use - // if cancelled before ready, informs promise with nullptr - void Ready(ReadyPromise & p); const i2p::data::PrivateKeys& GetPrivateKeys () const { return m_Keys; }; void Sign (const uint8_t * buf, int len, uint8_t * signature) const { m_Keys.Sign (buf, len, signature); }; @@ -191,10 +194,10 @@ namespace client std::shared_ptr GetSharedFromThis () { return std::static_pointer_cast(shared_from_this ()); } void PersistTemporaryKeys (); - +#ifdef I2LUA void ScheduleCheckForReady(ReadyPromise * p); void HandleCheckForReady(const boost::system::error_code & ecode, ReadyPromise * p); - +#endif private: i2p::data::PrivateKeys m_Keys; diff --git a/NetDb.h b/NetDb.h index d8ee148a..d295ebbe 100644 --- a/NetDb.h +++ b/NetDb.h @@ -8,7 +8,6 @@ #include #include #include -#include #include "Base.h" #include "Gzip.h"