NetworkManager/src/settings/plugins/keyfile
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 tests: minor code cleanup in tests 2018-08-30 11:17:09 +02:00
nms-keyfile-connection.c settings/keyfile: always return path from nms_keyfile_writer_connection() 2018-09-06 07:41:22 +02:00
nms-keyfile-connection.h build: don't add subdirectories to include search path but require qualified include 2016-11-21 14:26:37 +01:00
nms-keyfile-plugin.c settings: make NMSettingsPlugin a regular GObject instance and not an interface 2018-09-06 07:41:22 +02:00
nms-keyfile-plugin.h keyfile: refactor GObject type creation 2016-10-06 20:41:20 +02:00
nms-keyfile-reader.c keyfile: use gs_unref_keyfile in nms_keyfile_reader_from_file() 2018-07-17 15:09:53 +02:00
nms-keyfile-reader.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00
nms-keyfile-utils.c keyfile: refactor GObject type creation 2016-10-06 20:41:20 +02:00
nms-keyfile-utils.h settings: use delegation instead of inheritance for NMSettingsConnection and NMConnection 2018-08-28 22:27:55 +02:00
nms-keyfile-writer.c settings/keyfile: always return path from nms_keyfile_writer_connection() 2018-09-06 07:41:22 +02:00
nms-keyfile-writer.h include: use double-quotes to include our own headers 2017-03-09 14:12:35 +01:00