1*a49a3f79SGaurav Gandhi // Copyright 2021 Google Inc. 2*a49a3f79SGaurav Gandhi // 3*a49a3f79SGaurav Gandhi // Licensed under the Apache License, Version 2.0 (the "License"); 4*a49a3f79SGaurav Gandhi // you may not use this file except in compliance with the License. 5*a49a3f79SGaurav Gandhi // You may obtain a copy of the License at 6*a49a3f79SGaurav Gandhi // 7*a49a3f79SGaurav Gandhi // http://www.apache.org/licenses/LICENSE-2.0 8*a49a3f79SGaurav Gandhi // 9*a49a3f79SGaurav Gandhi // Unless required by applicable law or agreed to in writing, software 10*a49a3f79SGaurav Gandhi // distributed under the License is distributed on an "AS IS" BASIS, 11*a49a3f79SGaurav Gandhi // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*a49a3f79SGaurav Gandhi // See the License for the specific language governing permissions and 13*a49a3f79SGaurav Gandhi // limitations under the License. 14*a49a3f79SGaurav Gandhi 15*a49a3f79SGaurav Gandhi #pragma once 16*a49a3f79SGaurav Gandhi #include "buildjson.hpp" 17*a49a3f79SGaurav Gandhi #include "log_handler.hpp" 18*a49a3f79SGaurav Gandhi 19*a49a3f79SGaurav Gandhi #include <nlohmann/json.hpp> 20*a49a3f79SGaurav Gandhi 21*a49a3f79SGaurav Gandhi #include <vector> 22*a49a3f79SGaurav Gandhi 23*a49a3f79SGaurav Gandhi namespace ipmi_flash 24*a49a3f79SGaurav Gandhi { 25*a49a3f79SGaurav Gandhi /** 26*a49a3f79SGaurav Gandhi * provide the method to parse and validate blob entries from json and produce 27*a49a3f79SGaurav Gandhi * something that is usable by the log handler. 28*a49a3f79SGaurav Gandhi */ 29*a49a3f79SGaurav Gandhi class LogHandlersBuilder : public HandlersBuilderIfc<LogBlobHandler::ActionPack> 30*a49a3f79SGaurav Gandhi { 31*a49a3f79SGaurav Gandhi public: 32*a49a3f79SGaurav Gandhi std::vector<HandlerConfig<LogBlobHandler::ActionPack>> 33*a49a3f79SGaurav Gandhi buildHandlerFromJson(const nlohmann::json& data) override; 34*a49a3f79SGaurav Gandhi }; 35*a49a3f79SGaurav Gandhi } // namespace ipmi_flash 36