sd-device: add sd_device_monitor_get_event_source()

This commit is contained in:
Yu Watanabe 2018-11-10 22:13:07 +09:00
parent e29a9fcb29
commit bf7712b63e
3 changed files with 8 additions and 0 deletions

View File

@ -659,6 +659,7 @@ global:
sd_device_monitor_attach_event;
sd_device_monitor_detach_event;
sd_device_monitor_get_event;
sd_device_monitor_get_event_source;
sd_device_monitor_start;
sd_device_monitor_stop;

View File

@ -272,6 +272,12 @@ _public_ sd_event *sd_device_monitor_get_event(sd_device_monitor *m) {
return m->event;
}
_public_ sd_event_source *sd_device_monitor_get_event_source(sd_device_monitor *m) {
assert_return(m, NULL);
return m->event_source;
}
int device_monitor_enable_receiving(sd_device_monitor *m) {
int r;

View File

@ -106,6 +106,7 @@ int sd_device_monitor_set_receive_buffer_size(sd_device_monitor *m, size_t size)
int sd_device_monitor_attach_event(sd_device_monitor *m, sd_event *event, int64_t priority);
int sd_device_monitor_detach_event(sd_device_monitor *m);
sd_event *sd_device_monitor_get_event(sd_device_monitor *m);
sd_event_source *sd_device_monitor_get_event_source(sd_device_monitor *m);
int sd_device_monitor_start(sd_device_monitor *m, sd_device_monitor_handler_t callback, void *userdata, const char *description);
int sd_device_monitor_stop(sd_device_monitor *m);