Skip to content

[th/nm-client-get-object-by-path] client: add nm_client_get_object_by_path() and nm_object_get_client() API

Thomas Haller requested to merge th/nm-client-get-object-by-path into master

When iterating the GMainContext of the NMClient instance, D-Bus events get processed. That means, every time you iterate the context (or "return to the main loop"), the content of the cache might change completely.

It makes sense to keep a reference to an NMObject instance, do something, and afterwards check whether the instance can still be found in the cache.

Add an API for that. nm_object_get_client() allows to know whether the object is still cached.

Likewise, while NMClient abstracts D-Bus, it should still provide a way to look up an NMObject by D-Bus path. Add nm_client_get_object_by_path() for that.

Merge request reports