OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef DEVICE_UDEV_LINUX_SCOPED_UDEV_H_ | 5 #ifndef DEVICE_UDEV_LINUX_SCOPED_UDEV_H_ |
6 #define DEVICE_UDEV_LINUX_SCOPED_UDEV_H_ | 6 #define DEVICE_UDEV_LINUX_SCOPED_UDEV_H_ |
7 | 7 |
8 #include <libudev.h> | |
9 | |
10 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "device/udev_linux/udev.h" |
11 | 10 |
12 #if !defined(USE_UDEV) | 11 #if !defined(USE_UDEV) |
13 #error "USE_UDEV not defined" | 12 #error "USE_UDEV not defined" |
14 #endif | 13 #endif |
15 | 14 |
16 namespace device { | 15 namespace device { |
17 | 16 |
18 struct UdevDeleter { | 17 struct UdevDeleter { |
19 void operator()(udev* dev) const { | 18 void operator()(udev* dev) const { |
20 udev_unref(dev); | 19 udev_unref(dev); |
(...skipping 16 matching lines...) Expand all Loading... |
37 }; | 36 }; |
38 | 37 |
39 typedef scoped_ptr<udev, UdevDeleter> ScopedUdevPtr; | 38 typedef scoped_ptr<udev, UdevDeleter> ScopedUdevPtr; |
40 typedef scoped_ptr<udev_enumerate, UdevEnumerateDeleter> ScopedUdevEnumeratePtr; | 39 typedef scoped_ptr<udev_enumerate, UdevEnumerateDeleter> ScopedUdevEnumeratePtr; |
41 typedef scoped_ptr<udev_device, UdevDeviceDeleter> ScopedUdevDevicePtr; | 40 typedef scoped_ptr<udev_device, UdevDeviceDeleter> ScopedUdevDevicePtr; |
42 typedef scoped_ptr<udev_monitor, UdevMonitorDeleter> ScopedUdevMonitorPtr; | 41 typedef scoped_ptr<udev_monitor, UdevMonitorDeleter> ScopedUdevMonitorPtr; |
43 | 42 |
44 } // namespace device | 43 } // namespace device |
45 | 44 |
46 #endif // DEVICE_UDEV_LINUX_SCOPED_UDEV_H_ | 45 #endif // DEVICE_UDEV_LINUX_SCOPED_UDEV_H_ |
OLD | NEW |