game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
runner_download_service.cpp File Reference
#include "runner_download_service.h"
#include "logger.h"
#include "platform/paths.h"
#include "proton_cache.h"
#include "shell_utils.h"
#include "util/atomic_write.h"
#include <algorithm>
#include <atomic>
#include <cerrno>
#include <chrono>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <curl/curl.h>
#include <fstream>
#include <future>
#include <linux/limits.h>
#include <map>
#include <mutex>
#include <nlohmann/json.hpp>
#include <openssl/crypto.h>
#include <openssl/evp.h>
#include <set>
#include <sstream>
#include <sys/wait.h>
#include <unistd.h>
#include <utility>
#include <vector>
Include dependency graph for runner_download_service.cpp:

Go to the source code of this file.

Classes

struct  anonymous_namespace{runner_download_service.cpp}::DownloadContext
struct  anonymous_namespace{runner_download_service.cpp}::GitHubCacheEntry
struct  anonymous_namespace{runner_download_service.cpp}::HeaderCaptureCtx
struct  RunnerDownloadService::Impl

Namespaces

namespace  anonymous_namespace{runner_download_service.cpp}

Functions

static bool endsWith (const std::string &str, const std::string &suffix)
std::filesystem::path anonymous_namespace{runner_download_service.cpp}::gitHubCacheFilePath ()
size_t anonymous_namespace{runner_download_service.cpp}::headerCaptureCallback (char *buffer, size_t size, size_t nitems, void *userdata)
std::map< std::string, GitHubCacheEntry > anonymous_namespace{runner_download_service.cpp}::loadGitHubCache ()
std::string anonymous_namespace{runner_download_service.cpp}::nowIsoUtc ()
int anonymous_namespace{runner_download_service.cpp}::progressCallback (void *userp, curl_off_t dltotal, curl_off_t, curl_off_t, curl_off_t)
RunnerStatus runnerStatus (RunnerType type)
 Get the upstream maintenance status for a runner type.
std::string runnerStatusName (RunnerStatus status)
 Convenience: human-readable status string ("active" / "archived" / "manual-only").
std::string runnerTypeName (RunnerType type)
 Get human-readable name for runner type.
void anonymous_namespace{runner_download_service.cpp}::saveGitHubCache (const std::map< std::string, GitHubCacheEntry > &cache)
void anonymous_namespace{runner_download_service.cpp}::storeFuture (std::shared_ptr< std::future< void > > f)
size_t anonymous_namespace{runner_download_service.cpp}::writeCallback (void *contents, size_t size, size_t nmemb, void *userp)

Variables

std::vector< std::shared_ptr< std::future< void > > > anonymous_namespace{runner_download_service.cpp}::activeFutures_
std::mutex anonymous_namespace{runner_download_service.cpp}::futuresMutex_
std::mutex anonymous_namespace{runner_download_service.cpp}::gitHubCacheMutex_

Function Documentation

◆ endsWith()

bool endsWith ( const std::string & str,
const std::string & suffix )
static

Definition at line 1088 of file runner_download_service.cpp.

◆ runnerStatus()

RunnerStatus runnerStatus ( RunnerType type)

Get the upstream maintenance status for a runner type.

Definition at line 272 of file runner_download_service.cpp.

References Active, Archived, ManualOnly, ProtonTKG, and WineGE.

Referenced by RunnerDownloadService::getAvailableReleases().

◆ runnerStatusName()

std::string runnerStatusName ( RunnerStatus status)

Convenience: human-readable status string ("active" / "archived" / "manual-only").

Definition at line 290 of file runner_download_service.cpp.

References Active, Archived, and ManualOnly.

◆ runnerTypeName()