blob: eb3c903bfe4136097055f06064f0352bfe15542e [file] [log] [blame]
William A. Kennington IIIdcc08b62018-07-17 14:40:14 -07001#include <sdeventplus/source.hpp>
2#include <type_traits>
3
4namespace sdeventplus
5{
6
7Source::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
13Source::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