Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
card_broker.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <optional>
8#include <string>
9
10#include <sys/types.h>
11
12namespace VDISPLAY::card_broker {
13
22 struct card_t {
23 std::string name;
24 std::string card_path;
25 std::string render_node_path;
26 };
27
34 bool available();
35
52 std::optional<card_t> create(std::optional<uid_t> session_account_uid = std::nullopt);
53
59 bool remove(const std::string &name);
60
69 int sweep();
70
71} // namespace VDISPLAY::card_broker
bool available()
Whether a broker socket is there to talk to.
bool remove(const std::string &name)
Remove a card this user created. Removal is a hot-unplug, so a compositor still holding the card sees...
int sweep()
Remove every card this user still holds, and report how many went.
std::optional< card_t > create(std::optional< uid_t > session_account_uid)
Ask for a new card on a private DRM seat.
A card the broker created, and the device nodes it was given.
Definition card_broker.h:22
std::string card_path
/dev/dri/cardN, root-only and reached through the seat broker.
Definition card_broker.h:24
std::string name
configfs group name, needed to remove it again.
Definition card_broker.h:23
std::string render_node_path
/dev/dri/renderDN, owned by this user once udev has run.
Definition card_broker.h:25