libnm: rework checkpoint API

System Internals / NetworkManager - Thomas Haller [redhat.com] - 4 April 2018 12:02 EDT

The libnm API fir checkpoints was only introduced with 1.11. It is not yet stable, so there is still time to adjust it. Note that this changes API/ABI of the development branch.

Changes:

- we only add async variants of the checkpoint functions. I believe that synchronous D-Bus methods are fundamentally flawed, because they mess up the ordering of events. Rename the async functions by removing the "_async" suffix. This matches glib style, for which the async form is also not specially marked.

- for function that refere to a particular checkpoint (rollback and destroy), accept the D-Bus path as string, instead of an NMCheckpoint instance. This form is more flexible, because it allows to use the function without having a NMCheckpoint instance at hand. On the other hand, if one has a NMCheckpoint instance, he can trivially obtain the path to make the call.

735dc41bd libnm: rework checkpoint API
examples/python/gi/checkpoint.py | 55 +++++++++++++++-------------
libnm/libnm.ver | 6 +--
libnm/nm-client.c | 79 +++++++++++++++++++++-------------------
libnm/nm-client.h | 34 ++++++++---------
libnm/nm-manager.c | 56 +++++++++++++---------------
libnm/nm-manager.h | 34 ++++++++---------
6 files changed, 134 insertions(+), 130 deletions(-)

Upstream: cgit.freedesktop.org


  • Share