blob: a937d6dcb1c9c8591f0b743422bf270106d8cb5d [file] [log] [blame]
Matt Spinlere824f982017-05-11 10:07:55 -05001#pragma once
2
3#include <memory>
4#include <systemd/sd-event.h>
5
6namespace phosphor
7{
8namespace fan
9{
10namespace event
11{
12
13/**
14 * Custom deleter for sd_event_source
15 */
16struct EventSourceDeleter
17{
18 void operator()(sd_event_source* eventSource) const
19 {
20 sd_event_source_unref(eventSource);
21 }
22};
23
24using EventSourcePtr = std::unique_ptr<sd_event_source, EventSourceDeleter>;
25
Matt Spinlere824f982017-05-11 10:07:55 -050026}
27}
28}