NetworkManager/src/settings/plugins/ibft
Thomas Haller 657b0714b8 settings: make NMSettingsPlugin a regular GObject instance and not an interface
NMSettingsPlugin was a glib interface, not a regular GObject
instance. Accordingly, settings plugins would implement this interface
instead of subclassing a parent type.

Refactor the code, and make NMSettingsPlugin a GObject type. Plugins
are now required to subclass this type.

Glib interfaces are more cumbersome than helpful. At least, unless
there is a good reason for using them.

Our settings plugins are all internal API and are entirely under
our control. It also means, this change is fine, as there are no
implementations outside of this source tree.

Using interfaces do would allow more flexibility in implementing the
settings plugin.
For example, the plugin would be able to derive from any other GObject
type, like NMKimchiRefrigerator. But why would we even? Let's not add monster
classes that implement house appliances beside NMSettingsPluginInterface.
The settings plugin should have one purpose only: being a settings plugin.
Hence, requiring it to subclass NMSettingsPlugin is more than resonable. We
don't need interfaces for this.

Now that NMSettingsPlugin is a regular object instance, it may also have
state, and potentially could provide common functionality for the plugin
implementation -- if that turns out to be useful. Arguably, an interface can
have state too, for example by attaching the state somewhere else (like
NMConnection does). But let's just say no.

On a minor note, this also avoids some tiny overhead that comes with
glib interfaces.
2018-09-06 07:41:22 +02:00
..
tests build: create "config-extra.h" header instead of passing directory variables via CFLAGS 2018-07-17 17:46:39 +02:00
meson.build build: create "config-extra.h" header instead of passing directory variables via CFLAGS 2018-07-17 17:46:39 +02:00
nms-ibft-connection.c settings: clear unsaved flag on new settings-connection 2017-12-20 15:38:57 +01:00
nms-ibft-connection.h build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nms-ibft-plugin.c settings: make NMSettingsPlugin a regular GObject instance and not an interface 2018-09-06 07:41:22 +02:00
nms-ibft-plugin.h ibft: rename function names for ibft plugin 2016-10-11 11:37:46 +02:00
nms-ibft-reader.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02:00
nms-ibft-reader.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00