21 #include "DeviceManager.hpp" 22 #include "Exception.hpp" 23 #include "Interface.hpp" 24 #include "Typedefs.hpp" 34 class IPCClientPrivate;
87 bool isConnected()
const;
97 std::string setParameter(
const std::string& name,
const std::string& value)
override;
102 std::string getParameter(
const std::string& name)
override;
107 uint32_t appendRule(
const std::string& rule_spec, uint32_t parent_id,
bool permanent)
override;
112 void removeRule(uint32_t
id)
override;
117 const std::vector<Rule> listRules(
const std::string& label)
override;
128 return listRules(
"");
134 uint32_t applyDevicePolicy(uint32_t
id,
Rule::Target target,
bool permanent)
override;
139 const std::vector<Rule> listDevices(
const std::string& query)
override;
150 return listDevices(
"match");
168 (void)exception_initiated;
182 const std::string& device_rule)
override 200 const std::string& device_rule,
201 uint32_t rule_id)
override 218 const std::string& value_old,
219 const std::string& value_new)
override 233 const std::string&
object,
234 const std::string& reason)
override 242 std::unique_ptr<IPCClientPrivate> d_pointer;
Target
Enumeration of possible rule targets.
Definition: Rule.hpp:86
const std::vector< Rule > listDevices()
List all devices recognized by USBGuard daemon.
Definition: IPCClient.hpp:148
Communicates with USBGuard service (IPCServer).
Definition: IPCClient.hpp:40
virtual void PropertyParameterChanged(const std::string &name, const std::string &value_old, const std::string &value_new) override
Defines algorithm to perform in the case that property parameter has been changed.
Definition: IPCClient.hpp:217
virtual void ExceptionMessage(const std::string &context, const std::string &object, const std::string &reason) override
Defines algorithm to perform in the case that exception has arose.
Definition: IPCClient.hpp:232
virtual void DevicePolicyChanged(uint32_t id, Rule::Target target_old, Rule::Target target_new, const std::string &device_rule, uint32_t rule_id) override
Defines algorithm to perform in the case that USB device authorization target has been changed.
Definition: IPCClient.hpp:197
const std::vector< Rule > listRules()
List the current rule set (policy) used by the USBGuard daemon.
Definition: IPCClient.hpp:126
virtual void IPCConnected()
Defines algorithm to perform in the case of IPC connection.
Definition: IPCClient.hpp:156
virtual void DevicePresenceChanged(uint32_t id, DeviceManager::EventType event, Rule::Target target, const std::string &device_rule) override
Defines algorithm to perform in the case that USB device presence has been changed.
Definition: IPCClient.hpp:179
virtual void IPCDisconnected(bool exception_initiated, const IPCException &exception)
Defines algorithm to perform in the case of IPC disconnection.
Definition: IPCClient.hpp:166
EventType
Type of event that took place on the device.
Definition: DeviceManager.hpp:51
Definition: Exception.hpp:140
Allows to receive signals and to communicate with the USBGuard daemon.
Definition: Interface.hpp:40