Sunshine master
Self-hosted game stream host for Moonlight.
nvprefs_common.h File Reference

Declarations for common nvidia preferences. More...

#include <Windows.h>
#include <AclAPI.h>
#include "src/utility.h"
Include dependency graph for nvprefs_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nvprefs::nvprefs_options
 Parsed command-line options for the NVIDIA preferences helper. More...
 
struct  nvprefs::safe_handle
 Owning Windows HANDLE wrapper that closes handles automatically. More...
 
struct  nvprefs::safe_hlocal_deleter
 Deleter for memory allocated by Windows LocalAlloc APIs. More...
 

Typedefs

template<typename T >
using nvprefs::safe_hlocal = util::uniq_ptr<std::remove_pointer_t<T>, safe_hlocal_deleter>
 Unique pointer for memory released with LocalFree.
 
using nvprefs::safe_sid = util::safe_ptr_v2<void, PVOID, FreeSid>
 Safe pointer for Windows security identifiers released with FreeSid.
 

Functions

void nvprefs::error_message (const std::string &message)
 Forward an NVPrefs error message to the logger.
 
void nvprefs::error_message (const std::wstring &message)
 Forward an NVPrefs error message to the logger.
 
nvprefs_options nvprefs::get_nvprefs_options ()
 Get nvprefs options.
 
void nvprefs::info_message (const std::string &message)
 Forward an informational NVPrefs message to the logger.
 
void nvprefs::info_message (const std::wstring &message)
 Forward an informational NVPrefs message to the logger.
 

Detailed Description

Declarations for common nvidia preferences.

Function Documentation

◆ error_message() [1/2]

void nvprefs::error_message ( const std::string & message)

Forward an NVPrefs error message to the logger.

Parameters
messageMessage text to log or report.

◆ error_message() [2/2]

void nvprefs::error_message ( const std::wstring & message)

Forward an NVPrefs error message to the logger.

Parameters
messageMessage text to log or report.

◆ get_nvprefs_options()

nvprefs_options nvprefs::get_nvprefs_options ( )

Get nvprefs options.

Returns
Parsed command-line options for NVIDIA profile preference handling.

◆ info_message() [1/2]

void nvprefs::info_message ( const std::string & message)

Forward an informational NVPrefs message to the logger.

Parameters
messageMessage text to log or report.

◆ info_message() [2/2]

void nvprefs::info_message ( const std::wstring & message)

Forward an informational NVPrefs message to the logger.

Parameters
messageMessage text to log or report.