Sunshine latest
Self-hosted game stream host for Moonlight.
httpcommon.h
Go to the documentation of this file.
1
5#pragma once
6
7// lib includes
8#include <curl/curl.h>
9
10// local includes
11#include "network.h"
12#include "thread_safe.h"
13
14namespace http {
15
16 int init();
17 int create_creds(const std::string &pkey, const std::string &cert);
18 int save_user_creds(
19 const std::string &file,
20 const std::string &username,
21 const std::string &password,
22 bool run_our_mouth = false
23 );
24
25 int reload_user_creds(const std::string &file);
26 bool download_file(const std::string &url, const std::string &file, long ssl_version = CURL_SSLVERSION_TLSv1_3);
27 std::string url_escape(const std::string &url);
28 std::string url_get_host(const std::string &url);
29
30 extern std::string unique_id;
31 extern net::net_e origin_web_ui_allowed;
32
33} // namespace http
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:704
Declarations for networking related functions.
net_e
Definition network.h:36
Declarations for thread-safe data structures.