Merge Develop into Main (#298)
Various improvements and new internal APIs including a new Development service+app which allows `tactility.py` to upload and run applications remotely.
This commit is contained in:
committed by
GitHub
parent
d06197a6aa
commit
ab4cf79a47
@@ -31,10 +31,7 @@ void setElfAppManifest(
|
||||
*/
|
||||
std::string getElfAppId(const std::string& filePath);
|
||||
|
||||
/**
|
||||
* @return true when registration was done, false when app was already registered
|
||||
*/
|
||||
bool registerElfApp(const std::string& filePath);
|
||||
void registerElfApp(const std::string& filePath);
|
||||
|
||||
std::shared_ptr<App> createElfApp(const std::shared_ptr<AppManifest>& manifest);
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
|
||||
#include <esp_http_server.h>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace tt::network {
|
||||
|
||||
bool getHeaderOrSendError(httpd_req_t* request, const std::string& name, std::string& value);
|
||||
|
||||
bool getMultiPartBoundaryOrSendError(httpd_req_t* request, std::string& boundary);
|
||||
|
||||
bool getQueryOrSendError(httpd_req_t* request, std::string& query);
|
||||
|
||||
std::unique_ptr<char[]> receiveByteArray(httpd_req_t* request, size_t length, size_t& bytesRead);
|
||||
|
||||
std::string receiveTextUntil(httpd_req_t* request, const std::string& terminator);
|
||||
|
||||
std::map<std::string, std::string> parseContentDisposition(const std::vector<std::string>& input);
|
||||
|
||||
bool readAndDiscardOrSendError(httpd_req_t* request, const std::string& toRead);
|
||||
|
||||
}
|
||||
|
||||
#endif // ESP_PLATFORM
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace tt::network {
|
||||
|
||||
/**
|
||||
* Parse a query from a URL
|
||||
* @param[in] query
|
||||
* @return a map with key-values
|
||||
*/
|
||||
std::map<std::string, std::string> parseUrlQuery(std::string query);
|
||||
|
||||
std::string urlEncode(const std::string& input);
|
||||
|
||||
std::string urlDecode(const std::string& input);
|
||||
|
||||
} // namespace
|
||||
@@ -113,6 +113,11 @@ void setScanRecords(uint16_t records);
|
||||
*/
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
/**
|
||||
* @return the IPv4 address or empty string
|
||||
*/
|
||||
std::string getIp();
|
||||
|
||||
/**
|
||||
* @brief Connect to a network. Disconnects any existing connection.
|
||||
* Returns immediately but runs in the background. Results are through pubsub.
|
||||
|
||||
Reference in New Issue
Block a user