加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
types.hpp 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
#pragma once
#include <sdbusplus/bus.hpp>
#include <sdbusplus/message.hpp>
#include <sdbusplus/message/types.hpp>
#include <cstdint>
#include <functional>
#include <map>
#include <string>
namespace phosphor
{
namespace inventory
{
namespace manager
{
class Manager;
/** @brief Inventory manager supported property types. */
using InterfaceVariantType =
std::variant<bool, size_t, int64_t, uint16_t, std::string,
std::vector<uint8_t>, std::vector<std::string>>;
template <typename T>
using InterfaceType = std::map<std::string, T>;
template <typename T>
using ObjectType = std::map<std::string, InterfaceType<T>>;
using Interface = InterfaceType<InterfaceVariantType>;
using Object = ObjectType<InterfaceVariantType>;
using Action = std::function<void(sdbusplus::bus_t&, Manager&)>;
using Filter =
std::function<bool(sdbusplus::bus_t&, sdbusplus::message_t&, Manager&)>;
using PathCondition =
std::function<bool(const std::string&, sdbusplus::bus_t&, Manager&)>;
template <typename T>
using GetProperty = std::function<T(Manager&)>;
} // namespace manager
} // namespace inventory
} // namespace phosphor
// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化