Don't clobber the download metadata file when downloading a file for which we don...
[chromium-blink-merge.git] / device / udev_linux / udev1_loader.h
blobc76567107fb4a148bac1eb23c9978e200441ce38
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 #ifndef DEVICE_UDEV_LINUX_UDEV1_LOADER_H_
6 #define DEVICE_UDEV_LINUX_UDEV1_LOADER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "device/udev_linux/udev_loader.h"
11 class LibUdev1Loader;
13 namespace device {
15 class Udev1Loader : public UdevLoader {
16 public:
17 Udev1Loader();
18 ~Udev1Loader() override;
20 private:
21 bool Init() override;
22 const char* udev_device_get_action(udev_device* udev_device) override;
23 const char* udev_device_get_devnode(udev_device* udev_device) override;
24 udev_device* udev_device_get_parent(udev_device* udev_device) override;
25 udev_device* udev_device_get_parent_with_subsystem_devtype(
26 udev_device* udev_device,
27 const char* subsystem,
28 const char* devtype) override;
29 const char* udev_device_get_property_value(udev_device* udev_device,
30 const char* key) override;
31 const char* udev_device_get_subsystem(udev_device* udev_device) override;
32 const char* udev_device_get_sysattr_value(udev_device* udev_device,
33 const char* sysattr) override;
34 const char* udev_device_get_sysname(udev_device* udev_device) override;
35 const char* udev_device_get_syspath(udev_device* udev_device) override;
36 udev_device* udev_device_new_from_devnum(udev* udev,
37 char type,
38 dev_t devnum) override;
39 udev_device* udev_device_new_from_subsystem_sysname(
40 udev* udev,
41 const char* subsystem,
42 const char* sysname) override;
43 udev_device* udev_device_new_from_syspath(udev* udev,
44 const char* syspath) override;
45 void udev_device_unref(udev_device* udev_device) override;
46 int udev_enumerate_add_match_subsystem(udev_enumerate* udev_enumerate,
47 const char* subsystem) override;
48 udev_list_entry* udev_enumerate_get_list_entry(
49 udev_enumerate* udev_enumerate) override;
50 udev_enumerate* udev_enumerate_new(udev* udev) override;
51 int udev_enumerate_scan_devices(udev_enumerate* udev_enumerate) override;
52 void udev_enumerate_unref(udev_enumerate* udev_enumerate) override;
53 udev_list_entry* udev_list_entry_get_next(
54 udev_list_entry* list_entry) override;
55 const char* udev_list_entry_get_name(udev_list_entry* list_entry) override;
56 int udev_monitor_enable_receiving(udev_monitor* udev_monitor) override;
57 int udev_monitor_filter_add_match_subsystem_devtype(
58 udev_monitor* udev_monitor,
59 const char* subsystem,
60 const char* devtype) override;
61 int udev_monitor_get_fd(udev_monitor* udev_monitor) override;
62 udev_monitor* udev_monitor_new_from_netlink(udev* udev,
63 const char* name) override;
64 udev_device* udev_monitor_receive_device(udev_monitor* udev_monitor) override;
65 void udev_monitor_unref(udev_monitor* udev_monitor) override;
66 udev* udev_new() override;
67 void udev_set_log_fn(
68 struct udev* udev,
69 void (*log_fn)(struct udev* udev, int priority,
70 const char* file, int line,
71 const char* fn, const char* format,
72 va_list args)) override;
73 void udev_set_log_priority(struct udev* udev, int priority) override;
74 void udev_unref(udev* udev) override;
76 scoped_ptr<LibUdev1Loader> lib_loader_;
78 DISALLOW_COPY_AND_ASSIGN(Udev1Loader);
81 } // namespace device
83 #endif // DEVICE_UDEV_LINUX_UDEV1_LOADER_H_