ratbag_interface Struct Reference
libratbag does not open file descriptors to devices directly, instead open_restricted() and close_restricted() are called for each path that must be opened. More...
#include <libratbag.h>
Data Fields | |
int(* | open_restricted )(const char *path, int flags, void *user_data) |
Open the device at the given path with the flags provided and return the fd. More... | |
void(* | close_restricted )(int fd, void *user_data) |
Close the file descriptor. More... | |
Detailed Description
libratbag does not open file descriptors to devices directly, instead open_restricted() and close_restricted() are called for each path that must be opened.
- See also
- ratbag_create_context
Field Documentation
◆ close_restricted
void(* ratbag_interface::close_restricted) (int fd, void *user_data) |
Close the file descriptor.
- Parameters
-
fd The file descriptor to close user_data The user_data provided in ratbag_create_context()
◆ open_restricted
int(* ratbag_interface::open_restricted) (const char *path, int flags, void *user_data) |
Open the device at the given path with the flags provided and return the fd.
- Parameters
-
path The device path to open flags Flags as defined by open(2) user_data The user_data provided in ratbag_create_context()
- Returns
- The file descriptor, or a negative errno on failure.
The documentation for this struct was generated from the following file:
- /build/libratbag-gM0d2k/libratbag-0.9/src/libratbag.h