From ee08d6687feb5494ac503705e9da10d8199aa511 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 1 Apr 2014 13:42:04 -0400 Subject: [PATCH] GetIdentHash for LocalDestination --- Identity.h | 3 ++- RouterContext.h | 7 ++++++- Streaming.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Identity.h b/Identity.h index 6b180999..b9763209 100644 --- a/Identity.h +++ b/Identity.h @@ -118,7 +118,8 @@ namespace data { public: - virtual void UpdateLeaseSet () = 0; // LeaseSet must be update + virtual const IdentHash& GetIdentHash () const = 0; + virtual void UpdateLeaseSet () = 0; // LeaseSet must be updated }; } } diff --git a/RouterContext.h b/RouterContext.h index abbc3775..cb30db38 100644 --- a/RouterContext.h +++ b/RouterContext.h @@ -4,6 +4,7 @@ #include #include #include +#include "Identity.h" #include "RouterInfo.h" namespace i2p @@ -11,7 +12,7 @@ namespace i2p const char ROUTER_INFO[] = "router.info"; const char ROUTER_KEYS[] = "router.keys"; - class RouterContext + class RouterContext: public i2p::data::LocalDestination { public: @@ -28,6 +29,10 @@ namespace i2p void OverrideNTCPAddress (const char * host, int port); // temporary void UpdateAddress (const char * host); // called from SSU + // implements LocalDestination + void UpdateLeaseSet () {}; + const i2p::data::IdentHash& GetIdentHash () const { return m_RouterInfo.GetIdentHash (); }; + private: void CreateNewRouter (); diff --git a/Streaming.h b/Streaming.h index b25c70a0..cd118f17 100644 --- a/Streaming.h +++ b/Streaming.h @@ -138,6 +138,7 @@ namespace stream // implements LocalDestination void UpdateLeaseSet (); + const i2p::data::IdentHash& GetIdentHash () const { return m_IdentHash; }; private: