Go to the source code of this file.
Classes | |
| struct | USBDevice |
Functions | |
| void | write_log (const std::string &msg) |
| void | send_device_added (const USBDevice &dev) |
| void | send_device_removed (const std::string &devnode) |
| std::vector< USBDevice > | detect_usb_devices () |
| void | monitor_loop () |
| void | handle_signal (int) |
| static bool | load_lang_conf () |
| int | main () |
Variables | |
| static std::atomic< bool > | running {true} |
| static std::mutex | log_mutex |
| static GDBusConnection * | bus = nullptr |
| std::vector< USBDevice > detect_usb_devices | ( | ) |
Definition at line 143 of file BastionGuard-usbd-gdbus.cpp.
References detect_usb_devices(), USBDevice::devnode, USBDevice::name, and USBDevice::serial.
Referenced by detect_usb_devices(), and monitor_loop().
| void handle_signal | ( | int | ) |
Definition at line 268 of file BastionGuard-usbd-gdbus.cpp.
References handle_signal(), and running.
|
static |
Definition at line 270 of file BastionGuard-usbd-gdbus.cpp.
References load_lang_conf().
| int main | ( | void | ) |
Definition at line 308 of file BastionGuard-usbd-gdbus.cpp.
References _, bus, handle_signal(), load_lang_conf(), LOCALEDIR, main(), monitor_loop(), running, and write_log().
| void monitor_loop | ( | ) |
Definition at line 229 of file BastionGuard-usbd-gdbus.cpp.
References _, detect_usb_devices(), monitor_loop(), running, send_device_added(), send_device_removed(), and write_log().
| void send_device_added | ( | const USBDevice & | dev | ) |
Definition at line 100 of file BastionGuard-usbd-gdbus.cpp.
References _, bus, USBDevice::devnode, USBDevice::name, send_device_added(), USBDevice::serial, and write_log().
Referenced by monitor_loop(), and send_device_added().
| void send_device_removed | ( | const std::string & | devnode | ) |
Definition at line 123 of file BastionGuard-usbd-gdbus.cpp.
References _, bus, send_device_removed(), and write_log().
Referenced by monitor_loop(), and send_device_removed().
| void write_log | ( | const std::string & | msg | ) |
Definition at line 45 of file BastionGuard-usbd-gdbus.cpp.
References log_mutex, and write_log().
|
static |
Definition at line 43 of file BastionGuard-usbd-gdbus.cpp.
Referenced by main(), send_device_added(), and send_device_removed().
|
static |
Definition at line 42 of file BastionGuard-usbd-gdbus.cpp.
|
static |
Definition at line 41 of file BastionGuard-usbd-gdbus.cpp.