代码拉取完成,页面将自动刷新
/*---------------------------------------------------------*\
| DeviceDetector.h |
| |
| Device detector functionality |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include <functional>
#include <string>
#include <vector>
#include "ResourceManager.h"
class DeviceDetector
{
public:
DeviceDetector(std::string name, DeviceDetectorFunction detector)
{
ResourceManager::get()->RegisterDeviceDetector(name, detector);
}
};
class I2CDeviceDetector
{
public:
I2CDeviceDetector(std::string name, I2CDeviceDetectorFunction detector)
{
ResourceManager::get()->RegisterI2CDeviceDetector(name, detector);
}
};
class I2CPCIDeviceDetector
{
public:
I2CPCIDeviceDetector(std::string name, I2CPCIDeviceDetectorFunction detector, uint16_t ven_id, uint16_t dev_id, uint16_t subven_id, uint16_t subdev_id, uint8_t i2c_addr)
{
ResourceManager::get()->RegisterI2CPCIDeviceDetector(name, detector, ven_id, dev_id, subven_id, subdev_id, i2c_addr);
}
};
class I2CBusDetector
{
public:
I2CBusDetector(I2CBusDetectorFunction detector)
{
ResourceManager::get()->RegisterI2CBusDetector(detector);
}
};
class HIDDeviceDetector
{
public:
HIDDeviceDetector(std::string name, HIDDeviceDetectorFunction detector, uint16_t vid, uint16_t pid, int interface, int usage_page, int usage)
{
ResourceManager::get()->RegisterHIDDeviceDetector(name, detector, vid, pid, interface, usage_page, usage);
}
};
class HIDWrappedDeviceDetector
{
public:
HIDWrappedDeviceDetector(std::string name, HIDWrappedDeviceDetectorFunction detector, uint16_t vid, uint16_t pid, int interface, int usage_page, int usage)
{
ResourceManager::get()->RegisterHIDWrappedDeviceDetector(name, detector, vid, pid, interface, usage_page, usage);
}
};
class DynamicDetector
{
public:
DynamicDetector(std::string name, DynamicDetectorFunction detector)
{
ResourceManager::get()->RegisterDynamicDetector(name, detector);
}
};
class PreDetectionHook
{
public:
PreDetectionHook(PreDetectionHookFunction hook)
{
ResourceManager::get()->RegisterPreDetectionHook(hook);
}
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。