libcortex
Event loop library following a "batteries included" approach
Loading...
Searching...
No Matches
src
udev.h
1
#ifndef _CRTX_UDEV_H
2
#define _CRTX_UDEV_H
3
4
#ifdef __cplusplus
5
extern
"C"
{
6
#endif
7
8
/*
9
* Mario Kicherer (dev@kicherer.org) 2016
10
*
11
*/
12
13
#include <libudev.h>
14
15
// #define UDEV_MSG_ETYPE "udev/event"
16
// extern char *udev_msg_etype[];
17
18
struct
crtx_udev_raw2dict_attr_req
{
19
char
*subsystem;
20
char
*device_type;
21
22
char
**attributes;
23
};
24
25
struct
crtx_udev_listener
{
26
struct
crtx_listener_base
base;
27
28
struct
udev *udev;
29
int
fd;
30
struct
udev_monitor *monitor;
31
32
char
query_existing;
33
char
**sys_dev_filter;
34
};
35
36
struct
crtx_dict
*crtx_udev_raw2dict(
struct
udev_device *dev,
struct
crtx_udev_raw2dict_attr_req
*r2ds,
char
make_persistent);
37
38
struct
crtx_listener_base
*crtx_setup_udev_listener(
void
*options);
39
CRTX_DECLARE_ALLOC_FUNCTION(udev)
40
41
void
crtx_udev_init();
42
void
crtx_udev_finish();
43
44
#ifdef __cplusplus
45
}
46
#endif
47
48
#endif
crtx_dict
Definition
dict.h:61
crtx_listener_base
base structure of a listener
Definition
core.h:186
crtx_udev_listener
Definition
udev.h:25
crtx_udev_raw2dict_attr_req
Definition
udev.h:18
Generated by
1.9.8