firmware/src/plugins/AdminPlugin.h

31 lines
817 B
C
Raw Normal View History

2021-02-21 06:03:44 +00:00
#pragma once
#include "ProtobufPlugin.h"
/**
* Routing plugin for router control messages
*/
class AdminPlugin : public ProtobufPlugin<AdminMessage>
{
public:
/** Constructor
* name is for debugging output
*/
AdminPlugin();
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, AdminMessage *p);
2021-02-21 06:03:44 +00:00
private:
void handleSetOwner(const User &o);
void handleSetChannel(const Channel &cc);
void handleSetRadio(RadioConfig &r);
2021-02-26 07:34:00 +00:00
void handleGetChannel(const MeshPacket &req, uint32_t channelIndex);
void handleGetRadio(const MeshPacket &req);
2021-02-21 06:03:44 +00:00
};
extern AdminPlugin *adminPlugin;