Skip to content
API Documentation
BastionGuard™
QuarantinePage.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
23#include <gtkmm/box.h>
24#include <gtkmm/label.h>
25#include <gtkmm/listbox.h>
26#include <giomm/filemonitor.h>
27#include <string>
28
29class QuarantinePage : public Gtk::Box {
30public:
32
33 void updateMonitor();
34
35private:
36 bool refreshList();
37 void onRestoreFile(const std::string& filepath);
38 void onDeleteFile(const std::string& filepath);
39
40 void onDirChanged(const Glib::RefPtr<Gio::File>& file,
41 const Glib::RefPtr<Gio::File>& other_file,
42 Gio::FileMonitor::Event event);
43
44 Gtk::ListBox listBox;
45 Gtk::Label emptyLabel;
46
47 Glib::RefPtr<Gio::FileMonitor> monitor;
48};
void onDirChanged(const Glib::RefPtr< Gio::File > &file, const Glib::RefPtr< Gio::File > &other_file, Gio::FileMonitor::Event event)
void onRestoreFile(const std::string &filepath)
Glib::RefPtr< Gio::FileMonitor > monitor
void onDeleteFile(const std::string &filepath)
Gtk::ListBox listBox
Gtk::Label emptyLabel