29 int create_creds(
const std::string &pkey,
const std::string &cert);
31 const std::string &file,
32 const std::string &username,
33 const std::string &password,
34 bool run_our_mouth =
false
52 bool download_file(
const std::string &url,
const std::string &file,
long ssl_version = CURL_SSLVERSION_TLSv1_2);
59 std::string
url_escape(
const std::string &url);
std::unique_ptr< platf::deinit_t > init(const std::filesystem::path &persistence_filepath, const config::video_t &video_config)
Initialize the implementation and perform the initial state recovery (if needed).
Definition display_device.cpp:764
std::string unique_id
Unique ID.
Definition httpcommon.cpp:49
int create_creds(const std::string &pkey, const std::string &cert)
Generate HTTPS credential files from the provided key and certificate paths.
Definition httpcommon.cpp:155
std::string url_escape(const std::string &url)
Percent-encode URL data for use in HTTP query strings.
Definition httpcommon.cpp:248
std::string url_get_host(const std::string &url)
Extract the host component from a URL string.
Definition httpcommon.cpp:258
int reload_user_creds(const std::string &file)
Reload the Web UI credentials from disk.
Definition httpcommon.cpp:138
net::net_e origin_web_ui_allowed
Origin web ui allowed.
Definition httpcommon.cpp:50
int save_user_creds(const std::string &file, const std::string &username, const std::string &password, bool run_our_mouth)
Save user creds.
Definition httpcommon.cpp:87
bool download_file(const std::string &url, const std::string &file, long ssl_version)
Send a static file response for a Web UI request.
Definition httpcommon.cpp:209
Declarations for networking related functions.
net_e
Enumerates supported net options.
Definition network.h:53
Declarations for thread-safe data structures.