William A. Kennington III | dcc08b6 | 2018-07-17 14:40:14 -0700 | [diff] [blame] | 1 | #include <sdeventplus/source.hpp> |
| 2 | #include <type_traits> |
| 3 | |
| 4 | namespace sdeventplus |
| 5 | { |
| 6 | |
| 7 | Source::Source(sd_event_source* source, SdEventInterface* intf) : |
| 8 | intf(intf), source(source, &SdEventInterface::sd_event_source_ref, |
| 9 | &SdEventInterface::sd_event_source_unref, intf) |
| 10 | { |
| 11 | } |
| 12 | |
| 13 | Source::Source(sd_event_source* source, std::false_type, |
| 14 | SdEventInterface* intf) : |
| 15 | intf(intf), |
| 16 | source(source, &SdEventInterface::sd_event_source_ref, |
| 17 | &SdEventInterface::sd_event_source_unref, std::false_type(), intf) |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | } // namespace sdeventplus |