NetworkManager/src/libnm-client-public
Thomas Haller f3b17a8db9
libnm: undeprecate nm_remote_connection_get_secrets()
Various synchronous methods (D-Bus calls) in libnm's NMClient API were
deprecated. The problem is that NMClient contains a cache of D-Bus
objects, and it gets updated by asynchronous events (D-Bus signals).
Those events get only processed when iterating the GMainContext, but
they are ordered.

When we perform a pseudo blocking D-Bus call with
g_dbus_connection_call_sync(), then GDBus creates a temporary
GMainContext, sends the request and iterates the internal context
blocking for the response. That is, this reply is not synchrounized with
the events that update the NMClient cache.

That is a problem for methods like nm_remote_connection_delete(),
because you call blocking delete, but afterwards the object is still in
the NMClient cache. That's why most blocking methods are deprecated.

While such blocking calls are therefore problematic, they can still be
very convenient to call from a simple script, a test tool or the python
REPL. See "examples/python/gi/nm-wg-set" which calls
nm_remote_connection_get_secrets(), and it would be (unnecessarily)
cumbersome to do the correct thing or using async API.

In particular, nm_remote_connection_get_secrets() doesn't retrieve an object
that is in the NMClient cache in the first place. Sure, the result is
out of order with the cache, but it's not obviously related and in most
cases it wouldn't matter to the user. So undeprecate this function again.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1345
(cherry picked from commit b46d0dcb6f)
2022-08-25 15:28:18 +02:00
..
meson.build libnm-client: Add public nm_conn_wireguard_import() func 2022-07-21 14:53:26 +02:00
NetworkManager.h libnm-client: Add public nm_conn_wireguard_import() func 2022-07-21 14:53:26 +02:00
nm-access-point.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-active-connection.h libnm: avoid duplicate typedefs for NMClient/NMDevice 2022-05-12 15:47:57 +02:00
nm-autoptr.h bond: add support of queue_id of bond port 2021-08-26 23:04:31 +02:00
nm-checkpoint.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-client.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-conn-utils.h libnm-client: Add public nm_conn_wireguard_import() func 2022-07-21 14:53:26 +02:00
nm-device-6lowpan.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-adsl.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-bond.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-bridge.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-bt.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-dummy.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-ethernet.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-generic.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-infiniband.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-ip-tunnel.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-macsec.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-macvlan.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-modem.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-olpc-mesh.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-ovs-bridge.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-ovs-interface.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-ovs-port.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-ppp.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-team.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-tun.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-veth.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-vlan.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-vrf.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-vxlan.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-wifi-p2p.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-wifi.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-wimax.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-wireguard.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device-wpan.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-device.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-dhcp-config.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-enum-types.c.template libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-enum-types.h.template build: move "libnm/" to "src/" and split it 2021-02-24 12:48:37 +01:00
nm-ethtool-utils.h lgtm: suppress lgtm[cpp/duplicate-include-guard] warning in ethtool header 2021-06-01 17:54:07 +02:00
nm-ip-config.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-object.h libnm: avoid duplicate typedefs for NMClient/NMDevice 2022-05-12 15:47:57 +02:00
nm-remote-connection.h libnm: undeprecate nm_remote_connection_get_secrets() 2022-08-25 15:28:18 +02:00
nm-secret-agent-old.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-vpn-connection.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-vpn-editor.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-vpn-plugin-old.h libnm: drop NM_DEPRECATED_IN_1_2/NM_AVAILABLE_IN_1_2 macros from structs in libnm headers 2022-04-28 16:39:42 +02:00
nm-vpn-service-plugin.h libnm: drop NM_DEPRECATED_IN_1_2/NM_AVAILABLE_IN_1_2 macros from structs in libnm headers 2022-04-28 16:39:42 +02:00
nm-wifi-p2p-peer.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
nm-wimax-nsp.h libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00

libnm-client-public

libnm is NetworkManager's client API. It has a public API. This API consists of two parts:

  • the handling of connections (NMConnection), implemented by libnm-core-impl.
  • the caching of D-Bus API (NMClient), implemented by libnm-client-impl.

This directory contains public headers that are used by libnm users. As such, it's the NMClient part of libnm-core-public.

These headers are usable to any libnm client application and to libnm itself. But not to libnm-core-impl or the daemon.