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

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

Issue 982883004: Move GetUdevDevicePropertyValue from components/storage_monitor to device/udev_linux and rename to … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert incorrect change in chromeos Created 5 years, 9 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
« no previous file with comments | « components/storage_monitor/udev_util_linux.cc ('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
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_UDEV_H_ 5 #ifndef DEVICE_UDEV_LINUX_UDEV_H_
6 #define DEVICE_UDEV_LINUX_UDEV_H_ 6 #define DEVICE_UDEV_LINUX_UDEV_H_
7 7
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
11 11
12 #include <string>
13
12 #if !defined(USE_UDEV) 14 #if !defined(USE_UDEV)
13 #error "USE_UDEV not defined" 15 #error "USE_UDEV not defined"
14 #endif 16 #endif
15 17
16 // Adapted from libudev.h. 18 // Adapted from libudev.h.
17 #define udev_list_entry_foreach(list_entry, first_entry) \ 19 #define udev_list_entry_foreach(list_entry, first_entry) \
18 for (list_entry = first_entry; list_entry != NULL; \ 20 for (list_entry = first_entry; list_entry != NULL; \
19 list_entry = ::device::udev_list_entry_get_next(list_entry)) 21 list_entry = ::device::udev_list_entry_get_next(list_entry))
20 22
21 // Forward declarations of opaque structs. 23 // Forward declarations of opaque structs.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 udev_device* udev_monitor_receive_device(udev_monitor* udev_monitor); 67 udev_device* udev_monitor_receive_device(udev_monitor* udev_monitor);
66 void udev_monitor_unref(udev_monitor* udev_monitor); 68 void udev_monitor_unref(udev_monitor* udev_monitor);
67 udev* udev_new(); 69 udev* udev_new();
68 void udev_set_log_fn( 70 void udev_set_log_fn(
69 struct udev* udev, 71 struct udev* udev,
70 void (*log_fn)(struct udev* udev, int priority, const char* file, int line, 72 void (*log_fn)(struct udev* udev, int priority, const char* file, int line,
71 const char* fn, const char* format, va_list args)); 73 const char* fn, const char* format, va_list args));
72 void udev_set_log_priority(struct udev* udev, int priority); 74 void udev_set_log_priority(struct udev* udev, int priority);
73 void udev_unref(udev* udev); 75 void udev_unref(udev* udev);
74 76
77 // Calls udev_device_get_property_value() and replaces missing values with
78 // the empty string.
79 std::string UdevDeviceGetPropertyValue(udev_device* udev_device,
80 const char* key);
81
75 } // namespace device 82 } // namespace device
76 83
77 #endif // DEVICE_UDEV_LINUX_UDEV_H_ 84 #endif // DEVICE_UDEV_LINUX_UDEV_H_
OLDNEW
« no previous file with comments | « components/storage_monitor/udev_util_linux.cc ('k') | device/udev_linux/udev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698