Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
DekiEditor::EditorHttpUtils Class Reference

Static HTTP/archive utility functions used across the editor. More...

#include <EditorHttpUtils.h>

Static Public Member Functions

static std::string FetchUrl (const std::string &url)
static bool DownloadFile (const std::string &url, const std::string &localPath, std::atomic< bool > *cancelFlag=nullptr, HttpStatusCallback status=nullptr)
static bool DownloadFileVerified (const std::string &url, const std::string &localPath, const std::string &expectedSha256, std::atomic< bool > *cancelFlag=nullptr, HttpStatusCallback status=nullptr)
static std::string Sha256File (const std::string &path)
static bool ExtractZip (const std::string &zipPath, const std::string &destDir, HttpStatusCallback status=nullptr)
static bool ParseGitHubRelease (const std::string &json, const std::string &assetPattern, std::string &outVersion, std::string &outDownloadUrl)

Static Public Attributes

static constexpr int kMaxRedirects = 10

Detailed Description

Static HTTP/archive utility functions used across the editor.

Centralizes WinHTTP (Windows) / curl (Unix) usage.

Member Function Documentation

◆ FetchUrl()

std::string DekiEditor::EditorHttpUtils::FetchUrl ( const std::string & url)
static

◆ DownloadFile()

bool DekiEditor::EditorHttpUtils::DownloadFile ( const std::string & url,
const std::string & localPath,
std::atomic< bool > * cancelFlag = nullptr,
HttpStatusCallback status = nullptr )
static

◆ DownloadFileVerified()

bool DekiEditor::EditorHttpUtils::DownloadFileVerified ( const std::string & url,
const std::string & localPath,
const std::string & expectedSha256,
std::atomic< bool > * cancelFlag = nullptr,
HttpStatusCallback status = nullptr )
static

◆ Sha256File()

std::string DekiEditor::EditorHttpUtils::Sha256File ( const std::string & path)
static

◆ ExtractZip()

bool DekiEditor::EditorHttpUtils::ExtractZip ( const std::string & zipPath,
const std::string & destDir,
HttpStatusCallback status = nullptr )
static

◆ ParseGitHubRelease()

bool DekiEditor::EditorHttpUtils::ParseGitHubRelease ( const std::string & json,
const std::string & assetPattern,
std::string & outVersion,
std::string & outDownloadUrl )
static

Member Data Documentation

◆ kMaxRedirects

int DekiEditor::EditorHttpUtils::kMaxRedirects = 10
staticconstexpr

The documentation for this class was generated from the following file: