sforkowany z mirror/meshtastic-firmware
commit
9cf030d587
Plik diff jest za duży
Load Diff
|
@ -0,0 +1,46 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
void registerHandlers(HTTPServer *insecureServer, HTTPSServer *secureServer);
|
||||||
|
|
||||||
|
// Declare some handler functions for the various URLs on the server
|
||||||
|
void handleAPIv1FromRadio(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleAPIv1ToRadio(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleStyleCSS(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleHotspot(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleRoot(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleStaticBrowse(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleStaticPost(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleStatic(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleRestart(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handle404(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleFormUpload(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleScanNetworks(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleSpiffsBrowseStatic(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleSpiffsDeleteStatic(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleBlinkLED(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleReport(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
void handleFavicon(HTTPRequest *req, HTTPResponse *res);
|
||||||
|
|
||||||
|
void middlewareSpeedUp240(HTTPRequest *req, HTTPResponse *res, std::function<void()> next);
|
||||||
|
void middlewareSpeedUp160(HTTPRequest *req, HTTPResponse *res, std::function<void()> next);
|
||||||
|
void middlewareSession(HTTPRequest *req, HTTPResponse *res, std::function<void()> next);
|
||||||
|
|
||||||
|
uint32_t getTimeSpeedUp();
|
||||||
|
void setTimeSpeedUp();
|
||||||
|
|
||||||
|
|
||||||
|
// Interface to the PhoneAPI to access the protobufs with messages
|
||||||
|
class HttpAPI : public PhoneAPI
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Nothing here yet
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Nothing here yet
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Nothing here yet
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
#define BoolToString(x) ((x) ? "true" : "false")
|
||||||
|
|
||||||
|
|
||||||
void replaceAll(std::string &str, const std::string &from, const std::string &to);
|
void replaceAll(std::string &str, const std::string &from, const std::string &to);
|
||||||
|
|
Plik diff jest za duży
Load Diff
|
@ -8,31 +8,10 @@
|
||||||
void initWebServer();
|
void initWebServer();
|
||||||
void createSSLCert();
|
void createSSLCert();
|
||||||
|
|
||||||
void handleNotFound();
|
|
||||||
|
|
||||||
void handleWebResponse();
|
void handleWebResponse();
|
||||||
|
|
||||||
|
|
||||||
//void handleHotspot();
|
|
||||||
|
|
||||||
//void handleStyleCSS();
|
|
||||||
//void handleRoot();
|
|
||||||
|
|
||||||
|
|
||||||
// Interface to the PhoneAPI to access the protobufs with messages
|
|
||||||
class HttpAPI : public PhoneAPI
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
// Nothing here yet
|
|
||||||
|
|
||||||
private:
|
|
||||||
// Nothing here yet
|
|
||||||
|
|
||||||
protected:
|
|
||||||
// Nothing here yet
|
|
||||||
};
|
|
||||||
|
|
||||||
class WebServerThread : private concurrency::OSThread
|
class WebServerThread : private concurrency::OSThread
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue