From 2acb22214c35537cd7001f7dcef5859e54ce8fb3 Mon Sep 17 00:00:00 2001 From: Joshua Scott Date: Wed, 11 Apr 2018 01:13:37 +0100 Subject: [PATCH] net: Rename dml::Session to net::DMLSession --- .../ki/protocol/{dml/Session.h => net/DMLSession.h} | 10 +++++----- src/protocol/CMakeLists.txt | 2 +- src/protocol/{dml/Session.cpp => net/DMLSession.cpp} | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) rename include/ki/protocol/{dml/Session.h => net/DMLSession.h} (65%) rename src/protocol/{dml/Session.cpp => net/DMLSession.cpp} (62%) diff --git a/include/ki/protocol/dml/Session.h b/include/ki/protocol/net/DMLSession.h similarity index 65% rename from include/ki/protocol/dml/Session.h rename to include/ki/protocol/net/DMLSession.h index a48120e..f2cfd61 100644 --- a/include/ki/protocol/dml/Session.h +++ b/include/ki/protocol/net/DMLSession.h @@ -1,6 +1,6 @@ #pragma once -#include "../net/Session.h" -#include "MessageManager.h" +#include "Session.h" +#include "../dml/MessageManager.h" namespace ki { @@ -8,12 +8,12 @@ namespace protocol { namespace dml { - class Session : public net::Session + class DMLSession : public net::Session { public: - Session(net::ParticipantType type, uint16_t id, + DMLSession(net::ParticipantType type, uint16_t id, const MessageManager &manager); - ~Session() = default; + ~DMLSession() = default; protected: void on_application_message(const net::PacketHeader& header) override; virtual void on_message(const Message &message) {} diff --git a/src/protocol/CMakeLists.txt b/src/protocol/CMakeLists.txt index 660ab30..c3e5e38 100644 --- a/src/protocol/CMakeLists.txt +++ b/src/protocol/CMakeLists.txt @@ -8,8 +8,8 @@ target_sources(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/src/protocol/dml/MessageManager.cpp ${PROJECT_SOURCE_DIR}/src/protocol/dml/MessageModule.cpp ${PROJECT_SOURCE_DIR}/src/protocol/dml/MessageTemplate.cpp - ${PROJECT_SOURCE_DIR}/src/protocol/dml/Session.cpp ${PROJECT_SOURCE_DIR}/src/protocol/net/PacketHeader.cpp ${PROJECT_SOURCE_DIR}/src/protocol/net/Participant.cpp ${PROJECT_SOURCE_DIR}/src/protocol/net/Session.cpp + ${PROJECT_SOURCE_DIR}/src/protocol/net/DMLSession.cpp ) \ No newline at end of file diff --git a/src/protocol/dml/Session.cpp b/src/protocol/net/DMLSession.cpp similarity index 62% rename from src/protocol/dml/Session.cpp rename to src/protocol/net/DMLSession.cpp index fc513b6..80a9b32 100644 --- a/src/protocol/dml/Session.cpp +++ b/src/protocol/net/DMLSession.cpp @@ -1,4 +1,4 @@ -#include "ki/protocol/dml/Session.h" +#include "ki/protocol/net/DMLSession.h" namespace ki { @@ -6,11 +6,11 @@ namespace protocol { namespace dml { - Session::Session(const net::ParticipantType type, const uint16_t id, + DMLSession::DMLSession(const net::ParticipantType type, const uint16_t id, const MessageManager& manager) : net::Session(type, id), m_manager(manager) {} - void Session::on_application_message(const net::PacketHeader& header) + void DMLSession::on_application_message(const net::PacketHeader& header) { const auto *message = m_manager.message_from_binary(m_data_stream); if (!message) @@ -24,4 +24,4 @@ namespace dml } } } -} \ No newline at end of file +}