libcortex
Event loop library following a "batteries included" approach
Loading...
Searching...
No Matches
udev.h
1#ifndef _CRTX_UDEV_H
2#define _CRTX_UDEV_H
3
4#ifdef __cplusplus
5extern "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
19 char *subsystem;
20 char *device_type;
21
22 char **attributes;
23};
24
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
36struct crtx_dict *crtx_udev_raw2dict(struct udev_device *dev, struct crtx_udev_raw2dict_attr_req *r2ds, char make_persistent);
37
38struct crtx_listener_base *crtx_setup_udev_listener(void *options);
39CRTX_DECLARE_ALLOC_FUNCTION(udev)
40
41void crtx_udev_init();
42void crtx_udev_finish();
43
44#ifdef __cplusplus
45}
46#endif
47
48#endif
Definition dict.h:61
base structure of a listener
Definition core.h:186
Definition udev.h:25
Definition udev.h:18