Skip to content
API Documentation
BastionGuard™
PacManager.hpp
Go to the documentation of this file.
1/*
2 * BastionGuard™
3 * Copyright (C) 2025–2026 Calogero Scarnà
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 *
17 * BastionGuard™ is a trademark of Calogero Scarnà.
18 * The BastionGuard™ name and branding are not licensed under the GPL.
19 */
20
21#pragma once
22#include <string>
23
25public:
26 struct Result {
27 bool ok = false;
28 std::string backend;
29 std::string message;
30 };
31
32 static Result enable_pac(const std::string& pac_url);
33
34 static Result disable_pac();
35
36 static Result start_pacd_user();
37 static Result stop_pacd_user();
38
39 static Result enable_pac_with_pacd(const std::string& pac_url);
41
42private:
43 static bool cmd_exists(const std::string& cmd);
44
45 static Result enable_gnome(const std::string& pac_url);
46 static Result disable_gnome();
47
48 static Result enable_kde(const std::string& pac_url);
49 static Result disable_kde();
50
51 static Result enable_xfce(const std::string& pac_url);
52 static Result disable_xfce();
53
56};
static Result start_pacd_user()
static Result enable_xfce(const std::string &pac_url)
static Result disable_pac_with_pacd()
static Result disable_gnome()
static Result enable_pac_with_pacd(const std::string &pac_url)
static Result enable_gnome(const std::string &pac_url)
static Result disable_kde()
static Result disable_xfce()
static Result disable_pac()
static Result enable_pac(const std::string &pac_url)
static bool cmd_exists(const std::string &cmd)
static Result stop_pacd_user()
static Result enable_kde(const std::string &pac_url)
static Result enable_env_fallback()
static Result disable_env_fallback()
std::string message
std::string backend