Skip to content

Commit 9784433

Browse files
committed
cm: communication: add message handler interface
This patch adds an interface that is capable of handling messages received from by the communication module. Signed-off-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
1 parent 5eb7593 commit 9784433

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

include/aos/cm/communication/communication.hpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ namespace aos::cm::communication {
1616
* @{
1717
*/
1818

19+
/**
20+
* Message handler interface to handle received message.
21+
*/
22+
class MessageHandlerItf {
23+
public:
24+
/**
25+
* Handles received message.
26+
*
27+
* @param message received message.
28+
* @return Error.
29+
*/
30+
virtual Error HandleMessage(const cloudprotocol::MessageVariant& message) = 0;
31+
32+
/**
33+
* Destructor.
34+
*/
35+
virtual ~MessageHandlerItf() = default;
36+
};
37+
1938
/**
2039
* Communication interface.
2140
*/

0 commit comments

Comments
 (0)