mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-08 16:01:19 +12:00
nsyshid: Add backends for cross platform USB passthrough support (#950)
This commit is contained in:
parent
2a735f1fb7
commit
98b5a8758a
17 changed files with 2298 additions and 524 deletions
32
src/Cafe/OS/libs/nsyshid/Whitelist.h
Normal file
32
src/Cafe/OS/libs/nsyshid/Whitelist.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue