UNIT_CONTROL_REQUEST_SENT = 0,
UNIT_CONTROL_OK,
UNIT_CONTROL_TIMEOUT,
- UNIT_CONTROL_ERROR,
+ UNIT_CONTROL_ERROR
};
typedef enum
UNIT_CONTROL_TIMEOUT_MAX = -2
} UnitControlTimeout;
+enum {
+ UNIT_CONTROL_UNIT_STATE_ACTIVE = 0,
+ UNIT_CONTROL_UNIT_STATE_INACTIVE
+};
+
typedef void (*actd_unit_cb)(int status, void *user_data);
int actd_start_unit(BusType bus_type, const char *unit, int timeout_ms);
int actd_stop_unit_async(BusType bus_type, const char *unit, actd_unit_cb cb, void *user_data, int timeout_ms);
int actd_restart_unit_async(BusType bus_type, const char *unit, actd_unit_cb cb, void *user_data, int timeout_ms);
+int actd_register_unit_state_callback(BusType bus_type, const char *unit, actd_unit_cb cb, void *user_data);
+int actd_unregister_unit_state_callback(BusType bus_type, const char *unit, actd_unit_cb cb);
+
#endif /* UNIT_CONTROL_H */