Sunshine latest
Self-hosted game stream host for Moonlight.
undo_file.h
Go to the documentation of this file.
1
5#pragma once
6
7// standard includes
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> open_existing_file(std::filesystem::path file_path, bool &access_denied);
19
20 static std::optional<undo_file_t> create_new_file(std::filesystem::path file_path);
21
22 bool delete_file();
23
24 bool write_undo_data(const undo_data_t &undo_data);
25
26 std::optional<undo_data_t> read_undo_data();
27
28 private:
29 undo_file_t() = default;
30 safe_handle file_handle;
31 };
32
33} // 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.