diff options
| author | Patrick Williams <patrick@stwcx.xyz> | 2026-04-14 14:26:31 +0300 |
|---|---|---|
| committer | Ed Tanous <ed@tanous.net> | 2026-04-15 04:50:54 +0300 |
| commit | 36498b406abb3be754e84072d50f16d9dcbbfa8f (patch) | |
| tree | e4e2744ceefa79581eddab2d12790f648231db3c /include | |
| parent | f2d97d5f96dc2adeda01cdc7eeff5d8fedc5d33a (diff) | |
| download | bmcweb-36498b406abb3be754e84072d50f16d9dcbbfa8f.tar.xz | |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t
* object_path
Change-Id: Iace20f9ad26e8d9dc234979e7a4087d599da2641
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'include')
| -rw-r--r-- | include/dbus_utility.hpp | 20 | ||||
| -rw-r--r-- | include/user_monitor.hpp | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp index 17589c49d1..fd8c0f9661 100644 --- a/include/dbus_utility.hpp +++ b/include/dbus_utility.hpp @@ -47,17 +47,17 @@ using DbusVariantType = std::variant< bool, std::vector<uint32_t>, std::vector<uint16_t>, - sdbusplus::message::object_path, + sdbusplus::object_path, std::tuple<uint64_t, std::vector<std::tuple<std::string, double, uint64_t>>>, std::tuple<uint64_t, std::vector<std::tuple<std::string, std::string, double, uint64_t>>>, - std::vector<sdbusplus::message::object_path>, + std::vector<sdbusplus::object_path>, std::vector<std::tuple<std::string, std::string>>, std::vector<std::tuple<uint32_t, std::vector<uint32_t>>>, std::vector<std::tuple<uint32_t, size_t>>, std::vector<std::tuple< - std::vector<std::tuple<sdbusplus::message::object_path, std::string>>, + std::vector<std::tuple<sdbusplus::object_path, std::string>>, std::string, std::string, uint64_t>>, - std::vector<std::pair<sdbusplus::message::object_path, std::string>>, + std::vector<std::pair<sdbusplus::object_path, std::string>>, std::vector<std::tuple<std::string, uint64_t, std::string, double>>, std::vector<std::tuple<std::string, std::string, uint64_t, std::string>> >; @@ -67,7 +67,7 @@ using DBusPropertiesMap = std::vector<std::pair<std::string, DbusVariantType>>; using DBusInterfacesMap = std::vector<std::pair<std::string, DBusPropertiesMap>>; using ManagedObjectType = - std::vector<std::pair<sdbusplus::message::object_path, DBusInterfacesMap>>; + std::vector<std::pair<sdbusplus::object_path, DBusInterfacesMap>>; // Map of service name to list of interfaces using MapperServiceMap = @@ -164,15 +164,15 @@ void getSubTreePaths( const MapperGetSubTreePathsResponse&)>&& callback); void getAssociatedSubTree( - const sdbusplus::message::object_path& associatedPath, - const sdbusplus::message::object_path& path, int32_t depth, + const sdbusplus::object_path& associatedPath, + const sdbusplus::object_path& path, int32_t depth, std::span<const std::string_view> interfaces, std::function<void(const boost::system::error_code&, const MapperGetSubTreeResponse&)>&& callback); void getAssociatedSubTreePaths( - const sdbusplus::message::object_path& associatedPath, - const sdbusplus::message::object_path& path, int32_t depth, + const sdbusplus::object_path& associatedPath, + const sdbusplus::object_path& path, int32_t depth, std::span<const std::string_view> interfaces, std::function<void(const boost::system::error_code&, const MapperGetSubTreePathsResponse&)>&& callback); @@ -204,7 +204,7 @@ void getAssociationEndPoints( const MapperEndPoints&)>&& callback); void getManagedObjects( - const std::string& service, const sdbusplus::message::object_path& path, + const std::string& service, const sdbusplus::object_path& path, std::function<void(const boost::system::error_code&, const ManagedObjectType&)>&& callback); } // namespace utility diff --git a/include/user_monitor.hpp b/include/user_monitor.hpp index f1a5ad14a2..5431e3bb44 100644 --- a/include/user_monitor.hpp +++ b/include/user_monitor.hpp @@ -15,7 +15,7 @@ namespace bmcweb inline void onUserRemoved(sdbusplus::message_t& msg) { - auto p = msg.unpack<sdbusplus::message::object_path>(); + auto p = msg.unpack<sdbusplus::object_path>(); std::string username = p.filename(); persistent_data::SessionStore::getInstance().removeSessionsByUsername( |
