example: calculator: use YAML paths and service_names support
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia2a51f5c9ef62715b9e65e3935c64d6da7a49f31
diff --git a/example/calculator-aserver.cpp b/example/calculator-aserver.cpp
index f70e7ab..6d41d07 100644
--- a/example/calculator-aserver.cpp
+++ b/example/calculator-aserver.cpp
@@ -42,7 +42,7 @@
int main()
{
- constexpr auto path = "/net/poettering/calculator";
+ constexpr auto path = Calculator::instance_path;
sdbusplus::async::context ctx;
sdbusplus::server::manager_t manager{ctx, path};
@@ -50,7 +50,7 @@
Calculator c{ctx, path};
ctx.spawn([](sdbusplus::async::context& ctx) -> sdbusplus::async::task<> {
- ctx.get_bus().request_name("net.poettering.Calculator");
+ ctx.get_bus().request_name(Calculator::default_service);
co_return;
}(ctx));