manager: claim busname after startup complete
Idiomatic DBus programming would have us defer claiming a well known bus
name until after all of our startup initialization is done. This avoids
unnecessary PropertiesChanged or ObjectManager signals during our
startup phase with callbacks that generate dbus activity such as
createObjects or setProperty.
Change-Id: I5f91bbc2a9a5b343e8db214ebadb52bc71b2d459
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/manager.hpp b/manager.hpp
index 82a3fd4..3046024 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -57,17 +57,19 @@
/** @brief Construct an inventory manager.
*
* @param[in] bus - An sdbusplus bus connection.
- * @param[in] busname - The DBus busname to own.
* @param[in] root - The DBus path on which to implement
* an inventory manager.
*/
- Manager(sdbusplus::bus::bus&&, const char*, const char*);
+ Manager(sdbusplus::bus::bus&&, const char*);
using EventInfo =
std::tuple<std::vector<EventBasePtr>, std::vector<Action>>;
- /** @brief Start processing DBus messages. */
- void run() noexcept;
+ /** @brief Start processing DBus messages.
+ *
+ * @param[in] busname - The DBus busname to own.
+ */
+ void run(const char*);
/** @brief Provided for testing only. */
void shutdown() noexcept;