2023-08-05 03:46:13 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "AP_Networking_Config.h"
|
|
|
|
|
|
|
|
#if AP_NETWORKING_ENABLED
|
|
|
|
|
2023-11-12 18:09:58 -04:00
|
|
|
#include "AP_Networking.h"
|
|
|
|
|
2023-08-05 03:46:13 -03:00
|
|
|
class AP_Networking;
|
|
|
|
|
2023-11-12 16:38:26 -04:00
|
|
|
class AP_Networking_Backend
|
2023-08-05 03:46:13 -03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
friend class AP_Networking;
|
|
|
|
|
2023-11-12 16:38:26 -04:00
|
|
|
AP_Networking_Backend(AP_Networking &_frontend) : frontend(_frontend) {}
|
2023-08-05 03:46:13 -03:00
|
|
|
|
|
|
|
/* Do not allow copies */
|
2023-11-12 16:38:26 -04:00
|
|
|
CLASS_NO_COPY(AP_Networking_Backend);
|
2023-08-05 03:46:13 -03:00
|
|
|
|
|
|
|
virtual bool init() = 0;
|
|
|
|
virtual void update() = 0;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
AP_Networking &frontend;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
uint32_t ip;
|
|
|
|
uint32_t nm;
|
|
|
|
uint32_t gw;
|
|
|
|
uint32_t announce_ms;
|
|
|
|
uint8_t macaddr[6];
|
|
|
|
uint32_t last_change_ms;
|
|
|
|
} activeSettings;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // AP_NETWORKING_ENABLED
|