libnm: make sync/async APIs more GLib-like
authorDan Winship <danw@gnome.org>
Thu, 11 Sep 2014 20:27:13 +0000 (16:27 -0400)
committerDan Winship <danw@gnome.org>
Thu, 25 Sep 2014 13:29:20 +0000 (09:29 -0400)
commit2237ea3ddbe602446ac87a8a055a6d719c4a0f6c
tree4891a7570618c68905f9375c43f65c71bc21eb9b
parent6ca10677d67c129d43b82e5563e20c4c5f2e5727
libnm: make sync/async APIs more GLib-like

Make synchronous APIs take GCancellables, and make asynchronous APIs
use GAsyncReadyCallbacks and have names ending in "_async", with
"_finish" functions to retrieve the results.

Also, make nm_client_activate_connection_finish(),
nm_client_add_and_activate_finish(), and
nm_remote_settings_add_connection_finish() be (transfer full) rather
than (transfer none), because the refcounting semantics become
slightly confusing in some edge cases otherwise.
21 files changed:
clients/cli/connections.c
clients/cli/devices.c
clients/cli/network-manager.c
clients/tui/nmt-editor.c
clients/tui/nmtui-connect.c
clients/tui/nmtui-edit.c
clients/tui/nmtui-hostname.c
examples/C/glib/add-connection-libnm.c
libnm/libnm.ver
libnm/nm-client.c
libnm/nm-client.h
libnm/nm-device-wifi.c
libnm/nm-device-wifi.h
libnm/nm-device.c
libnm/nm-device.h
libnm/nm-remote-connection.c
libnm/nm-remote-connection.h
libnm/nm-remote-settings.c
libnm/nm-remote-settings.h
libnm/tests/test-remote-settings-client.c
libnm/tests/test-secret-agent.c