/*
 * Copyright 2019 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "config.h"

#include "cleanup.hpp"
#include "util.hpp"

#include <blobs-ipmid/blobs.hpp>
#include <memory>
#include <phosphor-logging/log.hpp>
#include <string>
#include <vector>

namespace ipmi_flash
{
std::vector<std::string> files = {
    STATIC_HANDLER_STAGED_NAME, TARBALL_STAGED_NAME, HASH_FILENAME,
    VERIFY_STATUS_FILENAME, UPDATE_STATUS_FILENAME};
}

extern "C" std::unique_ptr<blobs::GenericBlobInterface> createHandler()
{
    using namespace phosphor::logging;

    auto handler = ipmi_flash::FileCleanupHandler::CreateCleanupHandler(
        ipmi_flash::cleanupBlobId, ipmi_flash::files);

    if (!handler)
    {
        log<level::ERR>("Unable to create FileCleanupHandle for Firmware");
        return nullptr;
    }

    return handler;
}
