1 #pragma once
2 #include "registries/base_message_registry.hpp"
3 #include "registries/openbmc_message_registry.hpp"
4 #include "registries/task_event_message_registry.hpp"
5 
6 #include <span>
7 #include <string_view>
8 
9 namespace redfish::registries
10 {
11 inline std::span<const MessageEntry>
12     getRegistryFromPrefix(std::string_view registryName)
13 {
14     if (task_event::header.registryPrefix == registryName)
15     {
16         return {task_event::registry};
17     }
18     if (openbmc::header.registryPrefix == registryName)
19     {
20         return {openbmc::registry};
21     }
22     if (base::header.registryPrefix == registryName)
23     {
24         return {base::registry};
25     }
26     return {openbmc::registry};
27 }
28 } // namespace redfish::registries
29