2 #include <libvirt/libvirt.h> 3 #include "../NodeDevice.hpp" 12 underlying = nd.underlying;
13 nd.underlying =
nullptr;
19 virNodeDeviceFree(underlying);
22 constexpr
inline NodeDevice::operator bool() const noexcept {
return underlying !=
nullptr; }
26 inline bool NodeDevice::detach(gsl::czstring<> driver_name =
nullptr) noexcept {
return virNodeDeviceDetachFlags(underlying, driver_name, 0) == 0; }
43 return meta::heavy::wrap_oparm_owning_fill_static_arr<std::string>(underlying, virNodeDeviceNumOfCaps, virNodeDeviceListCaps);
51 return NodeDevice{virNodeDeviceCreateXML(conn.underlying, xml, 0)};
passive< gsl::czstring<> > getXMLDesc() const noexcept
Definition: NodeDevice.hpp:34
~NodeDevice() noexcept
Definition: NodeDevice.hpp:17
constexpr NodeDevice(virNodeDevicePtr ptr=nullptr) noexcept
Definition: NodeDevice.hpp:6
Definition: Connection.hpp:47
T passive
Definition: utility.hpp:48
auto listCaps() const noexcept
Definition: NodeDevice.hpp:38
bool reset() noexcept
Definition: NodeDevice.hpp:48
Definition: NodeDevice.hpp:33
Definition: AdminConnection.hpp:11
bool reAttach() noexcept
Definition: NodeDevice.hpp:46
std::string extractXMLDesc() const noexcept
Definition: NodeDevice.hpp:36
NodeDevice & operator=(const NodeDevice &)=delete
passive< gsl::czstring<> > getName() const noexcept
Definition: NodeDevice.hpp:30
bool detach() noexcept
Definition: NodeDevice.hpp:28
bool destroy() noexcept
Definition: NodeDevice.hpp:24
static NodeDevice createXML(Connection &conn, gsl::czstring<> xml) noexcept
Definition: NodeDevice.hpp:50
passive< gsl::czstring<> > getParent() const noexcept
Definition: NodeDevice.hpp:32
std::vector< std::string > extractCaps() const
Definition: NodeDevice.hpp:42