USBGuard
Software framework that protects your computer against rogue USB devices by implementing basic whitelisting and blacklisting capabilities.
Public Types | Public Member Functions | Static Public Member Functions | List of all members
usbguard::Policy Class Reference

Public Types

enum  EventType { Insert = 1, Update = 2, Remove = 3 }
 

Public Member Functions

void setRuleSet (std::shared_ptr< RuleSet > ptr)
 
std::shared_ptr< RuleSetgetRuleSet ()
 
void setDefaultTarget (Rule::Target target)
 
Rule::Target getDefaultTarget () const
 
void setDefaultAction (const std::string &action)
 
uint32_t appendRule (const Rule &rule, uint32_t parent_id=Rule::LastID)
 
uint32_t upsertRule (const Rule &match_rule, const Rule &new_rule, bool parent_insensitive=false)
 
std::shared_ptr< RulegetRule (uint32_t id)
 
bool removeRule (uint32_t id)
 
std::shared_ptr< RulegetFirstMatchingRule (std::shared_ptr< const Rule > device_rule, uint32_t from_id=1) const
 
std::vector< std::shared_ptr< const Rule > > getRules ()
 
uint32_t assignID (std::shared_ptr< Rule > rule)
 
uint32_t assignID ()
 

Static Public Member Functions

static std::string eventTypeToString (EventType event)
 Converts EventType to its string representation. More...
 

Member Function Documentation

◆ eventTypeToString()

std::string usbguard::Policy::eventTypeToString ( Policy::EventType  event)
static

Converts EventType to its string representation.

@event EventType to convert.

Returns
String representation of given EventType.
Exceptions
USBGUARD_BUGIf given EventType is unknown.

The documentation for this class was generated from the following files: