chiark / gitweb /
extend examples a bit
[elogind.git] / device.h
1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3 #ifndef foodevicehfoo
4 #define foodevicehfoo
5
6 typedef struct Device Device;
7
8 #include "unit.h"
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 */
24         char **sysfs;
25 };
26
27 extern const UnitVTable device_vtable;
28
29 #endif