dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::proxy::driver< device_t >::setup Class Reference

the device information set of one interface class: what enumerates the devices present and names their paths More...

#include <dx_proxy_driver.h>

Inheritance diagram for dx::proxy::driver< device_t >::setup:
Collaboration diagram for dx::proxy::driver< device_t >::setup:

Classes

class  devices
 the devices of a hardware id and the set's class - its own or its parent's, a composite device's function - the present ones unless all are asked for, what a range-for over setup(hwid) walks More...

Public Member Functions

bool install(const char* inf)
 installs a driver package: the inf goes into the driver store and every present device it matches is updated to it (::DiInstallDriver, newdev.lib) - a package competing for the same hardware ids is purged ahead of it by the caller, the rank would otherwise decide; answers whether the system asks for a reboot
devices operator ()(const char* hwid, bool present= true) const
setup& purge(const char* hwid)
 uninstalls every installed package (oem*.inf) with a model of the hardware id
bool reinstall(const char* hwid)
 installs the package that ranks best in the driver store on the devices of a hardware id where they stand (::DiInstallDevice, newdev.lib) - a node stays, a software device's included; answers whether the system asks for a reboot, throws at the first device failing
setup& remove(const char* hwid) noexcept
 takes the devices of a hardware id out, those not present included: a bus's device comes back at rescan(), on whatever package stands, a software device ends as its creator ends it (device_t::destroy()); a device failing is reported, the next one taken
setup& rescan() noexcept
 reenumerates the parents of the devices remove() took out, so they come back on whatever package stands - a device's bus alone, never the root: a root reenumeration waits on every bus and volume driver of the machine, and a pending one holds the PnP engine and with it every later install
 setup(const ::GUID& guid, const char* bus= nullptr)
 the driver interface class constructor
const std::string uid(int instance) const
 the device enumerator
 ~setup() noexcept
 the driver interface class destructor

Static Public Member Functions

::GUID guid(const char* inf)
 the class an inf installs its devices into
static std::deque<std::string> hwids(const char* file)
 the hardware ids an inf's models name: each [Manufacturer] entry's <models>[.<NT arch>] section, a line's second field

Detailed Description

template<typename device_t = device<>>
class dx::proxy::driver< device_t >::setup

the device information set of one interface class: what enumerates the devices present and names their paths

Constructor & Destructor Documentation

◆ setup()

template<typename device_t= device<>>
dx::proxy::driver<device_t>::setup::setup(const ::GUID& guid, const char* bus= nullptr)
inline

the driver interface class constructor

the underlaying windows API is ::SetupDiGetClassDevs(). for detailed information see http://msdn.microsoft.com/en-us/library/ms792959.aspx

Exceptions
exception_texception
Parameters
guidthe GUID identifying the driver interface or device class
busbus enumerator for device classe
Here is the call graph for this function:

◆ ~setup()

template<typename device_t= device<>>
dx::proxy::driver<device_t>::setup::~setup()
inlinenoexcept

the driver interface class destructor

the underlaying windows API is ::SetupDiDestroyDeviceInfoList(). for detailed information see http://msdn.microsoft.com/en-us/library/ms792991.aspx

Member Function Documentation

◆ guid()

template<typename device_t= device<>>
::GUID dx::proxy::driver<device_t>::setup::guid(const char* inf)
inlinestatic

the class an inf installs its devices into

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hwids()

template<typename device_t= device<>>
std::deque<std::string> dx::proxy::driver<device_t>::setup::hwids(const char* file)
inlinestatic

the hardware ids an inf's models name: each [Manufacturer] entry's <models>[.<NT arch>] section, a line's second field

Here is the call graph for this function:
Here is the caller graph for this function:

◆ install()

template<typename device_t= device<>>
bool dx::proxy::driver<device_t>::setup::install(const char* inf)
inline

installs a driver package: the inf goes into the driver store and every present device it matches is updated to it (::DiInstallDriver, newdev.lib) - a package competing for the same hardware ids is purged ahead of it by the caller, the rank would otherwise decide; answers whether the system asks for a reboot

◆ operator ()()

template<typename device_t= device<>>
devices dx::proxy::driver<device_t>::setup::operator ()(const char* hwid, bool present= true) const
inline

◆ purge()

template<typename device_t= device<>>
setup& dx::proxy::driver<device_t>::setup::purge(const char* hwid)
inline

uninstalls every installed package (oem*.inf) with a model of the hardware id

Here is the call graph for this function:

◆ reinstall()

template<typename device_t= device<>>
bool dx::proxy::driver<device_t>::setup::reinstall(const char* hwid)
inline

installs the package that ranks best in the driver store on the devices of a hardware id where they stand (::DiInstallDevice, newdev.lib) - a node stays, a software device's included; answers whether the system asks for a reboot, throws at the first device failing

◆ remove()

template<typename device_t= device<>>
setup& dx::proxy::driver<device_t>::setup::remove(const char* hwid)
inlinenoexcept

takes the devices of a hardware id out, those not present included: a bus's device comes back at rescan(), on whatever package stands, a software device ends as its creator ends it (device_t::destroy()); a device failing is reported, the next one taken

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rescan()

template<typename device_t= device<>>
setup& dx::proxy::driver<device_t>::setup::rescan()
inlinenoexcept

reenumerates the parents of the devices remove() took out, so they come back on whatever package stands - a device's bus alone, never the root: a root reenumeration waits on every bus and volume driver of the machine, and a pending one holds the PnP engine and with it every later install

◆ uid()

template<typename device_t= device<>>
const std::string dx::proxy::driver<device_t>::setup::uid(int instance) const
inline

the device enumerator

the underlaying windows API is ::SetupDiEnumDeviceInterfaces() and ::SetupDiGetDeviceInterfaceDetail(). for detailed information see http://msdn.microsoft.com/en-us/library/ms791242.aspx resp. http://msdn.microsoft.com/en-us/library/ms792901.aspx

Exceptions
ERROR_INSUFFICIENT_BUFFERif the internally provide stack space is too small.
Here is the caller graph for this function:

The documentation for this class was generated from the following file: