summaryrefslogtreecommitdiff
path: root/libnm/nm-client.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-04-04 13:33:53 +0200
committerThomas Haller <thaller@redhat.com>2018-04-04 14:02:13 +0200
commit735dc41bd057301d65c3d22ca5c0689fa4cdebec (patch)
tree40c0a9a27090b0f8194d08df80280f3adc2a0ca3 /libnm/nm-client.h
parent8171362d02ca3fc1d68ddf0e4913b285c788510e (diff)
downloadNetworkManager-735dc41bd057301d65c3d22ca5c0689fa4cdebec.tar.gz
libnm: rework checkpoint API
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.
Diffstat (limited to 'libnm/nm-client.h')
-rw-r--r--libnm/nm-client.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/libnm/nm-client.h b/libnm/nm-client.h
index f7ec4b7a2c..6f4a86c957 100644
--- a/libnm/nm-client.h
+++ b/libnm/nm-client.h
@@ -408,35 +408,35 @@ NM_AVAILABLE_IN_1_12
const GPtrArray *nm_client_get_checkpoints (NMClient *client);
NM_AVAILABLE_IN_1_12
-void nm_client_checkpoint_create_async (NMClient *client,
- const GPtrArray *devices,
- guint32 rollback_timeout,
- NMCheckpointCreateFlags flags,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
+void nm_client_checkpoint_create (NMClient *client,
+ const GPtrArray *devices,
+ guint32 rollback_timeout,
+ NMCheckpointCreateFlags flags,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
NM_AVAILABLE_IN_1_12
NMCheckpoint *nm_client_checkpoint_create_finish (NMClient *client,
GAsyncResult *result,
GError **error);
NM_AVAILABLE_IN_1_12
-void nm_client_checkpoint_destroy_async (NMClient *client,
- NMCheckpoint *checkpoint,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
+void nm_client_checkpoint_destroy (NMClient *client,
+ const char *checkpoint_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
NM_AVAILABLE_IN_1_12
gboolean nm_client_checkpoint_destroy_finish (NMClient *client,
GAsyncResult *result,
GError **error);
NM_AVAILABLE_IN_1_12
-void nm_client_checkpoint_rollback_async (NMClient *client,
- NMCheckpoint *checkpoint,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
+void nm_client_checkpoint_rollback (NMClient *client,
+ const char *checkpoint_path,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
NM_AVAILABLE_IN_1_12
GHashTable *nm_client_checkpoint_rollback_finish (NMClient *client,
GAsyncResult *result,