William A. Kennington III | 8f90e28 | 2018-07-17 14:40:14 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
William A. Kennington III | 27efe8f | 2018-07-17 14:40:14 -0700 | [diff] [blame] | 3 | #include <sdeventplus/internal/sdevent.hpp> |
| 4 | #include <sdeventplus/internal/sdref.hpp> |
William A. Kennington III | 8f90e28 | 2018-07-17 14:40:14 -0700 | [diff] [blame] | 5 | #include <systemd/sd-event.h> |
| 6 | |
| 7 | namespace sdeventplus |
| 8 | { |
| 9 | |
| 10 | class Event |
| 11 | { |
| 12 | public: |
William A. Kennington III | 0a816c5 | 2018-07-17 14:40:14 -0700 | [diff] [blame^] | 13 | Event(sd_event* event, |
| 14 | internal::SdEvent* sdevent = &internal::sdevent_impl); |
William A. Kennington III | 8f90e28 | 2018-07-17 14:40:14 -0700 | [diff] [blame] | 15 | Event(sd_event* event, std::false_type, |
William A. Kennington III | 0a816c5 | 2018-07-17 14:40:14 -0700 | [diff] [blame^] | 16 | internal::SdEvent* sdevent = &internal::sdevent_impl); |
| 17 | static Event get_new(internal::SdEvent* sdevent = &internal::sdevent_impl); |
| 18 | static Event |
| 19 | get_default(internal::SdEvent* sdevent = &internal::sdevent_impl); |
William A. Kennington III | 8f90e28 | 2018-07-17 14:40:14 -0700 | [diff] [blame] | 20 | |
| 21 | int loop(); |
William A. Kennington III | 631c246 | 2018-07-17 14:40:14 -0700 | [diff] [blame] | 22 | int get_watchdog(); |
| 23 | int set_watchdog(int b); |
William A. Kennington III | 8f90e28 | 2018-07-17 14:40:14 -0700 | [diff] [blame] | 24 | |
| 25 | private: |
William A. Kennington III | 0a816c5 | 2018-07-17 14:40:14 -0700 | [diff] [blame^] | 26 | internal::SdEvent* sdevent; |
| 27 | internal::SdRef<sd_event> event; |
William A. Kennington III | 8f90e28 | 2018-07-17 14:40:14 -0700 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | } // namespace sdeventplus |