net: Rename dml::Session to net::DMLSession

This commit is contained in:
Joshua Scott 2018-04-11 01:13:37 +01:00
parent c4630ae970
commit 2acb22214c
3 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "../net/Session.h" #include "Session.h"
#include "MessageManager.h" #include "../dml/MessageManager.h"
namespace ki namespace ki
{ {
@ -8,12 +8,12 @@ namespace protocol
{ {
namespace dml namespace dml
{ {
class Session : public net::Session class DMLSession : public net::Session
{ {
public: public:
Session(net::ParticipantType type, uint16_t id, DMLSession(net::ParticipantType type, uint16_t id,
const MessageManager &manager); const MessageManager &manager);
~Session() = default; ~DMLSession() = default;
protected: protected:
void on_application_message(const net::PacketHeader& header) override; void on_application_message(const net::PacketHeader& header) override;
virtual void on_message(const Message &message) {} virtual void on_message(const Message &message) {}

View File

@ -8,8 +8,8 @@ target_sources(${PROJECT_NAME}
${PROJECT_SOURCE_DIR}/src/protocol/dml/MessageManager.cpp ${PROJECT_SOURCE_DIR}/src/protocol/dml/MessageManager.cpp
${PROJECT_SOURCE_DIR}/src/protocol/dml/MessageModule.cpp ${PROJECT_SOURCE_DIR}/src/protocol/dml/MessageModule.cpp
${PROJECT_SOURCE_DIR}/src/protocol/dml/MessageTemplate.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/PacketHeader.cpp
${PROJECT_SOURCE_DIR}/src/protocol/net/Participant.cpp ${PROJECT_SOURCE_DIR}/src/protocol/net/Participant.cpp
${PROJECT_SOURCE_DIR}/src/protocol/net/Session.cpp ${PROJECT_SOURCE_DIR}/src/protocol/net/Session.cpp
${PROJECT_SOURCE_DIR}/src/protocol/net/DMLSession.cpp
) )

View File

@ -1,4 +1,4 @@
#include "ki/protocol/dml/Session.h" #include "ki/protocol/net/DMLSession.h"
namespace ki namespace ki
{ {
@ -6,11 +6,11 @@ namespace protocol
{ {
namespace dml 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) const MessageManager& manager)
: net::Session(type, id), m_manager(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); const auto *message = m_manager.message_from_binary(m_data_stream);
if (!message) if (!message)