diff options
Diffstat (limited to 'common/Unit.hpp')
-rw-r--r-- | common/Unit.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/Unit.hpp b/common/Unit.hpp index ecfaa1f4ce..967c811730 100644 --- a/common/Unit.hpp +++ b/common/Unit.hpp @@ -27,6 +27,7 @@ class UnitTimeout; class WebSocketHandler; class ClientSession; +class Message; // Forward declaration to avoid pulling the world here. namespace Poco @@ -151,6 +152,11 @@ public: return false; } + /// Message that LOKit sent (typically upon receipt in DocBroker). + /// To override, handle onFilterLOKitMessage. + /// Returns true to stop processing the message further. + bool filterLOKitMessage(const std::shared_ptr<Message>& message); + /// Message that is about to be sent via the websocket. /// To override, handle onFilterSendWebSocketMessage or any of the onDocument...() handlers. /// Returns true to stop processing the message further. @@ -248,6 +254,9 @@ private: } static UnitBase *linkAndCreateUnit(UnitType type, const std::string& unitLibPath); + /// Handles messages from LOKit. + virtual bool onFilterLOKitMessage(const std::shared_ptr<Message>& /*message*/) { return false; } + /// Handles messages sent via WebSocket. virtual bool onFilterSendWebSocketMessage(const char* /*data*/, const std::size_t /*len*/, const WSOpCode /* code */, const bool /* flush */, |