#pragma once #include #include #include #include #include #include namespace vpd { namespace types { using BinaryVector = std::vector; // This covers mostly all the data type supported over DBus for a property. // clang-format off using DbusVariantType = std::variant< std::vector>, std::vector, std::vector, std::string, int64_t, uint64_t, double, int32_t, uint32_t, int16_t, uint16_t, uint8_t, bool, BinaryVector, std::vector, std::vector, sdbusplus::message::object_path, std::tuple>>, std::vector>, std::vector>>, std::vector>, std::vector> >; //IpzType contains tuple of using IpzType = std::tuple; //ReadVpdParams either of IPZ or keyword format using ReadVpdParams = std::variant; //KwData contains tuple of using KwData = std::tuple; //IpzData contains tuple of using IpzData = std::tuple; //WriteVpdParams either of IPZ or keyword format using WriteVpdParams = std::variant; // Return type of ObjectMapper GetObject API using MapperGetObject = std::map>; // Table row data using TableRowData = std::vector; // Type used to populate table data using TableInputData = std::vector; // A table column name-size pair using TableColumnNameSizePair = std::pair; /* Map*/ using PropertyMap = std::map; enum UserOption { Exit, UseBackupDataForAll, UseSystemBackplaneDataForAll, MoreOptions, UseBackupDataForCurrent, UseSystemBackplaneDataForCurrent, NewValueOnBoth, SkipCurrent }; using BiosAttributeCurrentValue = std::variant; using BiosAttributePendingValue = std::variant; using BiosGetAttrRetType = std::tuple; // VPD keyword to BIOS attribute map struct IpzKeyHash { std::size_t operator()(const IpzType& i_key) const { return std::hash()(std::get<0>(i_key)) ^ std::hash()(std::get<1>(i_key)); } }; struct IpzKeyEqual { bool operator()(const IpzType& i_leftKey, const IpzType& i_rightKey) const { return std::get<0>(i_leftKey) == std::get<0>(i_rightKey) && std::get<1>(i_leftKey) == std::get<1>(i_rightKey); } }; // Bios attribute metadata container : {attribute name, number of bits, starting bit position, enabled value, disabled value} using BiosAttributeMetaData = std::tuple, std::optional, std::optional>; // IPZ keyword to BIOS attribute map //{Record, Keyword} -> {attribute name, number of bits in keyword, starting bit // position, enabled value, disabled value} using BiosAttributeKeywordMap = std::unordered_map,IpzKeyHash,IpzKeyEqual>; } // namespace types } // namespace vpd