blob: f8fd0173773f977dc32bf6a2e7612c7c2bcdad4a [file]
#ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_REDFISH_QUERY_H_
#define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_REDFISH_QUERY_H_
#include "tlbmc/redfish/request.h"
#include "tlbmc/redfish/response.h"
#include "tlbmc/redfish/routing.h"
#include "router_interface.h"
namespace milotic_tlbmc {
namespace internal {
// Internal version of RedfishPreprocess that takes configuration flags as
// arguments. This is used for unit testing branches that depend on these
// flags.
// Do not call this function directly.
bool RedfishPreprocessInternal(const RedfishRequest& req, RedfishResponse& resp,
bool restrict_transport, bool disable_authz);
} // namespace internal
// Handles common preprocessing for all Redfish requests. For example: content
// type, authorization.
// Returns true if the request is processed successfully.
bool RedfishPreprocess(const RedfishRequest& req, RedfishResponse& resp);
// Handles common postprocessing for all Redfish requests. For example: query
// parameters.
void RedfishPostprocess(::crow::RouterInterface* smart_router,
const crow::Router& tlbmc_router,
const RedfishRequest& req, RedfishResponse& resp);
} // namespace milotic_tlbmc
#endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_REDFISH_QUERY_H_