| #ifndef THIRD_PARTY_MILOTIC_INTERNAL_CC_BMCWEB_APP_INTERFACE_H_ |
| #define THIRD_PARTY_MILOTIC_INTERNAL_CC_BMCWEB_APP_INTERFACE_H_ |
| |
| #include <cstddef> |
| #include <memory> |
| #include <string> |
| |
| #include "absl/container/flat_hash_map.h" |
| #include "absl/container/flat_hash_set.h" |
| #include "http_request.hpp" |
| #include "async_resp.hpp" |
| #include "router_interface.h" |
| |
| namespace crow { |
| // Abstract Redfish App Away. |
| // We have this interface to hide tlBMC headers. |
| class AppInterface { |
| public: |
| AppInterface() = default; |
| virtual ~AppInterface() = default; |
| |
| AppInterface(const AppInterface&) = default; |
| AppInterface& operator=(const AppInterface&) = default; |
| AppInterface(AppInterface&&) = default; |
| AppInterface& operator=(AppInterface&&) = default; |
| |
| virtual absl::flat_hash_map<std::string, size_t> GetOwnedUrls() const = 0; |
| |
| virtual void SetSmartRouter(::crow::RouterInterface* smart_router) = 0; |
| |
| virtual void HandleFromCrowRequest( |
| const crow::Request& req, |
| const std::shared_ptr<bmcweb::AsyncResp>& async_resp) const = 0; |
| |
| virtual void DebugPrint() const = 0; |
| |
| virtual absl::flat_hash_set<std::string> GetOwnedSubtrees() const = 0; |
| }; |
| |
| } // namespace crow |
| |
| #endif // THIRD_PARTY_MILOTIC_INTERNAL_CC_BMCWEB_APP_INTERFACE_H_ |