co_usb
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
co_usb::interface Struct Reference

RAII wrapper than claims interface on ctor and releases on dtor. More...

#include <interface.hpp>

Public Member Functions

libusb_device_handledev () const noexcept
 
int number () const noexcept
 
void release () const noexcept
 Releases the interface and attaches the driver if was detached.
 

Static Public Member Functions

static boost::capy::io_result< interfaceclaim (libusb_device_handle *devh, int iface_num) noexcept
 
static boost::capy::io_result< interfaceclaim (unique_dev_handle &devh, int iface_num) noexcept
 

Detailed Description

RAII wrapper than claims interface on ctor and releases on dtor.

Note
Acts as a shared_ptr

Member Function Documentation

◆ claim() [1/2]

boost::capy::io_result< co_usb::interface > co_usb::interface::claim ( libusb_device_handle devh,
int  iface_num 
)
staticnoexcept

◆ claim() [2/2]

boost::capy::io_result< co_usb::interface > co_usb::interface::claim ( co_usb::unique_dev_handle devh,
int  iface_num 
)
staticnoexcept

◆ dev()

libusb_device_handle * co_usb::interface::dev ( ) const
noexcept

◆ number()

int co_usb::interface::number ( ) const
noexcept

◆ release()

void co_usb::interface::release ( ) const
noexcept

Releases the interface and attaches the driver if was detached.


The documentation for this struct was generated from the following files: