typedef enum DeviceState {
DEVICE_DEAD,
DEVICE_AVAILABLE,
- _DEVICE_STATE_MAX
+ _DEVICE_STATE_MAX,
+ _DEVICE_STATE_INVALID = -1
} DeviceState;
struct Device {
DeviceState state;
- /* A single device can be created by multiple sysfs objects */
char *sysfs;
};
void device_fd_event(Manager *m, int events);
+const char* device_state_to_string(DeviceState i);
+DeviceState device_state_from_string(const char *s);
+
#endif