nsyshid: Add backends for cross platform USB passthrough support (#950)

This commit is contained in:
Simon 2023-09-19 01:27:40 +02:00 committed by GitHub
parent 2a735f1fb7
commit 98b5a8758a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 2298 additions and 524 deletions

View file

@ -0,0 +1,32 @@
#ifndef CEMU_NSYSHID_WHITELIST_H
#define CEMU_NSYSHID_WHITELIST_H
namespace nsyshid
{
class Whitelist {
public:
static Whitelist& GetInstance();
Whitelist(const Whitelist&) = delete;
Whitelist& operator=(const Whitelist&) = delete;
bool IsDeviceWhitelisted(uint16 vendorId, uint16 productId);
void AddDevice(uint16 vendorId, uint16 productId);
void RemoveDevice(uint16 vendorId, uint16 productId);
std::list<std::tuple<uint16, uint16>> GetDevices();
void RemoveAllDevices();
private:
Whitelist();
// vendorId, productId
std::list<std::tuple<uint16, uint16>> m_devices;
};
} // namespace nsyshid
#endif // CEMU_NSYSHID_WHITELIST_H