NetworkManager/src/libnm-core-public
Thomas Haller 65278461a3
libnm: hide NMSetting types from public headers
When subclassing a GObject type, the class and object structs
must be available and defined in the header.

For libnm, and in particular for NMSetting classes, we don't want
users to subclass NMSetting. It also doesn't work, because libnm
has internal code that is necessary to hook up the NMSetting class.
You cannot define your own type and make it work together with
libnm.

Having the structs in public headers limits what we can do with them.
For example, we could embed the private data directly in the structures
and avoid the additional indirection.

This is an API break, but for something that most likely nobody cares
about. Or better, nobody should care about. API is not what is
accidentally defined in a header, API was the library provides to
meaningfully use. Subclassing these types is not meaningful and was
only accidentally possible so far.

Only hide the structs for now. More cleanup is possible later. We shall
however aim to keep the padding and struct layout to not also break ABI.

(cherry picked from commit e46d484fae)
2021-06-11 22:36:50 +02:00
..
meson.build build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-connection.h libnm: Refactor NM_CONNECTION_SERIALIZE_* flags 2021-04-01 17:19:15 +02:00
nm-core-types.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-dbus-interface.h interface-flags: expose NM_DEVICE_INTERFACE_FLAG_PROMISC 2021-04-22 18:57:30 +00:00
nm-errors.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-keyfile.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-6lowpan.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-8021x.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-adsl.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-bluetooth.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-bond.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-bridge-port.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-bridge.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-cdma.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-connection.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-dcb.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-dummy.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-ethtool.h ethtool: Introducing PAUSE support 2021-05-12 18:04:46 +02:00
nm-setting-generic.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-gsm.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-hostname.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-infiniband.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-ip-config.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-ip-tunnel.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-ip4-config.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-ip6-config.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-macsec.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-macvlan.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-match.h libnm: fix exporting nm_setting_match_new() symbol 2021-03-11 19:00:34 +01:00
nm-setting-olpc-mesh.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-ovs-bridge.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-dpdk.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-external-ids.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-interface.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-patch.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ovs-port.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-ppp.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-pppoe.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-proxy.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-serial.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-sriov.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-tc-config.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-team-port.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-team.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-tun.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-user.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-veth.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-vlan.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-vpn.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-vrf.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-vxlan.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-wifi-p2p.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-wimax.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-wired.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-wireguard.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting-wireless-security.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-wireless.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-setting-wpan.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-setting.h libnm: hide NMSetting types from public headers 2021-06-11 22:36:50 +02:00
nm-simple-connection.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-utils.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-version-macros.h.in libnm: add NM_VERSION_1_32, NM_AVAILABLE_IN_1_32, NM_DEPRECATED_IN_1_32 macros 2021-03-11 18:54:40 +01:00
nm-version.h libnm: add NM_VERSION_1_32, NM_AVAILABLE_IN_1_32, NM_DEPRECATED_IN_1_32 macros 2021-03-11 18:54:40 +01:00
nm-vpn-dbus-interface.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-vpn-editor-plugin.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
nm-vpn-plugin-info.h build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00
README.md build: move "libnm-core/" to "src/" and split it 2021-02-18 19:46:51 +01:00

libnm-core-public

This contains (mostly) header files only, which are also part of the public API of libnm.

Also, this API is implemented by the static library libnm-core-impl, which in turn is statically linked into NetworkManager core and libnm.

These headers can be used by anybody who either:

Note that there is also one source file: nm-core-enum-types.c. This source file really belongs to libnm-core-impl but it is here because it's a generated file and so far I couldn't figure out how to generate nm-core-enum-types.h here while moving nm-core-enum-types.c to libnm-core-impl.

Aside nm-core-enum-types.c, this directory only provides header files. Users should add this directory (both srcdir and builddir) to the include search path, because libnm users are used to include these headers unqualified (like #include "nm-setting.h).