22 #include "Typedefs.hpp" 94 std::mutex& refDeviceMutex();
111 std::shared_ptr<Rule> getDeviceRule(
bool with_port =
true,
bool with_parent_hash =
true,
bool match_rule =
false);
119 std::string hashString(
const std::string& value)
const;
129 void initializeHash();
137 void updateHash(
const void* ptr,
size_t size);
147 void updateHash(std::istream& descriptor_stream,
size_t expected_size);
154 std::string finalizeHash();
163 const std::string& getHash()
const;
170 void setParentHash(
const std::string& hash);
177 void setID(uint32_t
id);
184 uint32_t getID()
const;
191 void setParentID(uint32_t
id);
198 uint32_t getParentID()
const;
223 void setName(
const std::string& name);
230 const std::string& getName()
const;
253 void setPort(
const std::string& port);
260 const std::string& getPort()
const;
269 void setSerial(
const std::string& serial_number);
276 const std::string& getSerial()
const;
285 void setConnectType(
const std::string& connect_type);
292 const std::string& getConnectType()
const;
301 std::vector<USBInterfaceType>& refMutableInterfaceTypes();
308 const std::vector<USBInterfaceType>& getInterfaceTypes()
const;
315 virtual bool isController()
const = 0;
322 virtual std::string getSystemName()
const = 0;
368 std::unique_ptr<DevicePrivate> d_pointer;
Target
Enumeration of possible rule targets.
Definition: Rule.hpp:86
Represents USB device in USBGuard.
Definition: Device.hpp:41
Manages and keeps track of active USB devices.
Definition: DeviceManager.hpp:44
Parses USB descriptors.
Definition: USB.hpp:432
Represents ID of a USB device.
Definition: USB.hpp:158