summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-01-10 10:15:50 -0800
committerPatrick Venture <venture@google.com>2019-01-15 20:06:31 -0800
commitdc82ab15f27ca4481518e9c151c20646d4afdc8b (patch)
tree5fa11975b8326881cf7826fff5cfb7fca1270020
parentcd8dab491d3f78124be800252186a32a90c884b8 (diff)
downloadphosphor-ipmi-blobs-dc82ab15f27ca4481518e9c151c20646d4afdc8b.tar.gz
phosphor-ipmi-blobs-dc82ab15f27ca4481518e9c151c20646d4afdc8b.zip
blobs-ipmid: blobs header: add prototype all handlers need
All blob handlers need to implement this prototype. It's called by the blob manager when it's loading the various blob handler objects. Change-Id: I62329baeb536a624abeb17995bb778ec1c11ca8f Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--blobs-ipmid/blobs.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/blobs-ipmid/blobs.hpp b/blobs-ipmid/blobs.hpp
index 0014fd4..b955245 100644
--- a/blobs-ipmid/blobs.hpp
+++ b/blobs-ipmid/blobs.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include <memory>
#include <string>
#include <vector>
@@ -152,3 +153,19 @@ class GenericBlobInterface
virtual bool expire(uint16_t session) = 0;
};
} // namespace blobs
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * All Blob handlers need to implement this method. It is called after loading
+ * the library to then get a handle to the blob handler.
+ *
+ * @return a unique pointer to your blob handler instance.
+ */
+std::unique_ptr<blobs::GenericBlobInterface> createHandler();
+
+#ifdef __cplusplus
+}
+#endif
OpenPOWER on IntegriCloud