move want_replies into new plugin system

This commit is contained in:
Kevin Hester
2020-12-05 11:15:06 +08:00
parent 91b99bd584
commit 3e0dc44210
8 changed files with 44 additions and 5 deletions

View File

@@ -18,12 +18,17 @@ class NodeInfoPlugin : public ProtobufPlugin<User>
void sendOurNodeInfo(NodeNum dest = NODENUM_BROADCAST, bool wantReplies = false);
protected:
/** Called to handle a particular incoming message
@return true if you've guaranteed you've handled this message and no other handlers should be considered for it
*/
virtual bool handleReceivedProtobuf(const MeshPacket &mp, const User &p);
/** Messages can be received that have the want_response bit set. If set, this callback will be invoked
* so that subclasses can (optionally) send a response back to the original sender. Implementing this method
* is optional
*/
virtual void sendResponse(NodeNum to);
};
extern NodeInfoPlugin nodeInfoPlugin;