You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1014 B

/* License: Apache 2.0. See LICENSE file in root directory. */
/* Copyright(c) 2019 Intel Corporation. All Rights Reserved. */
#pragma once
#include "../platform/device-watcher.h"
#include "../platform/backend-device-group.h"
#include "../platform/uvc-device-info.h"
#include <memory>
#include <mutex>
#include <vector>
namespace librealsense
{
namespace platform
{
class device_watcher_usbhost : public device_watcher
{
public:
virtual void start(device_changed_callback callback) override;
virtual void stop() override;
virtual bool is_stopped() const override;
void notify();
static std::shared_ptr<device_watcher_usbhost> instance();
private:
std::mutex _mutex;
device_changed_callback _callback = nullptr;
backend_device_group _prev_group;
std::vector<platform::uvc_device_info> update_uvc_devices();
bool _is_stopped = true;
};
}
}