NetworkManager/src/libnm-client-public
Thomas Haller 5cc31b79dd
libnm: avoid duplicate typedefs for NMClient/NMDevice
clang 3.4.2-9.el7 does not like this:

  $ clang -DHAVE_CONFIG_H -I. -I..  -I../src/libnm-core-public -I./src/libnm-core-public -I../src/libnm-client-public -I./src/libnm-client-public -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_40  -Wall -Werror -Wextra -Wdeclaration-after-statement -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wvla -Wno-duplicate-decl-specifier -Wno-format-y2k -Wno-missing-field-initializers -Wno-sign-compare -Wno-tautological-constant-out-of-range-compare -Wno-unknown-pragmas -Wno-unused-parameter  -Qunused-arguments -Wunknown-warning-option -Wtypedef-redefinition -Warray-bounds -Wparentheses-equality -Wunused-value -Wimplicit-fallthrough  -fno-strict-aliasing -fdata-sections -ffunction-sections -Wl,--gc-sections -g -O2 -MT examples/C/glib/examples_C_glib_add_connection_libnm-add-connection-libnm.o -MD -MP -MF examples/C/glib/.deps/examples_C_glib_add_connection_libnm-add-connection-libnm.Tpo -c -o examples/C/glib/examples_C_glib_add_connection_libnm-add-connection-libnm.o `test -f 'examples/C/glib/add-connection-libnm.c' || echo '../'`examples/C/glib/add-connection-libnm.c
  ...
  ../src/libnm-client-public/nm-client.h:149:31: error: redefinition of typedef 'NMClient' is a C11 feature [-Werror,-Wtypedef-redefinition]
  typedef struct _NMClient      NMClient;
                                ^

Our code base is C11 internally (actually "-std=gnu11"), but this problem
happens when we build the example. The warning is actually correct, because
our public headers should be more liberal (and possibly be C99 or even C89,
this is undefined).

Fixes: 649314ddaa ('libnm: replace nm-types.h by defining the types in respective headers')
2022-05-12 15:47:57 +02:00
..
meson.build libnm: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +02:00
NetworkManager.h libnm: reorder includes in <NetworkManager.h> header 2022-05-12 15:47:57 +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-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: replace nm-types.h by defining the types in respective headers 2022-05-06 18:33:27 +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.