Use unique_ptr for sd_event object wrapper

Convert the sd_event object wrapper from a shared_ptr to
a unique_ptr.  Requires a new header file.

Change-Id: I868a9e88ed93878c2e0bb12e58f8d3a604510da0
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/event.hpp b/event.hpp
new file mode 100644
index 0000000..71ca6a6
--- /dev/null
+++ b/event.hpp
@@ -0,0 +1,41 @@
+#pragma once
+
+#include <memory>
+#include <systemd/sd-event.h>
+
+namespace phosphor
+{
+namespace fan
+{
+namespace event
+{
+
+/**
+ * Custom deleter for sd_event_source
+ */
+struct EventSourceDeleter
+{
+    void operator()(sd_event_source* eventSource) const
+    {
+        sd_event_source_unref(eventSource);
+    }
+};
+
+using EventSourcePtr = std::unique_ptr<sd_event_source, EventSourceDeleter>;
+
+/**
+ * Customer deleter for sd_event
+ */
+struct EventDeleter
+{
+    void operator()(sd_event* event) const
+    {
+        sd_event_unref(event);
+    }
+};
+
+using EventPtr = std::unique_ptr<sd_event, EventDeleter>;
+
+}
+}
+}