start supported blob_id list
Each enabled update mechanism can set its own blob_id that can have its
own details.
Change-Id: I363961cea8deb814c3b2e3c416c992fbf955f5e0
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index 97ebf76..b7c0c60 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -1,15 +1,39 @@
+#include "config.h"
+
#include "firmware_handler.hpp"
+#include <string>
+#include <vector>
+
namespace blobs
{
+std::vector<std::string> supportedFirmware = {
+ "/flash/hash",
+#ifdef ENABLE_STATIC_LAYOUT
+ "/flash/image",
+#endif
+};
+
bool FirmwareBlobHandler::canHandleBlob(const std::string& path)
{
return false;
}
std::vector<std::string> FirmwareBlobHandler::getBlobIds()
{
- return {};
+ /*
+ * Grab the list of supported firmware.
+ * If there's an open session, add that to this list.
+ */
+ std::vector<std::string> blobs = supportedFirmware;
+
+ /*
+ * If there's an open firmware session, it'll add "/flash/active/image",
+ * and if the hash has started, "/flash/active/hash" regardless of
+ * mechanism.
+ */
+
+ return blobs;
}
bool FirmwareBlobHandler::deleteBlob(const std::string& path)
{