sdbusplus: remove usage of deprecated alias
The alias `server::match` has been deprecated since 2016. Use the new
alias under bus.
Change-Id: I21baf6b70401d996519b5940d0cd685535475a2f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/control/json/manager.hpp b/control/json/manager.hpp
index c783e44..23dda2b 100644
--- a/control/json/manager.hpp
+++ b/control/json/manager.hpp
@@ -107,11 +107,11 @@
* Tuple constructed of:
* std::unique_ptr<std::vector<SignalPkg>> =
* Pointer to list of the signal's packages
- * std::unique_ptr<sdbusplus::server::match::match> =
+ * std::unique_ptr<sdbusplus::bus::match_t> =
* Pointer to match holding the subscription to a signal
*/
using SignalData = std::tuple<std::unique_ptr<std::vector<SignalPkg>>,
- std::unique_ptr<sdbusplus::server::match::match>>;
+ std::unique_ptr<sdbusplus::bus::match_t>>;
/**
* @class Manager - Represents the fan control manager's configuration
diff --git a/control/json/triggers/signal.cpp b/control/json/triggers/signal.cpp
index 70bc8be..491c7a4 100644
--- a/control/json/triggers/signal.cpp
+++ b/control/json/triggers/signal.cpp
@@ -52,11 +52,11 @@
std::unique_ptr<std::vector<SignalPkg>> pkgs =
std::make_unique<std::vector<SignalPkg>>();
pkgs->emplace_back(std::move(signalPkg));
- std::unique_ptr<sdbusplus::server::match::match> ptrMatch = nullptr;
+ std::unique_ptr<sdbusplus::bus::match_t> ptrMatch = nullptr;
if (!match.empty())
{
// Subscribe to signal
- ptrMatch = std::make_unique<sdbusplus::server::match::match>(
+ ptrMatch = std::make_unique<sdbusplus::bus::match_t>(
mgr->getBus(), match.c_str(),
std::bind(std::mem_fn(&Manager::handleSignal), &(*mgr),
std::placeholders::_1, pkgs.get()));
diff --git a/control/triggers.cpp b/control/triggers.cpp
index cb7281c..5847576 100644
--- a/control/triggers.cpp
+++ b/control/triggers.cpp
@@ -28,11 +28,11 @@
// Setup signal matches of the property for event
std::unique_ptr<EventData> eventData =
std::make_unique<EventData>(group, match, handler, actions);
- std::unique_ptr<sdbusplus::server::match::match> mPtr = nullptr;
+ std::unique_ptr<sdbusplus::bus::match_t> mPtr = nullptr;
if (!match.empty())
{
// Subscribe to signal match
- mPtr = std::make_unique<sdbusplus::server::match::match>(
+ mPtr = std::make_unique<sdbusplus::bus::match_t>(
zone.getBus(), match.c_str(),
std::bind(std::mem_fn(&Zone::handleEvent), &zone,
std::placeholders::_1, eventData.get()));
diff --git a/control/types.hpp b/control/types.hpp
index 0207b36..8bc8690 100644
--- a/control/types.hpp
+++ b/control/types.hpp
@@ -1,5 +1,5 @@
#pragma once
-#include <sdbusplus/server.hpp>
+#include <sdbusplus/bus/match.hpp>
#include <sdeventplus/clock.hpp>
#include <sdeventplus/utility/timer.hpp>
@@ -97,9 +97,8 @@
constexpr auto signalEventDataPos = 0;
constexpr auto signalMatchPos = 1;
-using SignalEvent =
- std::tuple<std::unique_ptr<EventData>,
- std::unique_ptr<sdbusplus::server::match::match>>;
+using SignalEvent = std::tuple<std::unique_ptr<EventData>,
+ std::unique_ptr<sdbusplus::bus::match_t>>;
constexpr auto zoneNumPos = 0;
constexpr auto fullSpeedPos = 1;
diff --git a/control/zone.hpp b/control/zone.hpp
index e7c01f3..c82f0a8 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -573,9 +573,9 @@
* @param[in] data - Event data for signal
* @param[in] match - Subscribed signal match
*/
- inline void
- addSignal(const std::string& name, std::unique_ptr<EventData>&& data,
- std::unique_ptr<sdbusplus::server::match::match>&& match)
+ inline void addSignal(const std::string& name,
+ std::unique_ptr<EventData>&& data,
+ std::unique_ptr<sdbusplus::bus::match_t>&& match)
{
_signalEvents[name].emplace_back(std::move(data), std::move(match));
}
diff --git a/json_config.hpp b/json_config.hpp
index 60e535d..a420ddc 100644
--- a/json_config.hpp
+++ b/json_config.hpp
@@ -107,7 +107,7 @@
{
std::vector<std::string> compatObjPaths;
- _match = std::make_unique<sdbusplus::server::match::match>(
+ _match = std::make_unique<sdbusplus::bus::match_t>(
util::SDBusPlus::getBus(),
sdbusplus::bus::match::rules::interfacesAdded() +
sdbusplus::bus::match::rules::sender(confCompatServ),
@@ -319,7 +319,7 @@
* @brief The interfacesAdded match that is used to wait
* for the IBMCompatibleSystem interface to show up.
*/
- std::unique_ptr<sdbusplus::server::match::match> _match;
+ std::unique_ptr<sdbusplus::bus::match_t> _match;
/**
* @brief List of compatible values from the compatible interface
diff --git a/monitor/tach_sensor.cpp b/monitor/tach_sensor.cpp
index 0c2d4d9..91b4091 100644
--- a/monitor/tach_sensor.cpp
+++ b/monitor/tach_sensor.cpp
@@ -132,7 +132,7 @@
auto match = getMatchString(util::FAN_SENSOR_VALUE_INTF);
- tachSignal = std::make_unique<sdbusplus::server::match::match>(
+ tachSignal = std::make_unique<sdbusplus::bus::match_t>(
_bus, match.c_str(),
[this](auto& msg) { this->handleTachChange(msg); });
@@ -140,7 +140,7 @@
{
match = getMatchString(_interface);
- targetSignal = std::make_unique<sdbusplus::server::match::match>(
+ targetSignal = std::make_unique<sdbusplus::bus::match_t>(
_bus, match.c_str(),
[this](auto& msg) { this->handleTargetChange(msg); });
}
diff --git a/monitor/tach_sensor.hpp b/monitor/tach_sensor.hpp
index 27174f5..dc8814f 100644
--- a/monitor/tach_sensor.hpp
+++ b/monitor/tach_sensor.hpp
@@ -4,7 +4,7 @@
#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus.hpp>
-#include <sdbusplus/server.hpp>
+#include <sdbusplus/bus/match.hpp>
#include <sdeventplus/clock.hpp>
#include <sdeventplus/event.hpp>
#include <sdeventplus/utility/timer.hpp>
@@ -491,12 +491,12 @@
/**
* @brief The match object for the Value properties changed signal
*/
- std::unique_ptr<sdbusplus::server::match::match> tachSignal;
+ std::unique_ptr<sdbusplus::bus::match_t> tachSignal;
/**
* @brief The match object for the Target properties changed signal
*/
- std::unique_ptr<sdbusplus::server::match::match> targetSignal;
+ std::unique_ptr<sdbusplus::bus::match_t> targetSignal;
/**
* @brief The number of seconds to wait between a sensor being set