Go to the documentation of this file. 1 #ifndef HIVEMINDBRIDGE_HIVEMINDHOSTAPIRESPONSEHANDLER_H
2 #define HIVEMINDBRIDGE_HIVEMINDHOSTAPIRESPONSEHANDLER_H
5 #include "pheromones/GetNeighborResponseDTO.h"
6 #include "pheromones/GetNeighborsListResponseDTO.h"
7 #include "pheromones/PheromonesSettings.h"
8 #include <cpp-common/ILogger.h>
17 const HiveMindHostApiResponseDTO& hmResponse)
override;
20 uint64_t bytesLength)> callback);
23 std::function<
void(uint16_t neighborId, std::optional<Position> position)> callback);
28 std::function<void(std::array<uint16_t, NEIGHBORS_MAX_SIZE>, uint64_t bytesLength)>
30 std::function<void(uint16_t neighborId, std::optional<Position> position)>
33 void handleNeighborList(
const MessageDTO& message,
const GetNeighborsListResponseDTO& list);
34 void handleNeighbor(
const MessageDTO& message,
const GetNeighborResponseDTO& neighbor);
37 #endif // HIVEMINDBRIDGE_HIVEMINDHOSTAPIRESPONSEHANDLER_H
ILogger & m_logger
Definition: HiveMindHostApiResponseHandler.h:26
bool onNeighborUpdated(std::function< void(uint16_t neighborId, std::optional< Position > position)> callback)
Definition: HiveMindHostApiResponseHandler.cpp:28
HiveMindHostApiResponseHandler(ILogger &logger)
Definition: HiveMindHostApiResponseHandler.cpp:3
std::function< void(uint16_t neighborId, std::optional< Position > position)> m_neighborUpdateCallback
Definition: HiveMindHostApiResponseHandler.h:31
Definition: IHiveMindHostApiResponseHandler.h:15
void handleNeighbor(const MessageDTO &message, const GetNeighborResponseDTO &neighbor)
Definition: HiveMindHostApiResponseHandler.cpp:50
Definition: HiveMindHostApiResponseHandler.h:11
bool onNeighborListUpdated(std::function< void(std::array< uint16_t, NEIGHBORS_MAX_SIZE >, uint64_t bytesLength)> callback)
Definition: HiveMindHostApiResponseHandler.cpp:19
std::function< void(std::array< uint16_t, NEIGHBORS_MAX_SIZE >, uint64_t bytesLength)> m_neighborListUpdateCallback
Definition: HiveMindHostApiResponseHandler.h:29
void handleMessage(const MessageDTO &message, const HiveMindHostApiResponseDTO &hmResponse) override
Definition: HiveMindHostApiResponseHandler.cpp:6
void handleNeighborList(const MessageDTO &message, const GetNeighborsListResponseDTO &list)
Definition: HiveMindHostApiResponseHandler.cpp:37