Sunshine v2025.118.151840
Self-hosted game stream host for Moonlight.
undo_file.h
Go to the documentation of this file.
1
5#pragma once
6
7// standard library headers
8#include <filesystem>
9
10// local includes
11#include "nvprefs_common.h"
12#include "undo_data.h"
13
14namespace nvprefs {
15
17 public:
18 static std::optional<undo_file_t>
19 open_existing_file(std::filesystem::path file_path, bool &access_denied);
20
21 static std::optional<undo_file_t>
22 create_new_file(std::filesystem::path file_path);
23
24 bool
25 delete_file();
26
27 bool
28 write_undo_data(const undo_data_t &undo_data);
29
30 std::optional<undo_data_t>
31 read_undo_data();
32
33 private:
34 undo_file_t() = default;
35 safe_handle file_handle;
36 };
37
38} // namespace nvprefs
Definition undo_data.h:15
Definition undo_file.h:16
Declarations for common nvidia preferences.
Definition nvprefs_common.h:19
Declarations for undoing changes to nvidia preferences.