-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
86 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/**** | ||
* Sming Framework Project - Open Source framework for high efficiency native ESP8266 development. | ||
* Created 2015 by Skurydin Alexey | ||
* http://github.com/SmingHub/Sming | ||
* All files of the Sming Core are provided under the LGPL v3 license. | ||
* | ||
* Message.h | ||
* | ||
****/ | ||
|
||
#pragma once | ||
|
||
#include <Data/LinkedObjectList.h> | ||
#include "Message.h" | ||
|
||
namespace mDNS | ||
{ | ||
/** | ||
* @brief Virtual base class used for chaining message handlers | ||
*/ | ||
class Handler : public LinkedObjectTemplate<Handler> | ||
{ | ||
public: | ||
using List = LinkedObjectListTemplate<Handler>; | ||
|
||
/** | ||
* @brief Callback to be invoked for each received message | ||
* @retval bool Return true to pass message to other handlers, false to stop | ||
*/ | ||
virtual bool onMessage(Message& message) = 0; | ||
}; | ||
|
||
} // namespace mDNS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters