blob: cb5a4a84eb60e8c3edf169a1e85e51d9f456068e [file] [log] [blame]
// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef PERMISSION_BROKER_UDEV_RULE_H_
#define PERMISSION_BROKER_UDEV_RULE_H_
#include <string>
#include "permission_broker/rule.h"
struct udev;
struct udev_device;
struct udev_enumerate;
namespace permission_broker {
class UdevRule : public Rule {
public:
explicit UdevRule(const std::string& name);
~UdevRule() override;
virtual Result ProcessDevice(struct udev_device *device) = 0;
Result Process(const std::string& path, int interface_id) override;
private:
struct udev *const udev_;
struct udev_enumerate *const enumerate_;
DISALLOW_COPY_AND_ASSIGN(UdevRule);
};
} // namespace permission_broker
#endif // PERMISSION_BROKER_UDEV_RULE_H_