ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / device / udev_linux / udev.cc
blobae23bef9a36a90220ab9ba6f06064fc71811416b
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 #include "device/udev_linux/udev.h"
7 #include "device/udev_linux/udev_loader.h"
9 namespace device {
11 const char* udev_device_get_action(udev_device* udev_device) {
12 return UdevLoader::Get()->udev_device_get_action(udev_device);
15 const char* udev_device_get_devnode(udev_device* udev_device) {
16 return UdevLoader::Get()->udev_device_get_devnode(udev_device);
19 udev_device* udev_device_get_parent(udev_device* udev_device) {
20 return UdevLoader::Get()->udev_device_get_parent(udev_device);
23 udev_device* udev_device_get_parent_with_subsystem_devtype(
24 udev_device* udev_device,
25 const char* subsystem,
26 const char* devtype) {
27 return UdevLoader::Get()->udev_device_get_parent_with_subsystem_devtype(
28 udev_device, subsystem, devtype);
31 const char* udev_device_get_property_value(udev_device* udev_device,
32 const char* key) {
33 return UdevLoader::Get()->udev_device_get_property_value(udev_device, key);
36 const char* udev_device_get_subsystem(udev_device* udev_device) {
37 return UdevLoader::Get()->udev_device_get_subsystem(udev_device);
40 const char* udev_device_get_sysattr_value(udev_device* udev_device,
41 const char* sysattr) {
42 return UdevLoader::Get()->udev_device_get_sysattr_value(udev_device, sysattr);
45 const char* udev_device_get_sysname(udev_device* udev_device) {
46 return UdevLoader::Get()->udev_device_get_sysname(udev_device);
49 const char* udev_device_get_syspath(udev_device* udev_device) {
50 return UdevLoader::Get()->udev_device_get_syspath(udev_device);
53 udev_device* udev_device_new_from_devnum(udev* udev, char type, dev_t devnum) {
54 return UdevLoader::Get()->udev_device_new_from_devnum(udev, type, devnum);
57 udev_device* udev_device_new_from_subsystem_sysname(
58 udev* udev,
59 const char* subsystem,
60 const char* sysname) {
61 return UdevLoader::Get()->udev_device_new_from_subsystem_sysname(
62 udev, subsystem, sysname);
65 udev_device* udev_device_new_from_syspath(udev* udev, const char* syspath) {
66 return UdevLoader::Get()->udev_device_new_from_syspath(udev, syspath);
69 void udev_device_unref(udev_device* udev_device) {
70 UdevLoader::Get()->udev_device_unref(udev_device);
73 int udev_enumerate_add_match_subsystem(udev_enumerate* udev_enumerate,
74 const char* subsystem) {
75 return UdevLoader::Get()->udev_enumerate_add_match_subsystem(udev_enumerate,
76 subsystem);
79 udev_list_entry* udev_enumerate_get_list_entry(udev_enumerate* udev_enumerate) {
80 return UdevLoader::Get()->udev_enumerate_get_list_entry(udev_enumerate);
83 udev_enumerate* udev_enumerate_new(udev* udev) {
84 return UdevLoader::Get()->udev_enumerate_new(udev);
87 int udev_enumerate_scan_devices(udev_enumerate* udev_enumerate) {
88 return UdevLoader::Get()->udev_enumerate_scan_devices(udev_enumerate);
91 void udev_enumerate_unref(udev_enumerate* udev_enumerate) {
92 UdevLoader::Get()->udev_enumerate_unref(udev_enumerate);
95 udev_list_entry* udev_list_entry_get_next(udev_list_entry* list_entry) {
96 return UdevLoader::Get()->udev_list_entry_get_next(list_entry);
99 const char* udev_list_entry_get_name(udev_list_entry* list_entry) {
100 return UdevLoader::Get()->udev_list_entry_get_name(list_entry);
103 int udev_monitor_enable_receiving(udev_monitor* udev_monitor) {
104 return UdevLoader::Get()->udev_monitor_enable_receiving(udev_monitor);
107 int udev_monitor_filter_add_match_subsystem_devtype(udev_monitor* udev_monitor,
108 const char* subsystem,
109 const char* devtype) {
110 return UdevLoader::Get()->udev_monitor_filter_add_match_subsystem_devtype(
111 udev_monitor, subsystem, devtype);
114 int udev_monitor_get_fd(udev_monitor* udev_monitor) {
115 return UdevLoader::Get()->udev_monitor_get_fd(udev_monitor);
118 udev_monitor* udev_monitor_new_from_netlink(udev* udev, const char* name) {
119 return UdevLoader::Get()->udev_monitor_new_from_netlink(udev, name);
122 udev_device* udev_monitor_receive_device(udev_monitor* udev_monitor) {
123 return UdevLoader::Get()->udev_monitor_receive_device(udev_monitor);
126 void udev_monitor_unref(udev_monitor* udev_monitor) {
127 UdevLoader::Get()->udev_monitor_unref(udev_monitor);
130 udev* udev_new() {
131 return UdevLoader::Get()->udev_new();
134 void udev_set_log_fn(
135 struct udev* udev,
136 void (*log_fn)(struct udev* udev, int priority, const char* file, int line,
137 const char* fn, const char* format, va_list args)) {
138 return UdevLoader::Get()->udev_set_log_fn(udev, log_fn);
141 void udev_set_log_priority(struct udev* udev, int priority) {
142 return UdevLoader::Get()->udev_set_log_priority(udev, priority);
145 void udev_unref(udev* udev) {
146 UdevLoader::Get()->udev_unref(udev);
149 } // namespace device