Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(714)

Side by Side Diff: device/udev_linux/udev.h

Issue 302093009: Linux: Unify udev scopers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « device/hid/udev_common.h ('k') | device/udev_linux/udev.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef DEVICE_UDEV_LINUX_UDEV_H_
6 #define DEVICE_UDEV_LINUX_UDEV_H_
7
8 #include <libudev.h>
9
10 #include "base/memory/scoped_ptr.h"
11
12 #if !defined(USE_UDEV)
13 #error "USE_UDEV not defined"
14 #endif
15
16 namespace device {
17
18 struct UdevDeleter {
19 void operator()(udev* dev) const;
20 };
21 struct UdevEnumerateDeleter {
22 void operator()(udev_enumerate* enumerate) const;
23 };
24 struct UdevDeviceDeleter {
25 void operator()(udev_device* device) const;
26 };
27 struct UdevMonitorDeleter {
28 void operator()(udev_monitor* monitor) const;
29 };
30
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;
35
36 } // namespace device
37
38 #endif // DEVICE_UDEV_LINUX_UDEV_H_
OLDNEW
« no previous file with comments | « device/hid/udev_common.h ('k') | device/udev_linux/udev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698