working toward compilation, still has include issue

pull/1184/head
Thomas Winget 4 years ago
parent a4141617d7
commit 8dc5dabe49

@ -208,6 +208,12 @@ if(TESTNET)
endif() endif()
add_library(${STATIC_LIB} STATIC ${LIB_SRC}) add_library(${STATIC_LIB} STATIC ${LIB_SRC})
if(WITH_HIVE)
set(LIB_SRC ${LIB_SRC} tooling/router_hive.cpp tooling/router_event.cpp)
target_include_directories(${STATIC_LIB} PUBLIC ${CMAKE_SOURCE_DIR}/tooling)
endif()
target_include_directories(${STATIC_LIB} PUBLIC ${CURL_INCLUDE_DIRS}) target_include_directories(${STATIC_LIB} PUBLIC ${CURL_INCLUDE_DIRS})
target_link_libraries(${STATIC_LIB} PUBLIC cxxopts ${ABYSS_LIB} ${PLATFORM_LIB} ${UTIL_LIB} ${CRYPTOGRAPHY_LIB}) target_link_libraries(${STATIC_LIB} PUBLIC cxxopts ${ABYSS_LIB} ${PLATFORM_LIB} ${UTIL_LIB} ${CRYPTOGRAPHY_LIB})

@ -18,6 +18,7 @@ struct llarp_threadpool;
namespace tooling namespace tooling
{ {
struct RouterHive;
struct RouterEvent; struct RouterEvent;
} // namespace tooling } // namespace tooling
@ -64,6 +65,11 @@ namespace llarp
struct AbstractRouter struct AbstractRouter
{ {
#ifdef LOKINET_HIVE
tooling::RouterHive* hive;
#endif
virtual ~AbstractRouter() = default; virtual ~AbstractRouter() = default;
virtual bool virtual bool
@ -267,7 +273,7 @@ namespace llarp
GossipRCIfNeeded(const RouterContact rc) = 0; GossipRCIfNeeded(const RouterContact rc) = 0;
virtual void virtual void
NotifyRouterEvent(RouterEvent event) const = 0; NotifyRouterEvent(tooling::RouterEvent event) const = 0;
}; };
} // namespace llarp } // namespace llarp

@ -23,6 +23,11 @@
#include <util/str.hpp> #include <util/str.hpp>
#include <ev/ev.hpp> #include <ev/ev.hpp>
#ifdef LOKINET_HIVE
#include "tooling/router_event.hpp"
#include "tooling/router_hive.hpp"
#endif
#include <fstream> #include <fstream>
#include <cstdlib> #include <cstdlib>
#include <iterator> #include <iterator>
@ -126,7 +131,7 @@ namespace llarp
} }
void void
Router::NotifyRouterEvent(RouterEvent event) const Router::NotifyRouterEvent(tooling::RouterEvent event) const
{ {
#ifdef LOKINET_HIVE #ifdef LOKINET_HIVE
hive->NotifyEvent(event); hive->NotifyEvent(event);

@ -45,7 +45,6 @@
namespace tooling namespace tooling
{ {
struct RouterHive;
struct RouterEvent; struct RouterEvent;
} // namespace tooling } // namespace tooling
@ -288,10 +287,6 @@ namespace llarp
TimePoint_t m_NextExploreAt; TimePoint_t m_NextExploreAt;
#ifdef LOKINET_HIVE
RouterHive* hive;
#endif
IOutboundMessageHandler & IOutboundMessageHandler &
outboundMessageHandler() override outboundMessageHandler() override
{ {
@ -320,7 +315,7 @@ namespace llarp
GossipRCIfNeeded(const RouterContact rc) override; GossipRCIfNeeded(const RouterContact rc) override;
void void
NotifyRouterEvent(RouterEvent event) const override; NotifyRouterEvent(tooling::RouterEvent event) const override;
Router(std::shared_ptr< llarp::thread::ThreadPool > worker, Router(std::shared_ptr< llarp::thread::ThreadPool > worker,
llarp_ev_loop_ptr __netloop, std::shared_ptr< Logic > logic); llarp_ev_loop_ptr __netloop, std::shared_ptr< Logic > logic);

Loading…
Cancel
Save