USBGuard
Software framework that protects your computer against rogue USB devices by implementing basic whitelisting and blacklisting capabilities.
DeviceManagerHooks.hpp
1
//
2
// Copyright (C) 2017 Red Hat, Inc.
3
//
4
// This program is free software; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation; either version 2 of the License, or
7
// (at your option) any later version.
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 <http://www.gnu.org/licenses/>.
16
//
17
// Authors: Daniel Kopecek <dkopecek@redhat.com>
18
//
19
#pragma once
20
21
#include "Device.hpp"
22
#include "DeviceManager.hpp"
23
#include "Typedefs.hpp"
24
25
#include <memory>
26
#include <string>
27
28
#include <cstdint>
29
30
namespace
usbguard
31
{
35
class
DLL_PUBLIC
DeviceManagerHooks
36
{
37
public
:
45
virtual
void
dmHookDeviceEvent(
DeviceManager::EventType
event, std::shared_ptr<Device> device);
46
53
virtual
uint32_t dmHookAssignID() = 0;
54
61
virtual
void
dmHookDeviceException(
const
std::string& message) = 0;
62
};
63
}
/* namespace usbguard */
64
65
/* vim: set ts=2 sw=2 et */
usbguard::DeviceManagerHooks
Allows reacting to device events.
Definition:
DeviceManagerHooks.hpp:35
usbguard::DeviceManager::EventType
EventType
Type of event that took place on the device.
Definition:
DeviceManager.hpp:51
Generated by
1.8.15