Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
session_broker.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <optional>
9#include <string>
10#include <sys/types.h>
11#include <vector>
12
13namespace platf::session_broker {
14
24 struct account_t {
25 std::string user;
26 uid_t uid {};
27 std::string home;
28 };
29
37 bool available();
38
48 std::optional<account_t> ensure(const std::string &client_uuid);
49
53 std::optional<account_t> lookup(const std::string &client_uuid);
54
72 std::optional<std::string> start(
73 const std::string &client_uuid,
74 const std::vector<std::string> &arguments,
75 const std::vector<std::string> &environment,
76 const std::string &scope = {}
77 );
78
89 std::optional<std::string> wayland_socket(const std::string &client_uuid);
90
98 bool active(const std::string &client_uuid);
99
108 std::optional<bool> query_active(const std::string &client_uuid);
109
115 bool stop(const std::string &client_uuid);
116
117} // namespace platf::session_broker
std::optional< account_t > lookup(const std::string &client_uuid)
The client's account if it already has one, without creating it.
std::optional< std::string > start(const std::string &client_uuid, const std::vector< std::string > &arguments, const std::vector< std::string > &environment, const std::string &scope)
Start arguments as the client's account, and return the unit name.
std::optional< account_t > ensure(const std::string &client_uuid)
The client's account, created if this is the first time it asked.
bool available()
Whether a broker socket is there to talk to.
The account a paired client owns.