#ifndef UI_EVENTS_OZONE_EVDEV_SCOPED_UDEV_H_
#define UI_EVENTS_OZONE_EVDEV_SCOPED_UDEV_H_
#include <libudev.h>
#include "base/memory/scoped_ptr.h"
namespace ui {
struct UdevDeleter {
void operator()(struct udev* udev) { udev_unref(udev); }
};
typedef scoped_ptr<struct udev, UdevDeleter> scoped_udev;
struct UdevDeviceDeleter {
void operator()(struct udev_device* udev_device) {
udev_device_unref(udev_device);
}
};
typedef scoped_ptr<struct udev_device, UdevDeviceDeleter> scoped_udev_device;
struct UdevEnumerateDeleter {
void operator()(struct udev_enumerate* udev_enumerate) {
udev_enumerate_unref(udev_enumerate);
}
};
typedef scoped_ptr<struct udev_enumerate, UdevEnumerateDeleter>
scoped_udev_enumerate;
struct UdevMonitorDeleter {
void operator()(struct udev_monitor* udev_monitor) {
udev_monitor_unref(udev_monitor);
}
};
typedef scoped_ptr<struct udev_monitor, UdevMonitorDeleter> scoped_udev_monitor;
}
#endif