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 UI_EVENTS_OZONE_EVDEV_DEVICE_MANAGER_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_DEVICE_MANAGER_EVDEV_H_
8 #include "base/callback.h"
9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h"
11 #include "base/memory/scoped_ptr.h"
15 typedef base::Callback<void(const base::FilePath& file_path)>
18 // Interface for scanning & monitoring input devices.
19 class DeviceManagerEvdev {
21 virtual ~DeviceManagerEvdev();
23 // Enumerate devices & start watching for changes.
24 // Must be balanced by a call to Stop().
25 virtual void ScanAndStartMonitoring(
26 const EvdevDeviceCallback& device_added,
27 const EvdevDeviceCallback& device_removed) = 0;
29 // Stop watching for device changes.
30 virtual void Stop() = 0;
33 // Create simple DeviceManagerEvdev that scans /dev/input manually.
34 scoped_ptr<DeviceManagerEvdev> CreateDeviceManagerManual();
38 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_MANAGER_EVDEV_H_