LIRC libraries
Linux Infrared Remote Control
Toggle main menu visibility
Loading...
Searching...
No Matches
drv_enum.h
Go to the documentation of this file.
1
#ifndef _DRV_ENUM_H
2
#define _DRV_ENUM_H
22
23
#include <stdint.h>
24
25
#include "
driver.h
"
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
32
struct
drv_enum_udev_what
{
33
const
char
* idVendor;
34
const
char
* idProduct;
35
const
char
*
subsystem
;
36
const
char
*
parent_subsys
;
37
};
38
40
void
glob_t_init
(glob_t* glob);
41
43
void
glob_t_add_path
(glob_t* glob,
const
char
* path);
44
46
void
drv_enum_free
(glob_t* glob);
47
52
void
drv_enum_add_udev_info
(glob_t* glob);
53
55
int
drv_enum_glob
(glob_t* glob,
const
char
* pattern);
56
58
int
drv_enum_globs
(glob_t* globbuf,
const
char
*
const
* patterns);
59
61
int
drv_enum_udev
(glob_t* globbuf,
62
const
struct
drv_enum_udev_what
* what);
63
65
int
drv_enum_usb
(glob_t* glob,
66
int
(*is_device_ok)(uint16_t vendor, uint16_t product));
67
68
69
#ifdef __cplusplus
70
}
71
#endif
72
73
#endif
// _DRV_ENUM_H
driver.h
Interface to the userspace drivers.
drv_enum_free
void drv_enum_free(glob_t *glob)
Free memory obtained using any of the drv_enum_* functions.
Definition
drv_enum.c:63
glob_t_init
void glob_t_init(glob_t *glob)
Setup a glob_t variable to empty state.
Definition
drv_enum.c:40
drv_enum_add_udev_info
void drv_enum_add_udev_info(glob_t *glob)
Try to add udev info to existing entries in glob.
Definition
drv_enum.c:174
drv_enum_glob
int drv_enum_glob(glob_t *glob, const char *pattern)
List all devices matching glob(3) pattern.
Definition
drv_enum.c:212
drv_enum_globs
int drv_enum_globs(glob_t *globbuf, const char *const *patterns)
List devices matching any of patterns in null-terminated list.
Definition
drv_enum.c:179
drv_enum_udev
int drv_enum_udev(glob_t *globbuf, const struct drv_enum_udev_what *what)
List all devices matching any of conditions in {0}-terminated list.
Definition
drv_enum.c:412
drv_enum_usb
int drv_enum_usb(glob_t *glob, int(*is_device_ok)(uint16_t vendor, uint16_t product))
List all available devices matched by is_device_ok() using libusb.
Definition
drv_enum.c:252
glob_t_add_path
void glob_t_add_path(glob_t *glob, const char *path)
Add a path to glob, allocating memory as necessary.
Definition
drv_enum.c:48
drv_enum_udev_what
Condition to match in drv_enum_udev().
Definition
drv_enum.h:32
drv_enum_udev_what::subsystem
const char * subsystem
Require given subsystem.
Definition
drv_enum.h:35
drv_enum_udev_what::parent_subsys
const char * parent_subsys
Require a given subsystem parent.
Definition
drv_enum.h:36
lib
drv_enum.h
Generated by
1.17.0