adds ui namespace module
This commit is contained in:
1 parent
19f5a8a49a
commit
13dfbeddc0
9 files changed
+79
-5
No files matched your search
@@ -0,0 +1,6 @@
|
||||
|
||||
add_library(UI OBJECT Server.cpp)
|
||||
|
||||
target_include_directories(UI PUBLIC include)
|
||||
|
||||
target_link_libraries(UI PRIVATE Core DNS PUBLIC Asio)
|
||||
@@ -0,0 +1,25 @@
|
||||
#include "Server.hpp"
|
||||
|
||||
namespace Plains {
|
||||
namespace UI {
|
||||
|
||||
using asio::ip::tcp;
|
||||
|
||||
Server::Server(Logger& logger, EventBus& eventBus)
|
||||
: _logger(logger),
|
||||
_eventBus(eventBus)
|
||||
{
|
||||
_logger.debug.ln ("Starting UI Webserver...");
|
||||
_logger.debug.ln ("UI Webserver started");
|
||||
}
|
||||
|
||||
Server::~Server() {
|
||||
_logger.debug.ln ("Stopping UI Webserver...");
|
||||
_logger.debug.ln ("UI Webserver stopped");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef UI_SERVER_HPP
|
||||
#define UI_SERVER_HPP
|
||||
#include "asio.hpp"
|
||||
#include "Core.hpp"
|
||||
|
||||
namespace Plains {
|
||||
namespace UI {
|
||||
|
||||
using Core::EventBus;
|
||||
using Core::Logger;
|
||||
using Core::Exception;
|
||||
|
||||
|
||||
class Server
|
||||
{
|
||||
private:
|
||||
EventBus& _eventBus;
|
||||
Logger& _logger;
|
||||
asio::io_context _ioContext;
|
||||
asio::ip::tcp::endpoint _sender_endpoint;
|
||||
|
||||
public:
|
||||
Server(Logger& logger, EventBus& eventBus);
|
||||
~Server();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,5 @@
|
||||
#ifndef UI_HPP
|
||||
#define UI_HPP
|
||||
#include "Server.hpp"
|
||||
//Include further classes here
|
||||
#endif
|
||||
Reference in new issue
Block a user