Hi,
I have a question regarding manipulating sd-bus paths during run time.
Let us assume the calculator example from:
We host the object /net/poettering/Calculator through net.poettering.Calculator.
I am looking for ways to add/remove objects to the service after the process has started.
Say adding objects: /net/poettering/ScientificCalculator , /net/poettering/ProgrammerCalculator
One approach I could think of is:
- Stop the infinite loop
- Unref the bus and slot
- Call required number of sd_bus_add_object_vtable objects (3 in this case)
- Request a well known name and restart the infinite loop.
Is this the right way?
Can someone please help with any design patterns, references or pointers on how we could achieve this?
Thanks,
Guhan
Guhan
Another approach (Crude but not the desired way):
- Take the number of bus paths from a config file
- Change config file and restart the process (systemctl restart process_name)
_______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel