* Improve resource cleanup on connection close * Copilot had some good feedback. Let's just make the api a unique pointer * Update src/mesh/api/ServerAPI.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Copilot stupidly suggesting we call protected methods * Gotta do it in the superclasses as well * Fix moar * Refactor MQTT unit test to ensure proper subscription handling and clear side effects --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
36 lines
1.5 KiB
C++
36 lines
1.5 KiB
C++
#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 handleHotspot(HTTPRequest *req, HTTPResponse *res);
|
|
void handleStatic(HTTPRequest *req, HTTPResponse *res);
|
|
void handleRestart(HTTPRequest *req, HTTPResponse *res);
|
|
void handleFormUpload(HTTPRequest *req, HTTPResponse *res);
|
|
void handleScanNetworks(HTTPRequest *req, HTTPResponse *res);
|
|
void handleFsBrowseStatic(HTTPRequest *req, HTTPResponse *res);
|
|
void handleFsDeleteStatic(HTTPRequest *req, HTTPResponse *res);
|
|
void handleReport(HTTPRequest *req, HTTPResponse *res);
|
|
void handleNodes(HTTPRequest *req, HTTPResponse *res);
|
|
void handleUpdateFs(HTTPRequest *req, HTTPResponse *res);
|
|
void handleDeleteFsContent(HTTPRequest *req, HTTPResponse *res);
|
|
void handleFs(HTTPRequest *req, HTTPResponse *res);
|
|
void handleAdmin(HTTPRequest *req, HTTPResponse *res);
|
|
void handleAdminSettings(HTTPRequest *req, HTTPResponse *res);
|
|
void handleAdminSettingsApply(HTTPRequest *req, HTTPResponse *res);
|
|
|
|
// Interface to the PhoneAPI to access the protobufs with messages
|
|
class HttpAPI : public PhoneAPI
|
|
{
|
|
|
|
public:
|
|
HttpAPI() { api_type = TYPE_HTTP; }
|
|
|
|
/// Check the current underlying physical link to see if the client is currently connected
|
|
virtual bool checkIsConnected() override { return true; } // FIXME, be smarter about this
|
|
private:
|
|
// Nothing here yet
|
|
|
|
protected:
|
|
}; |