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
commit 1dd4b68e1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
142 changed files with 4218 additions and 1177 deletions

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/audio.cpp
* @brief todo
* @brief Definitions for audio control on Linux.
*/
#include <bitset>
#include <sstream>

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/cuda.cpp
* @brief todo
* @brief Definitions for CUDA encoding.
*/
#include <bitset>
#include <fcntl.h>

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/cuda.cu
* @brief todo
* @brief CUDA implementation for Linux.
*/
// #include <algorithm>
#include <helper_math.h>

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/cuda.h
* @brief todo
* @brief Definitions for CUDA implementation.
*/
#pragma once

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/graphics.cpp
* @brief todo
* @brief Definitions for graphics related functions.
*/
#include "graphics.h"
#include "src/file_handler.h"
@ -507,7 +507,7 @@ namespace egl {
}
/**
* @brief Returns EGL attributes for eglCreateImage() to import the provided surface.
* @brief Get EGL attributes for eglCreateImage() to import the provided surface.
* @param surface The surface descriptor.
* @return Vector of EGL attributes.
*/
@ -576,7 +576,7 @@ namespace egl {
}
/**
* @brief Creates a black RGB texture of the specified image size.
* @brief Create a black RGB texture of the specified image size.
* @param img The image to use for texture sizing.
* @return The new RGB texture.
*/
@ -655,7 +655,7 @@ namespace egl {
}
/**
* @brief Creates biplanar YUV textures to render into.
* @brief Create biplanar YUV textures to render into.
* @param width Width of the target frame.
* @param height Height of the target frame.
* @param format Format of the target frame.

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/graphics.h
* @brief todo
* @brief Declarations for graphics related functions.
*/
#pragma once

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino.cpp
* @brief Definitions for the inputtino Linux input handling.
*/
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_common.h
* @brief Declarations for inputtino common input handling.
*/
#pragma once
#include <boost/locale.hpp>

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_gamepad.cpp
* @brief Definitions for inputtino gamepad input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>
@ -15,10 +19,10 @@ using namespace std::literals;
namespace platf::gamepad {
enum GamepadStatus {
UHID_NOT_AVAILABLE = 0,
UINPUT_NOT_AVAILABLE,
XINPUT_NOT_AVAILABLE,
GAMEPAD_STATUS // Helper to indicate the number of status
UHID_NOT_AVAILABLE = 0, ///< UHID is not available
UINPUT_NOT_AVAILABLE, ///< UINPUT is not available
XINPUT_NOT_AVAILABLE, ///< XINPUT is not available
GAMEPAD_STATUS ///< Helper to indicate the number of status
};
auto

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_gamepad.h
* @brief Declarations for inputtino gamepad input handling.
*/
#pragma once
#include <boost/locale.hpp>
@ -13,9 +17,9 @@ using namespace std::literals;
namespace platf::gamepad {
enum ControllerType {
XboxOneWired,
DualSenseWired,
SwitchProWired
XboxOneWired, ///< Xbox One Wired Controller
DualSenseWired, ///< DualSense Wired Controller
SwitchProWired ///< Switch Pro Wired Controller
};
int

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_keyboard.cpp
* @brief Definitions for inputtino keyboard input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_keyboard.h
* @brief Declarations for inputtino keyboard input handling.
*/
#pragma once
#include <boost/locale.hpp>

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_mouse.cpp
* @brief Definitions for inputtino mouse input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_mouse.h
* @brief Declarations for inputtino mouse input handling.
*/
#pragma once
#include <boost/locale.hpp>

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_pen.cpp
* @brief Definitions for inputtino pen input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_pen.h
* @brief Declarations for inputtino pen input handling.
*/
#pragma once
#include <boost/locale.hpp>

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_touch.cpp
* @brief Definitions for inputtino touch input handling.
*/
#include <boost/locale.hpp>
#include <inputtino/input.hpp>
#include <libevdev/libevdev.h>

View file

@ -1,3 +1,7 @@
/**
* @file src/platform/linux/input/inputtino_touch.h
* @brief Declarations for inputtino touch input handling.
*/
#pragma once
#include <boost/locale.hpp>

View file

@ -1074,11 +1074,9 @@ namespace platf {
* @param input The input_t instance to use.
* @param x Absolute x position.
* @param y Absolute y position.
*
* EXAMPLES:
* ```cpp
* @examples
* x_abs_mouse(input, 0, 0);
* ```
* @examples_end
*/
static void
x_abs_mouse(input_t &input, float x, float y) {
@ -1128,11 +1126,9 @@ namespace platf {
* @param touch_port The touch_port instance to use.
* @param x Absolute x position.
* @param y Absolute y position.
*
* EXAMPLES:
* ```cpp
* @examples
* abs_mouse(input, touch_port, 0, 0);
* ```
* @examples_end
*/
void
abs_mouse(input_t &input, const touch_port_t &touch_port, float x, float y) {
@ -1160,11 +1156,9 @@ namespace platf {
* @param input The input_t instance to use.
* @param deltaX Relative x position.
* @param deltaY Relative y position.
*
* EXAMPLES:
* ```cpp
* @examples
* x_move_mouse(input, 10, 10); // Move mouse 10 pixels down and right
* ```
* @examples_end
*/
static void
x_move_mouse(input_t &input, int deltaX, int deltaY) {
@ -1183,11 +1177,9 @@ namespace platf {
* @param input The input_t instance to use.
* @param deltaX Relative x position.
* @param deltaY Relative y position.
*
* EXAMPLES:
* ```cpp
* @examples
* move_mouse(input, 10, 10); // Move mouse 10 pixels down and right
* ```
* @examples_end
*/
void
move_mouse(input_t &input, int deltaX, int deltaY) {
@ -1218,11 +1210,9 @@ namespace platf {
* @param input The input_t instance to use.
* @param button Which mouse button to emulate.
* @param release Whether the event was a press (false) or a release (true)
*
* EXAMPLES:
* ```cpp
* @examples
* x_button_mouse(input, 1, false); // Press left mouse button
* ```
* @examples_end
*/
static void
x_button_mouse(input_t &input, int button, bool release) {
@ -1261,11 +1251,9 @@ namespace platf {
* @param input The input_t instance to use.
* @param button Which mouse button to emulate.
* @param release Whether the event was a press (false) or a release (true)
*
* EXAMPLES:
* ```cpp
* @examples
* button_mouse(input, 1, false); // Press left mouse button
* ```
* @examples_end
*/
void
button_mouse(input_t &input, int button, bool release) {
@ -1348,11 +1336,9 @@ namespace platf {
* @param distance How far to scroll.
* @param button_pos Which mouse button to emulate for positive scroll.
* @param button_neg Which mouse button to emulate for negative scroll.
*
* EXAMPLES:
* ```cpp
* @examples
* x_scroll(input, 10, 4, 5);
* ```
* @examples_end
*/
static void
x_scroll(input_t &input, int distance, int button_pos, int button_neg) {
@ -1375,11 +1361,9 @@ namespace platf {
* @brief Vertical mouse scroll.
* @param input The input_t instance to use.
* @param high_res_distance How far to scroll.
*
* EXAMPLES:
* ```cpp
* @examples
* scroll(input, 1200);
* ```
* @examples_end
*/
void
scroll(input_t &input, int high_res_distance) {
@ -1409,11 +1393,9 @@ namespace platf {
* @brief Horizontal mouse scroll.
* @param input The input_t instance to use.
* @param high_res_distance How far to scroll.
*
* EXAMPLES:
* ```cpp
* @examples
* hscroll(input, 1200);
* ```
* @examples_end
*/
void
hscroll(input_t &input, int high_res_distance) {
@ -1454,11 +1436,9 @@ namespace platf {
* @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.
*
* EXAMPLES:
* ```cpp
* @examples
* x_keyboard(input, 0x5A, false, 0); // Press Z
* ```
* @examples_end
*/
static void
x_keyboard(input_t &input, uint16_t modcode, bool release, uint8_t flags) {
@ -1489,11 +1469,9 @@ namespace platf {
* @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.
*
* EXAMPLES:
* ```cpp
* @examples
* keyboard(input, 0x5A, false, 0); // Press Z
* ```
* @examples_end
*/
void
keyboard_update(input_t &input, uint16_t modcode, bool release, uint8_t flags) {
@ -2106,11 +2084,9 @@ namespace platf {
/**
* @brief Initialize a new keyboard and return it.
*
* EXAMPLES:
* ```cpp
* @examples
* auto my_keyboard = keyboard();
* ```
* @examples_end
*/
evdev_t
keyboard() {
@ -2135,11 +2111,9 @@ namespace platf {
/**
* @brief Initialize a new `uinput` virtual relative mouse and return it.
*
* EXAMPLES:
* ```cpp
* @examples
* auto my_mouse = mouse_rel();
* ```
* @examples_end
*/
evdev_t
mouse_rel() {
@ -2186,11 +2160,9 @@ namespace platf {
/**
* @brief Initialize a new `uinput` virtual absolute mouse and return it.
*
* EXAMPLES:
* ```cpp
* @examples
* auto my_mouse = mouse_abs();
* ```
* @examples_end
*/
evdev_t
mouse_abs() {
@ -2241,11 +2213,9 @@ namespace platf {
/**
* @brief Initialize a new `uinput` virtual touchscreen and return it.
*
* EXAMPLES:
* ```cpp
* @examples
* auto my_touchscreen = touchscreen();
* ```
* @examples_end
*/
evdev_t
touchscreen() {
@ -2348,11 +2318,9 @@ namespace platf {
/**
* @brief Initialize a new `uinput` virtual pen pad and return it.
*
* EXAMPLES:
* ```cpp
* @examples
* auto my_penpad = penpad();
* ```
* @examples_end
*/
evdev_t
penpad() {
@ -2447,11 +2415,9 @@ namespace platf {
/**
* @brief Initialize a new `uinput` virtual X360 gamepad and return it.
*
* EXAMPLES:
* ```cpp
* @examples
* auto my_x360 = x360();
* ```
* @examples_end
*/
evdev_t
x360() {
@ -2524,11 +2490,9 @@ namespace platf {
/**
* @brief Initialize the input system and return it.
*
* EXAMPLES:
* ```cpp
* @examples
* auto my_input = input();
* ```
* @examples_end
*/
input_t
input() {

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/kmsgrab.cpp
* @brief todo
* @brief Definitions for KMS screen capture.
*/
#include <drm_fourcc.h>
#include <errno.h>

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/misc.cpp
* @brief todo
* @brief Miscellaneous definitions for Linux.
*/
// Required for in6_pktinfo with glibc headers
@ -747,18 +747,18 @@ namespace platf {
namespace source {
enum source_e : std::size_t {
#ifdef SUNSHINE_BUILD_CUDA
NVFBC,
NVFBC, ///< NvFBC
#endif
#ifdef SUNSHINE_BUILD_WAYLAND
WAYLAND,
WAYLAND, ///< Wayland
#endif
#ifdef SUNSHINE_BUILD_DRM
KMS,
KMS, ///< KMS
#endif
#ifdef SUNSHINE_BUILD_X11
X11,
X11, ///< X11
#endif
MAX_FLAGS
MAX_FLAGS ///< The maximum number of flags
};
} // namespace source

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/misc.h
* @brief todo
* @brief Miscellaneous declarations for Linux.
*/
#pragma once
@ -16,9 +16,9 @@ KITTY_USING_MOVE_T(file_t, int, -1, {
});
enum class window_system_e {
NONE,
X11,
WAYLAND,
NONE, ///< No window system
X11, ///< X11
WAYLAND, ///< Wayland
};
extern window_system_e window_system;

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/publish.cpp
* @brief todo
* @brief Definitions for publishing services on Linux.
* @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
*/
@ -21,122 +21,118 @@ namespace avahi {
* @brief Error codes used by avahi.
*/
enum err_e {
OK = 0, /**< OK */
ERR_FAILURE = -1, /**< Generic error code */
ERR_BAD_STATE = -2, /**< Object was in a bad state */
ERR_INVALID_HOST_NAME = -3, /**< Invalid host name */
ERR_INVALID_DOMAIN_NAME = -4, /**< Invalid domain name */
ERR_NO_NETWORK = -5, /**< No suitable network protocol available */
ERR_INVALID_TTL = -6, /**< Invalid DNS TTL */
ERR_IS_PATTERN = -7, /**< RR key is pattern */
ERR_COLLISION = -8, /**< Name collision */
ERR_INVALID_RECORD = -9, /**< Invalid RR */
OK = 0, ///< OK
ERR_FAILURE = -1, ///< Generic error code
ERR_BAD_STATE = -2, ///< Object was in a bad state
ERR_INVALID_HOST_NAME = -3, ///< Invalid host name
ERR_INVALID_DOMAIN_NAME = -4, ///< Invalid domain name
ERR_NO_NETWORK = -5, ///< No suitable network protocol available
ERR_INVALID_TTL = -6, ///< Invalid DNS TTL
ERR_IS_PATTERN = -7, ///< RR key is pattern
ERR_COLLISION = -8, ///< Name collision
ERR_INVALID_RECORD = -9, ///< Invalid RR
ERR_INVALID_SERVICE_NAME = -10, /**< Invalid service name */
ERR_INVALID_SERVICE_TYPE = -11, /**< Invalid service type */
ERR_INVALID_PORT = -12, /**< Invalid port number */
ERR_INVALID_KEY = -13, /**< Invalid key */
ERR_INVALID_ADDRESS = -14, /**< Invalid address */
ERR_TIMEOUT = -15, /**< Timeout reached */
ERR_TOO_MANY_CLIENTS = -16, /**< Too many clients */
ERR_TOO_MANY_OBJECTS = -17, /**< Too many objects */
ERR_TOO_MANY_ENTRIES = -18, /**< Too many entries */
ERR_OS = -19, /**< OS error */
ERR_INVALID_SERVICE_NAME = -10, ///< Invalid service name
ERR_INVALID_SERVICE_TYPE = -11, ///< Invalid service type
ERR_INVALID_PORT = -12, ///< Invalid port number
ERR_INVALID_KEY = -13, ///< Invalid key
ERR_INVALID_ADDRESS = -14, ///< Invalid address
ERR_TIMEOUT = -15, ///< Timeout reached
ERR_TOO_MANY_CLIENTS = -16, ///< Too many clients
ERR_TOO_MANY_OBJECTS = -17, ///< Too many objects
ERR_TOO_MANY_ENTRIES = -18, ///< Too many entries
ERR_OS = -19, ///< OS error
ERR_ACCESS_DENIED = -20, /**< Access denied */
ERR_INVALID_OPERATION = -21, /**< Invalid operation */
ERR_DBUS_ERROR = -22, /**< An unexpected D-Bus error occurred */
ERR_DISCONNECTED = -23, /**< Daemon connection failed */
ERR_NO_MEMORY = -24, /**< Memory exhausted */
ERR_INVALID_OBJECT = -25, /**< The object passed to this function was invalid */
ERR_NO_DAEMON = -26, /**< Daemon not running */
ERR_INVALID_INTERFACE = -27, /**< Invalid interface */
ERR_INVALID_PROTOCOL = -28, /**< Invalid protocol */
ERR_INVALID_FLAGS = -29, /**< Invalid flags */
ERR_ACCESS_DENIED = -20, ///< Access denied
ERR_INVALID_OPERATION = -21, ///< Invalid operation
ERR_DBUS_ERROR = -22, ///< An unexpected D-Bus error occurred
ERR_DISCONNECTED = -23, ///< Daemon connection failed
ERR_NO_MEMORY = -24, ///< Memory exhausted
ERR_INVALID_OBJECT = -25, ///< The object passed to this function was invalid
ERR_NO_DAEMON = -26, ///< Daemon not running
ERR_INVALID_INTERFACE = -27, ///< Invalid interface
ERR_INVALID_PROTOCOL = -28, ///< Invalid protocol
ERR_INVALID_FLAGS = -29, ///< Invalid flags
ERR_NOT_FOUND = -30, /**< Not found */
ERR_INVALID_CONFIG = -31, /**< Configuration error */
ERR_VERSION_MISMATCH = -32, /**< Version mismatch */
ERR_INVALID_SERVICE_SUBTYPE = -33, /**< Invalid service subtype */
ERR_INVALID_PACKET = -34, /**< Invalid packet */
ERR_INVALID_DNS_ERROR = -35, /**< Invalid DNS return code */
ERR_DNS_FORMERR = -36, /**< DNS Error: Form error */
ERR_DNS_SERVFAIL = -37, /**< DNS Error: Server Failure */
ERR_DNS_NXDOMAIN = -38, /**< DNS Error: No such domain */
ERR_DNS_NOTIMP = -39, /**< DNS Error: Not implemented */
ERR_NOT_FOUND = -30, ///< Not found
ERR_INVALID_CONFIG = -31, ///< Configuration error
ERR_VERSION_MISMATCH = -32, ///< Version mismatch
ERR_INVALID_SERVICE_SUBTYPE = -33, ///< Invalid service subtype
ERR_INVALID_PACKET = -34, ///< Invalid packet
ERR_INVALID_DNS_ERROR = -35, ///< Invalid DNS return code
ERR_DNS_FORMERR = -36, ///< DNS Error: Form error
ERR_DNS_SERVFAIL = -37, ///< DNS Error: Server Failure
ERR_DNS_NXDOMAIN = -38, ///< DNS Error: No such domain
ERR_DNS_NOTIMP = -39, ///< DNS Error: Not implemented
ERR_DNS_REFUSED = -40, /**< DNS Error: Operation refused */
ERR_DNS_YXDOMAIN = -41,
ERR_DNS_YXRRSET = -42,
ERR_DNS_NXRRSET = -43,
ERR_DNS_NOTAUTH = -44, /**< DNS Error: Not authorized */
ERR_DNS_NOTZONE = -45,
ERR_INVALID_RDATA = -46, /**< Invalid RDATA */
ERR_INVALID_DNS_CLASS = -47, /**< Invalid DNS class */
ERR_INVALID_DNS_TYPE = -48, /**< Invalid DNS type */
ERR_NOT_SUPPORTED = -49, /**< Not supported */
ERR_DNS_REFUSED = -40, ///< DNS Error: Operation refused
ERR_DNS_YXDOMAIN = -41, ///< TODO
ERR_DNS_YXRRSET = -42, ///< TODO
ERR_DNS_NXRRSET = -43, ///< TODO
ERR_DNS_NOTAUTH = -44, ///< DNS Error: Not authorized
ERR_DNS_NOTZONE = -45, ///< TODO
ERR_INVALID_RDATA = -46, ///< Invalid RDATA
ERR_INVALID_DNS_CLASS = -47, ///< Invalid DNS class
ERR_INVALID_DNS_TYPE = -48, ///< Invalid DNS type
ERR_NOT_SUPPORTED = -49, ///< Not supported
ERR_NOT_PERMITTED = -50, /**< Operation not permitted */
ERR_INVALID_ARGUMENT = -51, /**< Invalid argument */
ERR_IS_EMPTY = -52, /**< Is empty */
ERR_NO_CHANGE = -53, /**< The requested operation is invalid because it is redundant */
ERR_NOT_PERMITTED = -50, ///< Operation not permitted
ERR_INVALID_ARGUMENT = -51, ///< Invalid argument
ERR_IS_EMPTY = -52, ///< Is empty
ERR_NO_CHANGE = -53, ///< The requested operation is invalid because it is redundant
ERR_MAX = -54
ERR_MAX = -54 ///< TODO
};
constexpr auto IF_UNSPEC = -1;
enum proto {
PROTO_INET = 0, /**< IPv4 */
PROTO_INET6 = 1, /**< IPv6 */
PROTO_UNSPEC = -1 /**< Unspecified/all protocol(s) */
PROTO_INET = 0, ///< IPv4
PROTO_INET6 = 1, ///< IPv6
PROTO_UNSPEC = -1 ///< Unspecified/all protocol(s)
};
enum ServerState {
SERVER_INVALID, /**< Invalid state (initial) */
SERVER_REGISTERING, /**< Host RRs are being registered */
SERVER_RUNNING, /**< All host RRs have been established */
SERVER_COLLISION, /**< There is a collision with a host RR. All host RRs have been withdrawn, the user should set a new host name via avahi_server_set_host_name() */
SERVER_FAILURE /**< Some fatal failure happened, the server is unable to proceed */
SERVER_INVALID, ///< Invalid state (initial)
SERVER_REGISTERING, ///< Host RRs are being registered
SERVER_RUNNING, ///< All host RRs have been established
SERVER_COLLISION, ///< There is a collision with a host RR. All host RRs have been withdrawn, the user should set a new host name via avahi_server_set_host_name()
SERVER_FAILURE ///< Some fatal failure happened, the server is unable to proceed
};
enum ClientState {
CLIENT_S_REGISTERING = SERVER_REGISTERING, /**< Server state: REGISTERING */
CLIENT_S_RUNNING = SERVER_RUNNING, /**< Server state: RUNNING */
CLIENT_S_COLLISION = SERVER_COLLISION, /**< Server state: COLLISION */
CLIENT_FAILURE = 100, /**< Some kind of error happened on the client side */
CLIENT_CONNECTING = 101 /**< We're still connecting. This state is only entered when AVAHI_CLIENT_NO_FAIL has been passed to avahi_client_new() and the daemon is not yet available. */
CLIENT_S_REGISTERING = SERVER_REGISTERING, ///< Server state: REGISTERING
CLIENT_S_RUNNING = SERVER_RUNNING, ///< Server state: RUNNING
CLIENT_S_COLLISION = SERVER_COLLISION, ///< Server state: COLLISION
CLIENT_FAILURE = 100, ///< Some kind of error happened on the client side
CLIENT_CONNECTING = 101 ///< We're still connecting. This state is only entered when AVAHI_CLIENT_NO_FAIL has been passed to avahi_client_new() and the daemon is not yet available.
};
enum EntryGroupState {
ENTRY_GROUP_UNCOMMITED, /**< The group has not yet been committed, the user must still call avahi_entry_group_commit() */
ENTRY_GROUP_REGISTERING, /**< The entries of the group are currently being registered */
ENTRY_GROUP_ESTABLISHED, /**< The entries have successfully been established */
ENTRY_GROUP_COLLISION, /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */
ENTRY_GROUP_FAILURE /**< Some kind of failure happened, the entries have been withdrawn */
ENTRY_GROUP_UNCOMMITED, ///< The group has not yet been committed, the user must still call avahi_entry_group_commit()
ENTRY_GROUP_REGISTERING, ///< The entries of the group are currently being registered
ENTRY_GROUP_ESTABLISHED, ///< The entries have successfully been established
ENTRY_GROUP_COLLISION, ///< A name collision for one of the entries in the group has been detected, the entries have been withdrawn
ENTRY_GROUP_FAILURE ///< Some kind of failure happened, the entries have been withdrawn
};
enum ClientFlags {
CLIENT_IGNORE_USER_CONFIG = 1, /**< Don't read user configuration */
CLIENT_NO_FAIL = 2 /**< Don't fail if the daemon is not available when avahi_client_new() is called, instead enter CLIENT_CONNECTING state and wait for the daemon to appear */
CLIENT_IGNORE_USER_CONFIG = 1, ///< Don't read user configuration
CLIENT_NO_FAIL = 2 ///< Don't fail if the daemon is not available when avahi_client_new() is called, instead enter CLIENT_CONNECTING state and wait for the daemon to appear
};
/**
* @brief Flags for publishing functions.
*/
enum PublishFlags {
PUBLISH_UNIQUE = 1, /**< For raw records: The RRset is intended to be unique */
PUBLISH_NO_PROBE = 2, /**< For raw records: Though the RRset is intended to be unique no probes shall be sent */
PUBLISH_NO_ANNOUNCE = 4, /**< For raw records: Do not announce this RR to other hosts */
PUBLISH_ALLOW_MULTIPLE = 8, /**< For raw records: Allow multiple local records of this type, even if they are intended to be unique */
/** \cond fulldocs */
PUBLISH_NO_REVERSE = 16, /**< For address records: don't create a reverse (PTR) entry */
PUBLISH_NO_COOKIE = 32, /**< For service records: do not implicitly add the local service cookie to TXT data */
/** \endcond */
PUBLISH_UPDATE = 64, /**< Update existing records instead of adding new ones */
/** \cond fulldocs */
PUBLISH_USE_WIDE_AREA = 128, /**< Register the record using wide area DNS (i.e. unicast DNS update) */
PUBLISH_USE_MULTICAST = 256 /**< Register the record using multicast DNS */
/** \endcond */
PUBLISH_UNIQUE = 1, ///< For raw records: The RRset is intended to be unique
PUBLISH_NO_PROBE = 2, ///< For raw records: Though the RRset is intended to be unique no probes shall be sent
PUBLISH_NO_ANNOUNCE = 4, ///< For raw records: Do not announce this RR to other hosts
PUBLISH_ALLOW_MULTIPLE = 8, ///< For raw records: Allow multiple local records of this type, even if they are intended to be unique
PUBLISH_NO_REVERSE = 16, ///< For address records: don't create a reverse (PTR) entry
PUBLISH_NO_COOKIE = 32, ///< For service records: do not implicitly add the local service cookie to TXT data
PUBLISH_UPDATE = 64, ///< Update existing records instead of adding new ones
PUBLISH_USE_WIDE_AREA = 128, ///< Register the record using wide area DNS (i.e. unicast DNS update)
PUBLISH_USE_MULTICAST = 256 ///< Register the record using multicast DNS
};
using IfIndex = int;

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/vaapi.cpp
* @brief todo
* @brief Definitions for VA-API hardware accelerated capture.
*/
#include <sstream>
#include <string>

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/vaapi.h
* @brief todo
* @brief Declarations for VA-API hardware accelerated capture.
*/
#pragma once

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/wayland.cpp
* @brief todo
* @brief Definitions for Wayland capture.
*/
#include <poll.h>
#include <wayland-client.h>
@ -65,7 +65,7 @@ namespace wl {
/**
* @brief Waits up to the specified timeout to dispatch new events on the wl_display.
* @param timeout The timeout in milliseconds.
* @return true if new events were dispatched or false if the timeout expired.
* @return `true` if new events were dispatched or `false` if the timeout expired.
*/
bool
display_t::dispatch(std::chrono::milliseconds timeout) {

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/wayland.h
* @brief todo
* @brief Declarations for Wayland capture.
*/
#pragma once
@ -17,7 +17,7 @@
* The classes defined in this macro block should only be used by
* cpp files whose compilation depends on SUNSHINE_BUILD_WAYLAND
*/
#if defined(SUNSHINE_BUILD_WAYLAND) || defined(DOXYGEN)
#ifdef SUNSHINE_BUILD_WAYLAND
namespace wl {
using display_internal_t = util::safe_ptr<wl_display, wl_display_disconnect>;
@ -34,9 +34,9 @@ namespace wl {
class dmabuf_t {
public:
enum status_e {
WAITING,
READY,
REINIT,
WAITING, ///< Waiting for a frame
READY, ///< Frame is ready
REINIT, ///< Reinitialize the frame
};
dmabuf_t(dmabuf_t &&) = delete;
@ -154,9 +154,9 @@ namespace wl {
public:
enum interface_e {
XDG_OUTPUT,
WLR_EXPORT_DMABUF,
MAX_INTERFACES,
XDG_OUTPUT, ///< xdg-output
WLR_EXPORT_DMABUF, ///< Export dmabuf
MAX_INTERFACES, ///< Maximum number of interfaces
};
interface_t(interface_t &&) = delete;

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/wlgrab.cpp
* @brief todo
* @brief Definitions for wlgrab capture.
*/
#include <thread>

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/x11grab.cpp
* @brief todo
* @brief Definitions for x11 capture.
*/
#include "src/platform/common.h"

View file

@ -1,6 +1,6 @@
/**
* @file src/platform/linux/x11grab.h
* @brief todo
* @brief Declarations for x11 capture.
*/
#pragma once