26#include <glib/gi18n.h>
30#include <unordered_map>
31#include <unordered_set>
39 explicit ScanPage(Gtk::Window& parent);
46 Gtk::Box
buttonBox{Gtk::Orientation::HORIZONTAL, 5};
68 Gtk::Box
apiKeyBox{Gtk::Orientation::HORIZONTAL, 6};
103 void readOutput(
const Glib::RefPtr<Gio::AsyncResult>& result);
138 Glib::RefPtr<Gtk::FileDialog> dialog);
141 Glib::RefPtr<Gtk::FileDialog> dialog);
162 void showAlertWindow(
const std::string& file,
const std::string& family);
164 bool safeExists(
const std::string& p)
noexcept;
Glib::RefPtr< Gio::InputStream > stdoutStream
BastionGuard::AliveFlag alive_
bool onInotifyEvent(Glib::IOCondition cond)
Glib::RefPtr< Glib::IOSource > inotifySource
void scanAurAuto(const std::string &path)
void enableAutoScanDownloads()
void logMessage(const std::string &msg)
std::vector< std::string > infectedFilesBuffer
std::vector< std::string > detectBrowserDownloadDirs()
void showAlertWindow(const std::string &file, const std::string &family)
std::vector< std::string > pendingLog
void handleInfectedFile(const std::string &filepath)
Glib::RefPtr< Gtk::SizeGroup > apiKeySizeGroup
bool safeExists(const std::string &p) noexcept
bool isInterestingDownload(const std::string &path)
void showCloudPrivacyDisclaimer()
Gtk::Switch autoScanSwitch
void onChooseFolderFinish(const Glib::RefPtr< Gio::AsyncResult > &result, Glib::RefPtr< Gtk::FileDialog > dialog)
void cloudCheckMalwareBazaarWorker(const std::string &filepath)
void onToggleApiKeyVisibility()
void addInotifyRecursive(const std::string &path)
std::unordered_map< int, std::string > watchMap
std::vector< std::string > getXdgUserDirs()
void handleInfectedFileWithName(const std::string &filepath, const std::string &virusName)
void readOutput(const Glib::RefPtr< Gio::AsyncResult > &result)
Glib::RefPtr< Gtk::TextBuffer > textBuffer
void handleInfectedFiles(const std::vector< std::string > &files)
Gtk::Button btnChooseFolder
void enqueueLog(const std::string &msg)
Gtk::Button btnShowApiKey
std::string resolveFinalDownloadedFile(const std::string &path)
void enableGlobalDownloadMonitor()
std::unordered_set< std::string > alreadyWatched
std::string malwareBazaarApiKey
void onAurPkgbuildDetected(const std::string &path)
bool isOutsideKnownDownloadDirs(const std::string &path)
void onApiKeySaveClicked()
void cloudCheckMalwareBazaar(const std::string &filepath)
void scanFileAutomatically(const std::string &filepath)
void addFileToList(const std::string &filepath)
Gtk::Button btnApiKeySave
Glib::RefPtr< Gio::Subprocess > subprocess
Gtk::Window & parentWindow
Gtk::Button btnChooseFile
void disableAllMonitors()
std::vector< std::string > knownDownloadDirs
Gtk::Box apiKeyActionsBox
void handleInotifyFileEvent(const std::string &path, uint32_t mask)
void onChooseFileFinish(const Glib::RefPtr< Gio::AsyncResult > &result, Glib::RefPtr< Gtk::FileDialog > dialog)
Glib::RefPtr< Gio::DataInputStream > dataStream
ScanPage(Gtk::Window &parent)
std::shared_ptr< std::atomic< bool > > AliveFlag
AliveFlag make_alive_flag()