diff --git a/src/audio.cpp b/src/audio.cpp index 8115a2a3..5fb960a6 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -1,3 +1,7 @@ +/** + * @file src/audio.cpp + * @brief todo + */ #include #include diff --git a/src/audio.h b/src/audio.h index 64c293d5..fe22c946 100644 --- a/src/audio.h +++ b/src/audio.h @@ -1,3 +1,7 @@ +/** + * @file src/audio.h + * @brief todo + */ #pragma once #include "thread_safe.h" diff --git a/src/cbs.cpp b/src/cbs.cpp index 4976f595..59b58710 100644 --- a/src/cbs.cpp +++ b/src/cbs.cpp @@ -1,3 +1,7 @@ +/** + * @file src/cbs.cpp + * @brief todo + */ extern "C" { #include #include diff --git a/src/cbs.h b/src/cbs.h index 2086305f..575f1e40 100644 --- a/src/cbs.h +++ b/src/cbs.h @@ -1,3 +1,7 @@ +/** + * @file src/cbs.h + * @brief todo + */ #pragma once #include "utility.h" diff --git a/src/config.cpp b/src/config.cpp index fa3ed75e..50aee718 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1,3 +1,7 @@ +/** + * @file src/config.cpp + * @brief todo + */ #include #include #include diff --git a/src/config.h b/src/config.h index 3abf6c3b..06b5991e 100644 --- a/src/config.h +++ b/src/config.h @@ -1,3 +1,7 @@ +/** + * @file src/config.h + * @brief todo + */ #pragma once #include diff --git a/src/confighttp.cpp b/src/confighttp.cpp index 209b6a17..6e8b2393 100644 --- a/src/confighttp.cpp +++ b/src/confighttp.cpp @@ -1,4 +1,9 @@ -// TODO: Authentication, better handling of routes common to nvhttp, cleanup +/** + * @file src/confighttp.cpp + * @brief todo + * + * @todo Authentication, better handling of routes common to nvhttp, cleanup + */ #define BOOST_BIND_GLOBAL_PLACEHOLDERS diff --git a/src/confighttp.h b/src/confighttp.h index 48251ba0..471ed9eb 100644 --- a/src/confighttp.h +++ b/src/confighttp.h @@ -1,3 +1,7 @@ +/** + * @file src/confighttp.h + * @brief todo + */ #pragma once #include diff --git a/src/crypto.cpp b/src/crypto.cpp index a9927fc6..650f2f81 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -1,3 +1,7 @@ +/** + * @file src/crypto.cpp + * @brief todo + */ #include "crypto.h" #include diff --git a/src/crypto.h b/src/crypto.h index 97250fda..d8d0a35a 100644 --- a/src/crypto.h +++ b/src/crypto.h @@ -1,3 +1,7 @@ +/** + * @file src/crypto.h + * @brief todo + */ #pragma once #include diff --git a/src/httpcommon.cpp b/src/httpcommon.cpp index 31054a05..2cfbfe0d 100644 --- a/src/httpcommon.cpp +++ b/src/httpcommon.cpp @@ -1,3 +1,7 @@ +/** + * @file src/httpcommon.cpp + * @brief todo + */ #define BOOST_BIND_GLOBAL_PLACEHOLDERS #include "process.h" diff --git a/src/httpcommon.h b/src/httpcommon.h index 3aaeed02..02d42d26 100644 --- a/src/httpcommon.h +++ b/src/httpcommon.h @@ -1,3 +1,7 @@ +/** + * @file src/httpcommon.h + * @brief todo + */ #pragma once #include "network.h" diff --git a/src/input.cpp b/src/input.cpp index bec9accc..3bc4756c 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1,3 +1,7 @@ +/** + * @file src/input.cpp + * @brief todo + */ // define uint32_t for #include extern "C" { diff --git a/src/input.h b/src/input.h index 1253face..095c20ee 100644 --- a/src/input.h +++ b/src/input.h @@ -1,3 +1,7 @@ +/** + * @file src/input.h + * @brief todo + */ #pragma once #include diff --git a/src/main.cpp b/src/main.cpp index bc8eb9fa..89cf7a8b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,6 @@ /** - * @file main.cpp + * @file src/main.cpp + * @brief Main entry point for Sunshine. */ // standard includes @@ -116,9 +117,9 @@ namespace lifetime { static std::atomic_int desired_exit_code; /** - * @brief Terminates Sunshine gracefully with the provided exit code - * @param exit_code The exit code to return from main() - * @param async Specifies whether our termination will be non-blocking + * @brief Terminates Sunshine gracefully with the provided exit code. + * @param exit_code The exit code to return from main(). + * @param async Specifies whether our termination will be non-blocking. */ void exit_sunshine(int exit_code, bool async) { @@ -137,7 +138,7 @@ namespace lifetime { } /** - * @brief Gets the argv array passed to main() + * @brief Gets the argv array passed to main(). */ char ** get_argv() { @@ -150,8 +151,8 @@ namespace service_ctrl { class service_controller { public: /** - * @brief Constructor for service_controller class - * @param service_desired_access SERVICE_* desired access flags + * @brief Constructor for service_controller class. + * @param service_desired_access SERVICE_* desired access flags. */ service_controller(DWORD service_desired_access) { scm_handle = OpenSCManagerA(nullptr, nullptr, SC_MANAGER_CONNECT); @@ -180,7 +181,7 @@ namespace service_ctrl { } /** - * @brief Asynchronously starts the Sunshine service + * @brief Asynchronously starts the Sunshine service. */ bool start_service() { @@ -200,8 +201,8 @@ namespace service_ctrl { } /** - * @brief Query the service status - * @param status The SERVICE_STATUS struct to populate + * @brief Query the service status. + * @param status The SERVICE_STATUS struct to populate. */ bool query_service_status(SERVICE_STATUS &status) { @@ -224,7 +225,7 @@ namespace service_ctrl { }; /** - * @brief Check if the service is running + * @brief Check if the service is running. * * EXAMPLES: * ```cpp @@ -244,7 +245,7 @@ namespace service_ctrl { } /** - * @brief Start the service and wait for startup to complete + * @brief Start the service and wait for startup to complete. * * EXAMPLES: * ```cpp @@ -278,7 +279,7 @@ namespace service_ctrl { } /** - * @brief Wait for the UI to be ready after Sunshine startup + * @brief Wait for the UI to be ready after Sunshine startup. * * EXAMPLES: * ```cpp @@ -335,7 +336,7 @@ namespace service_ctrl { #endif /** - * @brief Launch the Web UI + * @brief Launch the Web UI. * * EXAMPLES: * ```cpp diff --git a/src/main.h b/src/main.h index a0609df8..e98206f3 100644 --- a/src/main.h +++ b/src/main.h @@ -1,5 +1,6 @@ /** - * @file main.h + * @file src/main.h + * @brief Main header file for the Sunshine application. */ // macros diff --git a/src/move_by_copy.h b/src/move_by_copy.h index 5932e838..bac1faf9 100644 --- a/src/move_by_copy.h +++ b/src/move_by_copy.h @@ -1,3 +1,7 @@ +/** + * @file src/move_by_copy.h + * @brief todo + */ #pragma once #include diff --git a/src/network.cpp b/src/network.cpp index d180654b..f65bdfaa 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -1,3 +1,7 @@ +/** + * @file src/network.cpp + * @brief todo + */ #include "network.h" #include "utility.h" #include diff --git a/src/network.h b/src/network.h index c9837aed..e1ca36c7 100644 --- a/src/network.h +++ b/src/network.h @@ -1,3 +1,7 @@ +/** + * @file src/network.h + * @brief todo + */ #pragma once #include diff --git a/src/nvhttp.cpp b/src/nvhttp.cpp index 286299fe..e9e3966f 100644 --- a/src/nvhttp.cpp +++ b/src/nvhttp.cpp @@ -1,5 +1,6 @@ /** - * @file nvhttp.h + * @file src/nvhttp.h + * @brief todo */ // macros diff --git a/src/nvhttp.h b/src/nvhttp.h index b57d05e7..3be24b3d 100644 --- a/src/nvhttp.h +++ b/src/nvhttp.h @@ -1,5 +1,6 @@ /** - * @file nvhttp.h + * @file src/nvhttp.h + * @brief todo */ // macros @@ -18,9 +19,10 @@ namespace nvhttp { /** * @brief The protocol version. + * @details The version of the GameStream protocol we are mocking. + * @note The negative 4th number indicates to Moonlight that this is Sunshine. */ constexpr auto VERSION = "7.1.431.-1"; - // The negative 4th version number tells Moonlight that this is Sunshine /** * @brief The GFE version we are replicating. diff --git a/src/platform/common.h b/src/platform/common.h index 114f2119..cdb5785e 100644 --- a/src/platform/common.h +++ b/src/platform/common.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/common.h + * @brief todo + */ #pragma once #include diff --git a/src/platform/linux/audio.cpp b/src/platform/linux/audio.cpp index 9e865374..e31f539f 100644 --- a/src/platform/linux/audio.cpp +++ b/src/platform/linux/audio.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/audio.cpp + * @brief todo + */ #include #include diff --git a/src/platform/linux/cuda.cpp b/src/platform/linux/cuda.cpp index 55a4a47f..21ee6fa0 100644 --- a/src/platform/linux/cuda.cpp +++ b/src/platform/linux/cuda.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/cuda.cpp + * @brief todo + */ #include #include diff --git a/src/platform/linux/cuda.cu b/src/platform/linux/cuda.cu index 2955118a..defd7ef3 100644 --- a/src/platform/linux/cuda.cu +++ b/src/platform/linux/cuda.cu @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/cuda.cu + * @brief todo + */ // #include #include #include diff --git a/src/platform/linux/cuda.h b/src/platform/linux/cuda.h index 1bc991e4..e2094d81 100644 --- a/src/platform/linux/cuda.h +++ b/src/platform/linux/cuda.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/cuda.h + * @brief todo + */ #pragma once #if defined(SUNSHINE_BUILD_CUDA) diff --git a/src/platform/linux/graphics.cpp b/src/platform/linux/graphics.cpp index 51db0846..96e4f34d 100644 --- a/src/platform/linux/graphics.cpp +++ b/src/platform/linux/graphics.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/graphics.cpp + * @brief todo + */ #include "graphics.h" #include "src/video.h" diff --git a/src/platform/linux/graphics.h b/src/platform/linux/graphics.h index 548bd8f6..fbb0e92d 100644 --- a/src/platform/linux/graphics.h +++ b/src/platform/linux/graphics.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/graphics.h + * @brief todo + */ #pragma once #include diff --git a/src/platform/linux/input.cpp b/src/platform/linux/input.cpp index 6dbd46c9..85980ef3 100644 --- a/src/platform/linux/input.cpp +++ b/src/platform/linux/input.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/input.cpp + * @brief todo + */ #include #include #include @@ -1108,7 +1112,7 @@ namespace platf { * * EXAMPLES: * ```cpp - * x_move_mouse(input, 10, 10); // Move mouse 10 pixels down and right + * x_move_mouse(input, 10, 10); // Move mouse 10 pixels down and right * ``` */ static void @@ -1204,7 +1208,7 @@ namespace platf { * * EXAMPLES: * ```cpp - * button_mouse(input, 1, false); // Press left mouse button + * button_mouse(input, 1, false); // Press left mouse button * ``` */ void @@ -1336,12 +1340,12 @@ namespace platf { * @brief XTest keyboard emulation. * @param input The input_t instance to use. * @param modcode The moonlight key code. - * @param release Whether the event was a press (false) or a release (true) - * @param flags SS_KBE_FLAG_* values + * @param release Whether the event was a press (false) or a release (true). + * @param flags SS_KBE_FLAG_* values. * * EXAMPLES: * ```cpp - * x_keyboard(input, 0x5A, false, 0); // Press Z + * x_keyboard(input, 0x5A, false, 0); // Press Z * ``` */ static void @@ -1371,12 +1375,12 @@ namespace platf { * @brief Keyboard emulation. * @param input The input_t instance to use. * @param modcode The moonlight key code. - * @param release Whether the event was a press (false) or a release (true) - * @param flags SS_KBE_FLAG_* values + * @param release Whether the event was a press (false) or a release (true). + * @param flags SS_KBE_FLAG_* values. * * EXAMPLES: * ```cpp - * keyboard(input, 0x5A, false, 0); // Press Z + * keyboard(input, 0x5A, false, 0); // Press Z * ``` */ void diff --git a/src/platform/linux/kmsgrab.cpp b/src/platform/linux/kmsgrab.cpp index 090451d8..094aee5f 100644 --- a/src/platform/linux/kmsgrab.cpp +++ b/src/platform/linux/kmsgrab.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/kmsgrab.cpp + * @brief todo + */ #include #include #include diff --git a/src/platform/linux/misc.cpp b/src/platform/linux/misc.cpp index 87f22ca3..fe34ca50 100644 --- a/src/platform/linux/misc.cpp +++ b/src/platform/linux/misc.cpp @@ -1,7 +1,7 @@ /** - * @file misc.cpp + * @file src/misc.cpp + * @brief todo */ - // standard includes #include diff --git a/src/platform/linux/misc.h b/src/platform/linux/misc.h index bcecc1ec..8541bf16 100644 --- a/src/platform/linux/misc.h +++ b/src/platform/linux/misc.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/misc.h + * @brief todo + */ #pragma once #include diff --git a/src/platform/linux/publish.cpp b/src/platform/linux/publish.cpp index ea97b114..367c7aa3 100644 --- a/src/platform/linux/publish.cpp +++ b/src/platform/linux/publish.cpp @@ -1,5 +1,9 @@ - -// adapted from https://www.avahi.org/doxygen/html/client-publish-service_8c-example.html +/** + * @file src/platform/linux/publish.cpp + * @brief todo + * @note Adapted from https://www.avahi.org/doxygen/html/client-publish-service_8c-example.html + * @todo Use a common file for this and src/platform/macos/publish.cpp + */ #include #include "misc.h" @@ -13,7 +17,7 @@ using namespace std::literals; namespace avahi { /** - * @brief Error codes used by avahi + * @brief Error codes used by avahi. */ enum err_e { OK = 0, /**< OK */ @@ -116,7 +120,7 @@ namespace avahi { }; /** - * @brief Some flags for publishing functions + * @brief Flags for publishing functions. */ enum PublishFlags { PUBLISH_UNIQUE = 1, /**< For raw records: The RRset is intended to be unique */ diff --git a/src/platform/linux/vaapi.cpp b/src/platform/linux/vaapi.cpp index 00881aae..ca432adf 100644 --- a/src/platform/linux/vaapi.cpp +++ b/src/platform/linux/vaapi.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/vaapi.cpp + * @brief todo + */ #include #include @@ -82,7 +86,7 @@ namespace va { }; /** - * @brief Currently defined profiles + * @brief Defined profiles */ enum class profile_e { // Profile ID used for video processing. diff --git a/src/platform/linux/vaapi.h b/src/platform/linux/vaapi.h index ab59bce9..081d0048 100644 --- a/src/platform/linux/vaapi.h +++ b/src/platform/linux/vaapi.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/vaapi.h + * @brief todo + */ #pragma once #include "misc.h" diff --git a/src/platform/linux/wayland.cpp b/src/platform/linux/wayland.cpp index 5bd207cd..d601ba95 100644 --- a/src/platform/linux/wayland.cpp +++ b/src/platform/linux/wayland.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/wayland.cpp + * @brief todo + */ #include #include diff --git a/src/platform/linux/wayland.h b/src/platform/linux/wayland.h index a49c8d86..a4c3aef1 100644 --- a/src/platform/linux/wayland.h +++ b/src/platform/linux/wayland.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/wayland.h + * @brief todo + */ #pragma once #include diff --git a/src/platform/linux/wlgrab.cpp b/src/platform/linux/wlgrab.cpp index 5511ea3d..6cf7fb78 100644 --- a/src/platform/linux/wlgrab.cpp +++ b/src/platform/linux/wlgrab.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/wlgrab.cpp + * @brief todo + */ #include "src/platform/common.h" #include "src/main.h" diff --git a/src/platform/linux/x11grab.cpp b/src/platform/linux/x11grab.cpp index 9d6b08c9..ad8ef034 100644 --- a/src/platform/linux/x11grab.cpp +++ b/src/platform/linux/x11grab.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/x11grab.cpp + * @brief todo + */ #include "src/platform/common.h" #include diff --git a/src/platform/linux/x11grab.h b/src/platform/linux/x11grab.h index c01b0bb7..24e96f6a 100644 --- a/src/platform/linux/x11grab.h +++ b/src/platform/linux/x11grab.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/linux/x11grab.h + * @brief todo + */ #pragma once #include diff --git a/src/platform/macos/av_audio.h b/src/platform/macos/av_audio.h index a31458f5..c0d22173 100644 --- a/src/platform/macos/av_audio.h +++ b/src/platform/macos/av_audio.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/av_audio.h + * @brief todo + */ #pragma once #import diff --git a/src/platform/macos/av_audio.m b/src/platform/macos/av_audio.m index 5e336d77..af695179 100644 --- a/src/platform/macos/av_audio.m +++ b/src/platform/macos/av_audio.m @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/av_audio.m + * @brief todo + */ #import "av_audio.h" @implementation AVAudio diff --git a/src/platform/macos/av_img_t.h b/src/platform/macos/av_img_t.h index 1ed60914..f42f9ceb 100644 --- a/src/platform/macos/av_img_t.h +++ b/src/platform/macos/av_img_t.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/av_img_t.h + * @brief todo + */ #pragma once #include "src/platform/common.h" diff --git a/src/platform/macos/av_video.h b/src/platform/macos/av_video.h index a6a0d9ce..83eabb8e 100644 --- a/src/platform/macos/av_video.h +++ b/src/platform/macos/av_video.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/av_video.h + * @brief todo + */ #pragma once #import diff --git a/src/platform/macos/av_video.m b/src/platform/macos/av_video.m index 92f5ec08..6e3a9f81 100644 --- a/src/platform/macos/av_video.m +++ b/src/platform/macos/av_video.m @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/av_video.m + * @brief todo + */ #import "av_video.h" @implementation AVVideo diff --git a/src/platform/macos/display.mm b/src/platform/macos/display.mm index 45b98f54..65f3c279 100644 --- a/src/platform/macos/display.mm +++ b/src/platform/macos/display.mm @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/display.mm + * @brief todo + */ #include "src/platform/common.h" #include "src/platform/macos/av_img_t.h" #include "src/platform/macos/av_video.h" diff --git a/src/platform/macos/input.cpp b/src/platform/macos/input.cpp index 7565351d..78079e3f 100644 --- a/src/platform/macos/input.cpp +++ b/src/platform/macos/input.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/input.cpp + * @brief todo + */ #import #include #include diff --git a/src/platform/macos/microphone.mm b/src/platform/macos/microphone.mm index df40db9d..854ca6fa 100644 --- a/src/platform/macos/microphone.mm +++ b/src/platform/macos/microphone.mm @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/microphone.mm + * @brief todo + */ #include "src/platform/common.h" #include "src/platform/macos/av_audio.h" diff --git a/src/platform/macos/misc.h b/src/platform/macos/misc.h index 942f2701..a6fb1df3 100644 --- a/src/platform/macos/misc.h +++ b/src/platform/macos/misc.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/misc.h + * @brief todo + */ #pragma once #include diff --git a/src/platform/macos/misc.mm b/src/platform/macos/misc.mm index 85ac20d9..b65f0a39 100644 --- a/src/platform/macos/misc.mm +++ b/src/platform/macos/misc.mm @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/misc.mm + * @brief todo + */ #include #include #include diff --git a/src/platform/macos/nv12_zero_device.cpp b/src/platform/macos/nv12_zero_device.cpp index 0c62328f..21046be3 100644 --- a/src/platform/macos/nv12_zero_device.cpp +++ b/src/platform/macos/nv12_zero_device.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/nv12_zero_device.cpp + * @brief todo + */ #include "src/platform/macos/nv12_zero_device.h" #include "src/platform/macos/av_img_t.h" diff --git a/src/platform/macos/nv12_zero_device.h b/src/platform/macos/nv12_zero_device.h index 6ff1abec..059896ea 100644 --- a/src/platform/macos/nv12_zero_device.h +++ b/src/platform/macos/nv12_zero_device.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/macos/nv12_zero_device.h + * @brief todo + */ #pragma once #include "src/platform/common.h" diff --git a/src/platform/macos/publish.cpp b/src/platform/macos/publish.cpp index 57a35e22..4cb80b8d 100644 --- a/src/platform/macos/publish.cpp +++ b/src/platform/macos/publish.cpp @@ -1,5 +1,9 @@ - -// adapted from https://www.avahi.org/doxygen/html/client-publish-service_8c-example.html +/** + * @file src/platform/macos/publish.cpp + * @brief todo + * @note Adapted from https://www.avahi.org/doxygen/html/client-publish-service_8c-example.html + * @todo Use a common file for this and src/platform/linux/publish.cpp + */ #include #include "misc.h" @@ -13,7 +17,7 @@ using namespace std::literals; namespace avahi { /** - * @brief Error codes used by avahi + * @brief Error codes used by avahi. */ enum err_e { OK = 0, /**< OK */ @@ -116,7 +120,7 @@ namespace avahi { }; /** - * @brief Some flags for publishing functions + * @brief Flags for publishing functions. */ enum PublishFlags { PUBLISH_UNIQUE = 1, /**< For raw records: The RRset is intended to be unique */ diff --git a/src/platform/windows/PolicyConfig.h b/src/platform/windows/PolicyConfig.h index 85b845d9..21772227 100644 --- a/src/platform/windows/PolicyConfig.h +++ b/src/platform/windows/PolicyConfig.h @@ -1,10 +1,10 @@ -// ---------------------------------------------------------------------------- -// PolicyConfig.h -// Undocumented COM-interface IPolicyConfig. -// Use for set default audio render endpoint -// @author EreTIk -// http://eretik.omegahg.com/ -// ---------------------------------------------------------------------------- +/** + * @file src/platform/windows/PolicyConfig.h + * @brief Undocumented COM-interface IPolicyConfig. + * @details Use for setting default audio render endpoint. + * @author EreTIk + * @see http://eretik.omegahg.com/ + */ #pragma once diff --git a/src/platform/windows/audio.cpp b/src/platform/windows/audio.cpp index fe4df13a..a4884641 100644 --- a/src/platform/windows/audio.cpp +++ b/src/platform/windows/audio.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/windows/audio.cpp + * @brief todo + */ #include #include #include @@ -678,11 +682,9 @@ namespace platf::audio { } /** - * @brief Find the audio device ID given a user-specified name - * - * @param name The name provided by the user - * - * @return The matching device ID, or nothing if not found + * @brief Find the audio device ID given a user-specified name. + * @param name The name provided by the user. + * @return The matching device ID, or nothing if not found. */ std::optional find_device_id_by_name(const std::string &name) { diff --git a/src/platform/windows/display.h b/src/platform/windows/display.h index 8facfdcc..9e019a32 100644 --- a/src/platform/windows/display.h +++ b/src/platform/windows/display.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/windows/display.h + * @brief todo + */ #pragma once #include diff --git a/src/platform/windows/display_base.cpp b/src/platform/windows/display_base.cpp index cd997aa7..ae9807f4 100644 --- a/src/platform/windows/display_base.cpp +++ b/src/platform/windows/display_base.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/windows/display_base.cpp + * @brief todo + */ #include #include #include diff --git a/src/platform/windows/display_ram.cpp b/src/platform/windows/display_ram.cpp index 6bd00b2a..631abce7 100644 --- a/src/platform/windows/display_ram.cpp +++ b/src/platform/windows/display_ram.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/windows/display_ram.cpp + * @brief todo + */ #include "display.h" #include "misc.h" diff --git a/src/platform/windows/display_vram.cpp b/src/platform/windows/display_vram.cpp index 42c3b01a..a167c155 100644 --- a/src/platform/windows/display_vram.cpp +++ b/src/platform/windows/display_vram.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/windows/display_vram.cpp + * @brief todo + */ #include #include diff --git a/src/platform/windows/input.cpp b/src/platform/windows/input.cpp index 9c0372fe..d0b55210 100644 --- a/src/platform/windows/input.cpp +++ b/src/platform/windows/input.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/windows/input.cpp + * @brief todo + */ #include #include diff --git a/src/platform/windows/misc.cpp b/src/platform/windows/misc.cpp index 5ecb11b2..697bb5c2 100644 --- a/src/platform/windows/misc.cpp +++ b/src/platform/windows/misc.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/windows/misc.cpp + * @brief todo + */ #include #include #include @@ -229,9 +233,8 @@ namespace platf { } /** - * @brief A function to obtain the current sessions user's primary token with elevated privileges - * - * @return The users token, if user has admin capability it will be elevated. If not, it will return back a limited token. On error, nullptrs + * @brief Obtain the current sessions user's primary token with elevated privileges. + * @return The user's token. If user has admin capability it will be elevated, otherwise it will be a limited token. On error, `nullptr`. */ HANDLE retrieve_users_token(bool elevated) { @@ -333,10 +336,9 @@ namespace platf { } /** - -@brief Check if the current process is running with system-level privileges. -@return true if the current process has system-level privileges, false otherwise. -*/ + * @brief Check if the current process is running with system-level privileges. + * @return `true` if the current process has system-level privileges, `false` otherwise. + */ bool is_running_as_system() { BOOL ret; @@ -430,14 +432,13 @@ namespace platf { } /** - * @brief Creates a bp::child object from the results of launching a process - * - * @param process_launched A boolean indicating whether the launch was successful or not - * @param cmd The command that was used to launch the process - * @param ec A reference to an std::error_code object that will store any error that occurred during the launch - * @param process_info A reference to a PROCESS_INFORMATION structure that contains information about the new process - * @param group A pointer to a bp::group object that will add the new process to its group, if not null - * @return A bp::child object representing the new process, or an empty bp::child object if the launch failed or an error occurred + * @brief Create a `bp::child` object from the results of launching a process. + * @param process_launched A boolean indicating if the launch was successful. + * @param cmd The command that was used to launch the process. + * @param ec A reference to an `std::error_code` object that will store any error that occurred during the launch. + * @param process_info A reference to a `PROCESS_INFORMATION` structure that contains information about the new process. + * @param group A pointer to a `bp::group` object that will add the new process to its group, if not null. + * @return A `bp::child` object representing the new process, or an empty `bp::child` object if the launch failed. */ bp::child create_boost_child_from_results(bool process_launched, const std::string &cmd, std::error_code &ec, PROCESS_INFORMATION &process_info, bp::group *group) { @@ -477,11 +478,10 @@ namespace platf { } /** - * @brief Impersonate the current user, invoke the callback function, then returns back to system context. - * - * @param user_token A handle to the user's token that was obtained from the shell - * @param callback A function that will be executed while impersonating the user - * @return An std::error_code object that will store any error that occurred during the impersonation + * @brief Impersonate the current user and invoke the callback function. + * @param user_token A handle to the user's token that was obtained from the shell. + * @param callback A function that will be executed while impersonating the user. + * @return An `std::error_code` object that will store any error that occurred during the impersonation */ std::error_code impersonate_current_user(HANDLE user_token, std::function callback) { @@ -515,11 +515,10 @@ namespace platf { } /** - * @brief A function to create a STARTUPINFOEXW structure for launching a process - * - * @param file A pointer to a FILE object that will be used as the standard output and error for the new process, or null if not needed - * @param ec A reference to an std::error_code object that will store any error that occurred during the creation of the structure - * @return A STARTUPINFOEXW structure that contains information about how to launch the new process + * @brief A function to create a `STARTUPINFOEXW` structure for launching a process. + * @param file A pointer to a `FILE` object that will be used as the standard output and error for the new process, or null if not needed. + * @param ec A reference to a `std::error_code` object that will store any error that occurred during the creation of the structure. + * @return A `STARTUPINFOEXW` structure that contains information about how to launch the new process. */ STARTUPINFOEXW create_startup_info(FILE *file, std::error_code &ec) { @@ -563,22 +562,19 @@ namespace platf { } /** - * @brief Runs a command on the users profile + * @brief Run a command on the users profile. * - * This function launches a child process as the user, using the current user's environment - * and a specific working directory. If the launch is successful, a `bp::child` object representing the new - * process is returned. Otherwise, an error code is returned. + * Launches a child process as the user, using the current user's environment and a specific working directory. * - * @param elevated Specify to elevate the process or not - * @param interactive Specifies whether this will run in a window or hidden - * @param cmd The command to run - * @param working_dir The working directory for the new process - * @param env The environment variables to use for the new process - * @param file A file object to redirect the child process's output to (may be nullptr) - * @param ec An error code, set to indicate any errors that occur during the launch process - * @param group A pointer to a `bp::group` object to which the new process should belong (may be nullptr) - * - * @return A `bp::child` object representing the new process, or an empty `bp::child` object if the launch fails + * @param elevated Specify whether to elevate the process. + * @param interactive Specify whether this will run in a window or hidden. + * @param cmd The command to run. + * @param working_dir The working directory for the new process. + * @param env The environment variables to use for the new process. + * @param file A file object to redirect the child process's output to (may be `nullptr`). + * @param ec An error code, set to indicate any errors that occur during the launch process. + * @param group A pointer to a `bp::group` object to which the new process should belong (may be `nullptr`). + * @return A `bp::child` object representing the new process, or an empty `bp::child` object if the launch fails. */ bp::child run_command(bool elevated, bool interactive, const std::string &cmd, boost::filesystem::path &working_dir, bp::environment &env, FILE *file, std::error_code &ec, bp::group *group) { diff --git a/src/platform/windows/misc.h b/src/platform/windows/misc.h index c6df94d5..9228ce59 100644 --- a/src/platform/windows/misc.h +++ b/src/platform/windows/misc.h @@ -1,3 +1,7 @@ +/** + * @file src/platform/windows/misc.h + * @brief todo + */ #pragma once #include diff --git a/src/platform/windows/publish.cpp b/src/platform/windows/publish.cpp index 56cfdfc6..3d9383f7 100644 --- a/src/platform/windows/publish.cpp +++ b/src/platform/windows/publish.cpp @@ -1,3 +1,7 @@ +/** + * @file src/platform/windows/publish.cpp + * @brief todo + */ #include #include diff --git a/src/process.cpp b/src/process.cpp index bece2ddc..42b94d1a 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -1,3 +1,7 @@ +/** + * @file src/process.cpp + * @brief todo + */ #define BOOST_BIND_GLOBAL_PLACEHOLDERS #include "process.h" diff --git a/src/process.h b/src/process.h index 8a8dcaba..b05e46e8 100644 --- a/src/process.h +++ b/src/process.h @@ -1,3 +1,7 @@ +/** + * @file src/process.h + * @brief todo + */ #pragma once #ifndef __kernel_entry diff --git a/src/round_robin.h b/src/round_robin.h index 03845e61..cacca431 100644 --- a/src/round_robin.h +++ b/src/round_robin.h @@ -1,3 +1,7 @@ +/** + * @file src/round_robin.h + * @brief todo + */ #pragma once #include diff --git a/src/rtsp.cpp b/src/rtsp.cpp index 73678dd3..a2e4a2fc 100644 --- a/src/rtsp.cpp +++ b/src/rtsp.cpp @@ -1,3 +1,7 @@ +/** + * @file src/rstp.cpp + * @brief todo + */ #define BOOST_BIND_GLOBAL_PLACEHOLDERS extern "C" { diff --git a/src/rtsp.h b/src/rtsp.h index 388706a5..2b0355fd 100644 --- a/src/rtsp.h +++ b/src/rtsp.h @@ -1,3 +1,7 @@ +/** + * @file src/rtsp.h + * @brief todo + */ #pragma once #include diff --git a/src/stat_trackers.cpp b/src/stat_trackers.cpp index c3f16578..4496ebac 100644 --- a/src/stat_trackers.cpp +++ b/src/stat_trackers.cpp @@ -1,3 +1,7 @@ +/** + * @file src/stat_trackers.cpp + * @brief todo + */ #include "stat_trackers.h" namespace stat_trackers { diff --git a/src/stat_trackers.h b/src/stat_trackers.h index 81fc0038..c26c8f45 100644 --- a/src/stat_trackers.h +++ b/src/stat_trackers.h @@ -1,3 +1,7 @@ +/** + * @file src/stat_trackers.h + * @brief todo + */ #pragma once #include diff --git a/src/stream.cpp b/src/stream.cpp index 0afcac59..84682e6b 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -1,3 +1,7 @@ +/** + * @file src/stream.cpp + * @brief todo + */ #include "process.h" #include diff --git a/src/stream.h b/src/stream.h index 95c2e232..302b9c0e 100644 --- a/src/stream.h +++ b/src/stream.h @@ -1,3 +1,7 @@ +/** + * @file src/stream.h + * @brief todo + */ #pragma once #include diff --git a/src/sync.h b/src/sync.h index d4e81b9d..5b64606e 100644 --- a/src/sync.h +++ b/src/sync.h @@ -1,3 +1,7 @@ +/** + * @file src/sync.h + * @brief todo + */ #pragma once #include diff --git a/src/system_tray.cpp b/src/system_tray.cpp index 94195891..4b940a40 100644 --- a/src/system_tray.cpp +++ b/src/system_tray.cpp @@ -1,5 +1,6 @@ /** - * @file system_tray.cpp + * @file src/system_tray.cpp + * @brief todo */ // macros #if defined SUNSHINE_TRAY && SUNSHINE_TRAY >= 1 @@ -230,7 +231,7 @@ namespace system_tray { /** * @brief Run the system tray with platform specific options. - * @note macOS requires that UI elements be created on the main thread, so the system tray is not implemented for macOS. + * @note macOS requires that UI elements be created on the main thread, so the system tray is not currently implemented for macOS. */ void run_tray() { diff --git a/src/system_tray.h b/src/system_tray.h index 2638298e..18e3445f 100644 --- a/src/system_tray.h +++ b/src/system_tray.h @@ -1,5 +1,6 @@ /** - * @file system_tray.h + * @file src/system_tray.h + * @brief todo */ #pragma once @@ -7,8 +8,6 @@ // system_tray namespace namespace system_tray { - void - open_url(const std::string &url); void tray_open_ui_cb(struct tray_menu *item); void diff --git a/src/task_pool.h b/src/task_pool.h index 9315ac78..918ff354 100644 --- a/src/task_pool.h +++ b/src/task_pool.h @@ -1,3 +1,7 @@ +/** + * @file src/task_pool.h + * @brief todo + */ #pragma once #include diff --git a/src/thread_pool.h b/src/thread_pool.h index c130103b..c97f29a1 100644 --- a/src/thread_pool.h +++ b/src/thread_pool.h @@ -1,3 +1,7 @@ +/** + * @file src/thread_pool.h + * @brief todo + */ #pragma once #include "task_pool.h" diff --git a/src/thread_safe.h b/src/thread_safe.h index 901dce7a..d745bf08 100644 --- a/src/thread_safe.h +++ b/src/thread_safe.h @@ -1,3 +1,7 @@ +/** + * @file src/thread_safe.h + * @brief todo + */ #pragma once #include diff --git a/src/upnp.cpp b/src/upnp.cpp index 7a0a9213..6b0cc703 100644 --- a/src/upnp.cpp +++ b/src/upnp.cpp @@ -1,3 +1,7 @@ +/** + * @file src/upnp.cpp + * @brief todo + */ #include #include diff --git a/src/upnp.h b/src/upnp.h index 734623c9..73fc4f79 100644 --- a/src/upnp.h +++ b/src/upnp.h @@ -1,3 +1,7 @@ +/** + * @file src/upnp.h + * @brief todo + */ #pragma once #include "platform/common.h" diff --git a/src/utility.h b/src/utility.h index f2bc29ed..3260d51b 100644 --- a/src/utility.h +++ b/src/utility.h @@ -1,3 +1,7 @@ +/** + * @file src/utility.h + * @brief todo + */ #pragma once #include diff --git a/src/uuid.h b/src/uuid.h index 32c3f56c..60c1b231 100644 --- a/src/uuid.h +++ b/src/uuid.h @@ -1,3 +1,7 @@ +/** + * @file src/uuid.h + * @brief todo + */ #pragma once #include diff --git a/src/version.h.in b/src/version.h.in index 552b14f0..badb5aa0 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -1,3 +1,8 @@ +/** + * @file src/version.h.in + * @brief Version definitions for Sunshine. + * @note The final `version.h` is generated from this file during the CMake build. + */ #pragma once #define PROJECT_NAME "@PROJECT_NAME@" diff --git a/src/video.cpp b/src/video.cpp index 250fc8b9..ec7d175b 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -1,3 +1,7 @@ +/** + * @file src/video.cpp + * @brief todo + */ #include #include #include diff --git a/src/video.h b/src/video.h index 940a33bf..3b2d8900 100644 --- a/src/video.h +++ b/src/video.h @@ -1,3 +1,7 @@ +/** + * @file src/video.h + * @brief todo + */ #pragma once #include "input.h" diff --git a/tools/audio.cpp b/tools/audio.cpp index 37f9a69c..0d05df5e 100644 --- a/tools/audio.cpp +++ b/tools/audio.cpp @@ -1,7 +1,7 @@ -// -// Created by loki on 1/24/20. -// - +/** + * @file tools/audio.cpp + * @brief todo + */ #include #include #include diff --git a/tools/ddprobe.cpp b/tools/ddprobe.cpp index c4516fe8..423a1f13 100644 --- a/tools/ddprobe.cpp +++ b/tools/ddprobe.cpp @@ -1,3 +1,7 @@ +/** + * @file tools/ddprobe.cpp + * @brief todo + */ #include #include diff --git a/tools/dxgi.cpp b/tools/dxgi.cpp index 891f0292..d368848f 100644 --- a/tools/dxgi.cpp +++ b/tools/dxgi.cpp @@ -1,7 +1,7 @@ -// -// Created by loki on 1/23/20. -// - +/** + * @file tools/dxgi.cpp + * @brief todo + */ #include #include diff --git a/tools/sunshinesvc.cpp b/tools/sunshinesvc.cpp index e02fc8b9..b117ec91 100644 --- a/tools/sunshinesvc.cpp +++ b/tools/sunshinesvc.cpp @@ -1,3 +1,7 @@ +/** + * @file tools/sunshinesvc.cpp + * @brief todo + */ #define WIN32_LEAN_AND_MEAN #include #include