Generator functions. This header contains generator functions, either used to assemble the bwrap command, or auxiliary functions.
More...
|
|
std::pair< std::string, int > | xorg () |
| |
| void | encrypted (const std::string_view &program) |
| | Handle an encrypted FS Sandbox.
|
| |
| void | script (const std::string &binary) |
| | Generate a script for the sandbox.
|
| |
| void | desktop_entry (const std::string &name) |
| | Generate a desktop file for the sandbox.
|
| |
| void | flatpak_info (const std::string_view &program, const std::string_view &instance, const shared::TemporaryDirectory &work_dir) |
| | Create a .flatpak-info file for the program.
|
| |
| std::pair< std::filesystem::path, std::future< void > > | proxy_lib () |
| | Setup the Proxy's SOF.
|
| |
| std::pair< int, std::future< int > > | xdg_dbus_proxy (const std::string &program, const shared::TemporaryDirectory &work_dir) |
| | Spawn an instance of the xdg-dbus-proxy for the application instance.
|
| |
| vector | cmd (const std::string &program) |
| | Generate the bulk of the main program command.
|
| |
Generator functions. This header contains generator functions, either used to assemble the bwrap command, or auxiliary functions.
◆ cmd()
| shared::vector generate::cmd |
( |
const std::string & | program | ) |
|
Generate the bulk of the main program command.
- Parameters
-
| program | The name of the program. |
- Returns
- The generated command.
- Note
- Parts of the command that should be computed at runtime, like environment variables, should be done outside this function.
◆ desktop_entry()
| void generate::desktop_entry |
( |
const std::string & | name | ) |
|
Generate a desktop file for the sandbox.
- Parameters
-
◆ encrypted()
| void generate::encrypted |
( |
const std::string_view & | program | ) |
|
Handle an encrypted FS Sandbox.
- Parameters
-
◆ flatpak_info()
| void generate::flatpak_info |
( |
const std::string_view & | program, |
|
|
const std::string_view & | instance, |
|
|
const shared::TemporaryDirectory & | work_dir ) |
Create a .flatpak-info file for the program.
- Parameters
-
| program | The name of the program. |
| instance | The instance name, located in $XDG_RUNTIME_DIR/.flatpak. |
| work_dir | The working dir for the program instance. |
◆ proxy_lib()
| std::pair< std::filesystem::path, std::future< void > > generate::proxy_lib |
( |
| ) |
|
Setup the Proxy's SOF.
- Returns
- The path to the Proxy's SOF, and a future to wait for the path to be populated.
- Note
- We run this on –dry, such that the Proxy SOF gets generated along with all the others.
◆ script()
| void generate::script |
( |
const std::string & | binary | ) |
|
Generate a script for the sandbox.
- Parameters
-
| binary | Where to write the script to. |
◆ xdg_dbus_proxy()
| std::pair< int, std::future< int > > generate::xdg_dbus_proxy |
( |
const std::string & | program, |
|
|
const shared::TemporaryDirectory & | work_dir ) |
Spawn an instance of the xdg-dbus-proxy for the application instance.
- Parameters
-
| program | The name of the program attached to this proxy. |
| work_dir | The application's instance work dir. |
- Returns
- A pair, including the wd to wait for the bus, and a future to return the pid of the proxy.