summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-11-14 13:43:21 -0600
committerMatthew Barth <msbarth@us.ibm.com>2017-11-14 13:49:25 -0600
commita3c58a9cc2f67bbc5a29e6f529f64bbd5233a9b3 (patch)
treeef541789ba0cfecbfa283d75e4fc39c0bc9cc046
parent5f9874f25c7e04597e0bbc69ee4797db4971b9c2 (diff)
downloadsdbusplus-a3c58a9cc2f67bbc5a29e6f529f64bbd5233a9b3.tar.gz
sdbusplus-a3c58a9cc2f67bbc5a29e6f529f64bbd5233a9b3.zip
Add nameOwnerChanged match with given service
The nameOwnerChanged(const std::string& s) returns a match string for the NameOwnerChanged signal of the given service name 's'. Change-Id: I81162b2da67a336dd7b59d9e643a4c66004c6725 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
-rw-r--r--sdbusplus/bus/match.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/sdbusplus/bus/match.hpp b/sdbusplus/bus/match.hpp
index 2e7e114..62c0370 100644
--- a/sdbusplus/bus/match.hpp
+++ b/sdbusplus/bus/match.hpp
@@ -165,6 +165,18 @@ inline auto propertiesChanged(const std::string& p, const std::string& i)
argN(0, i);
}
+/**
+ * @brief Constructs a NameOwnerChanged match string for a service name
+ *
+ * @param[in] s - Service name
+ *
+ * @return NameOwnerChanged match string for a service name
+ */
+inline auto nameOwnerChanged(const std::string& s)
+{
+ return nameOwnerChanged() + argN(0, s);
+}
+
} // namespace rules
} // namespace match
OpenPOWER on IntegriCloud