OLD | NEW |
(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/udev.h" |
| 6 |
| 7 #include "device/udev_linux/udev_loader.h" |
| 8 |
| 9 namespace device { |
| 10 |
| 11 const char* udev_device_get_action(udev_device* udev_device) { |
| 12 return UdevLoader::Get()->udev_device_get_action(udev_device); |
| 13 } |
| 14 |
| 15 const char* udev_device_get_devnode(udev_device* udev_device) { |
| 16 return UdevLoader::Get()->udev_device_get_devnode(udev_device); |
| 17 } |
| 18 |
| 19 udev_device* udev_device_get_parent(udev_device* udev_device) { |
| 20 return UdevLoader::Get()->udev_device_get_parent(udev_device); |
| 21 } |
| 22 |
| 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); |
| 29 } |
| 30 |
| 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); |
| 34 } |
| 35 |
| 36 const char* udev_device_get_subsystem(udev_device* udev_device) { |
| 37 return UdevLoader::Get()->udev_device_get_subsystem(udev_device); |
| 38 } |
| 39 |
| 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); |
| 43 } |
| 44 |
| 45 const char* udev_device_get_sysname(udev_device* udev_device) { |
| 46 return UdevLoader::Get()->udev_device_get_sysname(udev_device); |
| 47 } |
| 48 |
| 49 const char* udev_device_get_syspath(udev_device* udev_device) { |
| 50 return UdevLoader::Get()->udev_device_get_syspath(udev_device); |
| 51 } |
| 52 |
| 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); |
| 55 } |
| 56 |
| 57 udev_device* udev_device_new_from_syspath(udev* udev, const char* syspath) { |
| 58 return UdevLoader::Get()->udev_device_new_from_syspath(udev, syspath); |
| 59 } |
| 60 |
| 61 void udev_device_unref(udev_device* udev_device) { |
| 62 UdevLoader::Get()->udev_device_unref(udev_device); |
| 63 } |
| 64 |
| 65 int udev_enumerate_add_match_subsystem(udev_enumerate* udev_enumerate, |
| 66 const char* subsystem) { |
| 67 return UdevLoader::Get()->udev_enumerate_add_match_subsystem(udev_enumerate, |
| 68 subsystem); |
| 69 } |
| 70 |
| 71 udev_list_entry* udev_enumerate_get_list_entry(udev_enumerate* udev_enumerate) { |
| 72 return UdevLoader::Get()->udev_enumerate_get_list_entry(udev_enumerate); |
| 73 } |
| 74 |
| 75 udev_enumerate* udev_enumerate_new(udev* udev) { |
| 76 return UdevLoader::Get()->udev_enumerate_new(udev); |
| 77 } |
| 78 |
| 79 int udev_enumerate_scan_devices(udev_enumerate* udev_enumerate) { |
| 80 return UdevLoader::Get()->udev_enumerate_scan_devices(udev_enumerate); |
| 81 } |
| 82 |
| 83 void udev_enumerate_unref(udev_enumerate* udev_enumerate) { |
| 84 UdevLoader::Get()->udev_enumerate_unref(udev_enumerate); |
| 85 } |
| 86 |
| 87 udev_list_entry* udev_list_entry_get_next(udev_list_entry* list_entry) { |
| 88 return UdevLoader::Get()->udev_list_entry_get_next(list_entry); |
| 89 } |
| 90 |
| 91 const char* udev_list_entry_get_name(udev_list_entry* list_entry) { |
| 92 return UdevLoader::Get()->udev_list_entry_get_name(list_entry); |
| 93 } |
| 94 |
| 95 int udev_monitor_enable_receiving(udev_monitor* udev_monitor) { |
| 96 return UdevLoader::Get()->udev_monitor_enable_receiving(udev_monitor); |
| 97 } |
| 98 |
| 99 int udev_monitor_filter_add_match_subsystem_devtype(udev_monitor* udev_monitor, |
| 100 const char* subsystem, |
| 101 const char* devtype) { |
| 102 return UdevLoader::Get()->udev_monitor_filter_add_match_subsystem_devtype( |
| 103 udev_monitor, subsystem, devtype); |
| 104 } |
| 105 |
| 106 int udev_monitor_get_fd(udev_monitor* udev_monitor) { |
| 107 return UdevLoader::Get()->udev_monitor_get_fd(udev_monitor); |
| 108 } |
| 109 |
| 110 udev_monitor* udev_monitor_new_from_netlink(udev* udev, const char* name) { |
| 111 return UdevLoader::Get()->udev_monitor_new_from_netlink(udev, name); |
| 112 } |
| 113 |
| 114 udev_device* udev_monitor_receive_device(udev_monitor* udev_monitor) { |
| 115 return UdevLoader::Get()->udev_monitor_receive_device(udev_monitor); |
| 116 } |
| 117 |
| 118 void udev_monitor_unref(udev_monitor* udev_monitor) { |
| 119 UdevLoader::Get()->udev_monitor_unref(udev_monitor); |
| 120 } |
| 121 |
| 122 udev* udev_new() { |
| 123 return UdevLoader::Get()->udev_new(); |
| 124 } |
| 125 |
| 126 void udev_set_log_fn( |
| 127 struct udev* udev, |
| 128 void (*log_fn)(struct udev* udev, int priority, const char* file, int line, |
| 129 const char* fn, const char* format, va_list args)) { |
| 130 return UdevLoader::Get()->udev_set_log_fn(udev, log_fn); |
| 131 } |
| 132 |
| 133 void udev_set_log_priority(struct udev* udev, int priority) { |
| 134 return UdevLoader::Get()->udev_set_log_priority(udev, priority); |
| 135 } |
| 136 |
| 137 void udev_unref(udev* udev) { |
| 138 UdevLoader::Get()->udev_unref(udev); |
| 139 } |
| 140 |
| 141 } // namespace device |
OLD | NEW |