NetworkManager/src/settings
Thomas Haller 46fad1fdb6 ifcfg-rh: rework D-Bus handling of ifcfg-rh settings plugin
The ifcfg-rh plugin provides its own D-Bus service which initscripts
query to determine whether NetworkManager handles an ifcfg file.

Rework the D-Bus glue to hook GDBus with NetworkManager to use
GDBusConnection directly. Don't use generated code, don't use
GDBusInterfaceSkeleton.

We still keep "src/settings/plugins/ifcfg-rh/nm-ifcfg-rh.xml"
and still compile the static generated code. We don't actually need
them anymore, maybe the should be dropped later.

This is a proof of concept for reworking the D-Bus glue in
NetworkManager core to directly use GDBusConnection. Reworking core is
much more complicated, because there we also have properties, and a
class hierarchy.

Arguably, for the trivial ifcfg-rh service all this hardly matters, because
the entire D-Bus service only consists of one method, which is unlikely to
be extended in the future.

Now we get rid of layers of glue code, that were hard to comprehend.
Did you understand how nm_exported_object_skeleton_create() works
and uses the generated code and GDBusInterfaceSkeleton to hook into
GDBusConnection? Congratulations in that case. In my opinion, these
layers of code don't simplify but complicate the code.

The change also reduces the binary size of "libnm-settings-plugin-ifcfg-rh.so"
(build with contrib/rpm --without debug) by 8312 bytes (243672 vs. 235360).
2018-02-12 13:29:03 +01:00
..
plugins ifcfg-rh: rework D-Bus handling of ifcfg-rh settings plugin 2018-02-12 13:29:03 +01:00
nm-agent-manager.c c-list: re-import latest version of c-list.h from upstream 2017-11-28 11:26:39 +01:00
nm-agent-manager.h core: fix race of blocking autoconnect for no-secrets when a new secret-agent registers 2017-11-27 15:36:02 +01:00
nm-secret-agent.c all: drop trailing spaces 2018-02-07 13:32:04 +01:00
nm-secret-agent.h core: refactor NMSecretAgentCallId typedef not to be a pointer to struct 2017-11-24 16:24:40 +01:00
nm-settings-connection.c all: drop trailing spaces 2018-02-07 13:32:04 +01:00
nm-settings-connection.h settings: clear unsaved flag on new settings-connection 2017-12-20 15:38:57 +01:00
nm-settings-plugin.c ifcfg-rh: refactor nm_settings_plugin_add_connection() to return on error early 2017-10-27 10:28:41 +02:00
nm-settings-plugin.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nm-settings.c settings: drop unmaintained ifnet settings plugin of Gentoo 2017-12-21 10:50:33 +01:00
nm-settings.h settings: track visible state as regular connection flags 2017-12-05 19:57:25 +01:00