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

Side by Side Diff: device/udev_linux/udev0_loader.cc

Issue 674703002: Linux: Dynamically load libudev. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scoped_udev
Patch Set: rebase to head, which includes third_party/libudev already Created 6 years, 1 month 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 | « device/udev_linux/udev0_loader.h ('k') | device/udev_linux/udev1_loader.h » ('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 #include "device/udev_linux/udev0_loader.h"
6
7 #include "library_loaders/libudev0.h"
8
9 namespace device {
10
11 Udev0Loader::Udev0Loader() {
12 }
13
14 Udev0Loader::~Udev0Loader() {
15 }
16
17 bool Udev0Loader::Init() {
18 if (lib_loader_)
19 return lib_loader_->loaded();
20 lib_loader_.reset(new LibUdev0Loader);
21 return lib_loader_->Load("libudev.so.0");
22 }
23
24 const char* Udev0Loader::udev_device_get_action(udev_device* udev_device) {
25 return lib_loader_->udev_device_get_action(udev_device);
26 }
27
28 const char* Udev0Loader::udev_device_get_devnode(udev_device* udev_device) {
29 return lib_loader_->udev_device_get_devnode(udev_device);
30 }
31
32 udev_device* Udev0Loader::udev_device_get_parent(udev_device* udev_device) {
33 return lib_loader_->udev_device_get_parent(udev_device);
34 }
35
36 udev_device* Udev0Loader::udev_device_get_parent_with_subsystem_devtype(
37 udev_device* udev_device,
38 const char* subsystem,
39 const char* devtype) {
40 return lib_loader_->udev_device_get_parent_with_subsystem_devtype(
41 udev_device, subsystem, devtype);
42 }
43
44 const char* Udev0Loader::udev_device_get_property_value(
45 udev_device* udev_device,
46 const char* key) {
47 return lib_loader_->udev_device_get_property_value(udev_device, key);
48 }
49
50 const char* Udev0Loader::udev_device_get_subsystem(udev_device* udev_device) {
51 return lib_loader_->udev_device_get_subsystem(udev_device);
52 }
53
54 const char* Udev0Loader::udev_device_get_sysattr_value(udev_device* udev_device,
55 const char* sysattr) {
56 return lib_loader_->udev_device_get_sysattr_value(udev_device, sysattr);
57 }
58
59 const char* Udev0Loader::udev_device_get_sysname(udev_device* udev_device) {
60 return lib_loader_->udev_device_get_sysname(udev_device);
61 }
62
63 const char* Udev0Loader::udev_device_get_syspath(udev_device* udev_device) {
64 return lib_loader_->udev_device_get_syspath(udev_device);
65 }
66
67 udev_device* Udev0Loader::udev_device_new_from_devnum(udev* udev,
68 char type,
69 dev_t devnum) {
70 return lib_loader_->udev_device_new_from_devnum(udev, type, devnum);
71 }
72
73 udev_device* Udev0Loader::udev_device_new_from_syspath(udev* udev,
74 const char* syspath) {
75 return lib_loader_->udev_device_new_from_syspath(udev, syspath);
76 }
77
78 void Udev0Loader::udev_device_unref(udev_device* udev_device) {
79 lib_loader_->udev_device_unref(udev_device);
80 }
81
82 int Udev0Loader::udev_enumerate_add_match_subsystem(
83 udev_enumerate* udev_enumerate,
84 const char* subsystem) {
85 return lib_loader_->udev_enumerate_add_match_subsystem(udev_enumerate,
86 subsystem);
87 }
88
89 udev_list_entry* Udev0Loader::udev_enumerate_get_list_entry(
90 udev_enumerate* udev_enumerate) {
91 return lib_loader_->udev_enumerate_get_list_entry(udev_enumerate);
92 }
93
94 udev_enumerate* Udev0Loader::udev_enumerate_new(udev* udev) {
95 return lib_loader_->udev_enumerate_new(udev);
96 }
97
98 int Udev0Loader::udev_enumerate_scan_devices(udev_enumerate* udev_enumerate) {
99 return lib_loader_->udev_enumerate_scan_devices(udev_enumerate);
100 }
101
102 void Udev0Loader::udev_enumerate_unref(udev_enumerate* udev_enumerate) {
103 lib_loader_->udev_enumerate_unref(udev_enumerate);
104 }
105
106 udev_list_entry* Udev0Loader::udev_list_entry_get_next(
107 udev_list_entry* list_entry) {
108 return lib_loader_->udev_list_entry_get_next(list_entry);
109 }
110
111 const char* Udev0Loader::udev_list_entry_get_name(udev_list_entry* list_entry) {
112 return lib_loader_->udev_list_entry_get_name(list_entry);
113 }
114
115 int Udev0Loader::udev_monitor_enable_receiving(udev_monitor* udev_monitor) {
116 return lib_loader_->udev_monitor_enable_receiving(udev_monitor);
117 }
118
119 int Udev0Loader::udev_monitor_filter_add_match_subsystem_devtype(
120 udev_monitor* udev_monitor,
121 const char* subsystem,
122 const char* devtype) {
123 return lib_loader_->udev_monitor_filter_add_match_subsystem_devtype(
124 udev_monitor, subsystem, devtype);
125 }
126
127 int Udev0Loader::udev_monitor_get_fd(udev_monitor* udev_monitor) {
128 return lib_loader_->udev_monitor_get_fd(udev_monitor);
129 }
130
131 udev_monitor* Udev0Loader::udev_monitor_new_from_netlink(udev* udev,
132 const char* name) {
133 return lib_loader_->udev_monitor_new_from_netlink(udev, name);
134 }
135
136 udev_device* Udev0Loader::udev_monitor_receive_device(
137 udev_monitor* udev_monitor) {
138 return lib_loader_->udev_monitor_receive_device(udev_monitor);
139 }
140
141 void Udev0Loader::udev_monitor_unref(udev_monitor* udev_monitor) {
142 lib_loader_->udev_monitor_unref(udev_monitor);
143 }
144
145 udev* Udev0Loader::udev_new() {
146 return lib_loader_->udev_new();
147 }
148
149 void Udev0Loader::udev_set_log_fn(
150 struct udev* udev,
151 void (*log_fn)(struct udev* udev, int priority,
152 const char* file, int line,
153 const char* fn, const char* format, va_list args)) {
154 return lib_loader_->udev_set_log_fn(udev, log_fn);
155 }
156
157 void Udev0Loader::udev_set_log_priority(struct udev* udev, int priority) {
158 return lib_loader_->udev_set_log_priority(udev, priority);
159 }
160
161 void Udev0Loader::udev_unref(udev* udev) {
162 lib_loader_->udev_unref(udev);
163 }
164
165 } // namespace device
OLDNEW
« no previous file with comments | « device/udev_linux/udev0_loader.h ('k') | device/udev_linux/udev1_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698