21 #include "Typedefs.hpp" 45 RuleConditionBase(
const std::string& identifier,
const std::string& parameter,
bool negated =
false);
75 virtual void init(
Interface*
const interface_ptr);
88 virtual bool update(
const Rule& rule) = 0;
107 bool evaluate(
const Rule& rule);
114 const std::string& identifier()
const;
121 const std::string& parameter()
const;
130 bool hasParameter()
const;
137 bool isNegated()
const;
148 const std::string toString()
const;
153 const std::string toRuleString()
const;
164 static RuleConditionBase* getImplementation(
const std::string& condition_string);
177 static RuleConditionBase* getImplementation(
const std::string& identifier,
const std::string& parameter,
bool negated);
180 const std::string _identifier;
182 const std::string _parameter;
263 std::string toRuleString()
const;
265 std::unique_ptr<RuleConditionBase> _condition;
Determines whether USB device mathing specified criteria should be authorized, deauthorized or remove...
Definition: Rule.hpp:77
Wraps any type of rule condition.
Definition: RuleCondition.hpp:192
Base class for all specialized rule condition classes.
Definition: RuleCondition.hpp:34
Allows to receive signals and to communicate with the USBGuard daemon.
Definition: Interface.hpp:40