46 lines
784 B
C++
46 lines
784 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <utility>
|
|
#include <vector>
|
|
#include "Device.h"
|
|
|
|
class PCIEDevice: public Device {
|
|
|
|
public:
|
|
|
|
class DeviceEntry{
|
|
|
|
public:
|
|
DeviceEntry(std::string path, uint16_t vendor, uint16_t _class) : m_path(std::move(path)), m_class(_class), m_vendor(vendor){
|
|
|
|
}
|
|
static std::vector<DeviceEntry> find();
|
|
|
|
const std::string& getPath() const{
|
|
return m_path;
|
|
}
|
|
|
|
uint16_t getVendor() const{
|
|
return m_vendor;
|
|
}
|
|
|
|
uint16_t getClass() const{
|
|
return m_class;
|
|
}
|
|
private:
|
|
std::string m_path;
|
|
uint16_t m_vendor;
|
|
uint16_t m_class;
|
|
};
|
|
|
|
PCIEDevice(const std::string& path){
|
|
|
|
}
|
|
|
|
private:
|
|
std::string m_path;
|
|
};
|
|
|
|
|