Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / device / udev_linux / udev.h
blobcffb6723cc40eeec0f0ec424f5e9adaed0c87efb
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef DEVICE_UDEV_LINUX_UDEV_H_
6 #define DEVICE_UDEV_LINUX_UDEV_H_
8 #include <libudev.h>
10 #include "base/memory/scoped_ptr.h"
12 #if !defined(USE_UDEV)
13 #error "USE_UDEV not defined"
14 #endif
16 namespace device {
18 struct UdevDeleter {
19 void operator()(udev* dev) const;
21 struct UdevEnumerateDeleter {
22 void operator()(udev_enumerate* enumerate) const;
24 struct UdevDeviceDeleter {
25 void operator()(udev_device* device) const;
27 struct UdevMonitorDeleter {
28 void operator()(udev_monitor* monitor) const;
31 typedef scoped_ptr<udev, UdevDeleter> ScopedUdevPtr;
32 typedef scoped_ptr<udev_enumerate, UdevEnumerateDeleter> ScopedUdevEnumeratePtr;
33 typedef scoped_ptr<udev_device, UdevDeviceDeleter> ScopedUdevDevicePtr;
34 typedef scoped_ptr<udev_monitor, UdevMonitorDeleter> ScopedUdevMonitorPtr;
36 } // namespace device
38 #endif // DEVICE_UDEV_LINUX_UDEV_H_