NetworkManager/src/settings
Thomas Haller 7771473f46 libnm,core: add _nm_connection_aggregate() to replace nm_connection_for_each_setting_value()
We should no longer use nm_connection_for_each_setting_value() and
nm_setting_for_each_value(). It's fundamentally broken as it does
not work with properties that are not backed by a GObject property
and it cannot be fixed because it is public API.

Add an internal function _nm_connection_aggregate() to replace it.

Compare the implementation of the aggregation functionality inside
libnm with the previous two checks for secret-flags that it replaces:

- previous approach broke abstraction and require detailed knowledge of
  secret flags. Meaning, they must special case NMSettingVpn and
  GObject-property based secrets.
  If we implement a new way for implementing secrets (like we will need
  for WireGuard), then this the new way should only affect libnm-core,
  not require changes elsewhere.

- it's very inefficient to itereate over all settings. It involves
  cloning and sorting the list of settings, and retrieve and clone all
  GObject properties. Only to look at secret properties alone.

_nm_connection_aggregate() is supposed to be more flexible then just
the two new aggregate types that perform a "find-any" search. The
@arg argument and boolean return value can suffice to implement
different aggregation types in the future.

Also fixes the check of NMAgentManager for secret flags for VPNs
(NM_CONNECTION_AGGREGATE_ANY_SYSTEM_SECRET_FLAGS). A secret for VPNs
is a property that either has a secret or a secret-flag. The previous
implementation would only look at present secrets and
check their flags. It wouldn't check secret-flags that are
NM_SETTING_SECRET_FLAG_NONE, but have no secret.
2019-01-07 10:54:28 +01:00
..
plugins build: meson: Add trailing commas 2018-12-20 13:50:34 +01:00
nm-agent-manager.c libnm,core: add _nm_connection_aggregate() to replace nm_connection_for_each_setting_value() 2019-01-07 10:54:28 +01:00
nm-agent-manager.h core/dbus: rework D-Bus implementation to use lower layer GDBusConnection API 2018-03-12 18:37:08 +01:00
nm-secret-agent.c all: don't use gchar/gshort/gint/glong but C types 2018-07-11 12:02:06 +02: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 libnm,core: add _nm_connection_aggregate() to replace nm_connection_for_each_setting_value() 2019-01-07 10:54:28 +01:00
nm-settings-connection.h settings: use delegation instead of inheritance for NMSettingsConnection and NMConnection 2018-08-28 22:27:55 +02:00
nm-settings-plugin.c settings: make NMSettingsPlugin a regular GObject instance and not an interface 2018-09-06 07:41:22 +02:00
nm-settings-plugin.h settings: cleanup loading settings plugins 2018-09-06 07:41:22 +02:00
nm-settings.c libnm/gtk-doc: fix transfer-none annotation for nm_settings_get_connections() 2018-12-30 15:17:11 +01:00
nm-settings.h core: improve logging why startup-complete is blocked 2018-09-19 17:51:01 +02:00