blob: d5fd439e408fd1f88c99cfcb6702ca78c7e601d7 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SRC_UI_LIB_INPUT_READER_FDIO_DEVICE_WATCHER_H_
#define SRC_UI_LIB_INPUT_READER_FDIO_DEVICE_WATCHER_H_
#include <string>
#include "src/ui/lib/input_reader/device_watcher.h"
namespace fsl {
class DeviceWatcher;
}
namespace ui_input {
// This is the "real" FDIO implementation of |DeviceWatcher|, which uses
// |fsl::DeviceWatcher|.
class FdioDeviceWatcher : public DeviceWatcher {
public:
FdioDeviceWatcher(std::string directory_path);
~FdioDeviceWatcher() override;
void Watch(ExistsCallback callback) override;
private:
// consumed by |Watch|
std::string directory_path_;
std::unique_ptr<fsl::DeviceWatcher> watch_;
};
} // namespace ui_input
#endif // SRC_UI_LIB_INPUT_READER_FDIO_DEVICE_WATCHER_H_