]>
Commit | Line | Data |
---|---|---|
5cb5a6ff LP |
1 | /*-*- Mode: C; c-basic-offset: 8 -*-*/ |
2 | ||
3 | #ifndef foodevicehfoo | |
4 | #define foodevicehfoo | |
5 | ||
6 | typedef struct Device Device; | |
7 | ||
87f0e418 | 8 | #include "unit.h" |
5cb5a6ff LP |
9 | |
10 | /* We simply watch devices, we cannot plug/unplug them. That | |
11 | * simplifies the state engine greatly */ | |
12 | typedef enum DeviceState { | |
13 | DEVICE_DEAD, | |
14 | DEVICE_AVAILABLE, | |
15 | _DEVICE_STATE_MAX | |
16 | } DeviceState; | |
17 | ||
18 | struct Device { | |
19 | Meta meta; | |
20 | ||
21 | DeviceState state; | |
22 | ||
23 | /* A single device can be created by multiple sysfs objects */ | |
25ac040b | 24 | char *sysfs; |
5cb5a6ff LP |
25 | }; |
26 | ||
87f0e418 | 27 | extern const UnitVTable device_vtable; |
5cb5a6ff | 28 | |
f94ea366 LP |
29 | void device_fd_event(Manager *m, int events); |
30 | ||
5cb5a6ff | 31 | #endif |