docs(src): add examples alias and general cleanup (#2763)

This commit is contained in:
ReenigneArcher
2024-06-28 08:34:14 -04:00
committed by GitHub
parent 49b6efcdfd
commit 1dd4b68e1c
142 changed files with 4218 additions and 1177 deletions

View File

@@ -1,8 +1,7 @@
/**
* @file src/nvhttp.h
* @brief todo
* @brief Declarations for the nvhttp (GameStream) server.
*/
// macros
#pragma once
@@ -16,7 +15,7 @@
#include "thread_safe.h"
/**
* @brief This namespace contains all the functions and variables related to the nvhttp (GameStream) server.
* @brief Contains all the functions and variables related to the nvhttp (GameStream) server.
*/
namespace nvhttp {
@@ -42,15 +41,52 @@ namespace nvhttp {
*/
constexpr auto PORT_HTTPS = -5;
// functions
/**
* @brief Start the nvhttp server.
* @examples
* nvhttp::start();
* @examples_end
*/
void
start();
/**
* @brief Compare the user supplied pin to the Moonlight pin.
* @param pin The user supplied pin.
* @param name The user supplied name.
* @return `true` if the pin is correct, `false` otherwise.
* @examples
* bool pin_status = nvhttp::pin("1234", "laptop");
* @examples_end
*/
bool
pin(std::string pin, std::string name);
/**
* @brief Remove single client.
* @examples
* nvhttp::unpair_client("4D7BB2DD-5704-A405-B41C-891A022932E1");
* @examples_end
*/
int
unpair_client(std::string uniqueid);
/**
* @brief Get all paired clients.
* @return The list of all paired clients.
* @examples
* boost::property_tree::ptree clients = nvhttp::get_all_clients();
* @examples_end
*/
boost::property_tree::ptree
get_all_clients();
/**
* @brief Remove all paired clients.
* @examples
* nvhttp::erase_all_clients();
* @examples_end
*/
void
erase_all_clients();
} // namespace nvhttp