diff options
author | Thomas Haller <thaller@redhat.com> | 2017-02-03 12:27:15 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-02-10 14:43:24 +0100 |
commit | da072ff008feea85fc78d47b237341a3ce7dcda6 (patch) | |
tree | 69867bc9d9734c3d66476ec2ca717b548ef0b9df /src/settings/nm-settings.h | |
parent | 4a2572fcc1e52cd3f4cf029ce88db6af86653d7d (diff) | |
download | NetworkManager-da072ff008feea85fc78d47b237341a3ce7dcda6.tar.gz |
core: drop nm_settings_get_best_connections() for new nm_settings_get_connections_clone()
nm_settings_get_best_connections() has only one caller: to create
the hidden-SSID list.
Instead of having a highly specialised function (that accepts 3 ways for
filtering -- one of them broken, has one hard-coded way of sorting, and
a @max_requested argument), add a more generic nm_settings_get_connections_clone()
function.
Also invert nm_settings_sort_connections(). The two callers want
to sort descending, not ascending.
Diffstat (limited to 'src/settings/nm-settings.h')
-rw-r--r-- | src/settings/nm-settings.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/settings/nm-settings.h b/src/settings/nm-settings.h index 3e56bf388e..09fe2d137e 100644 --- a/src/settings/nm-settings.h +++ b/src/settings/nm-settings.h @@ -57,9 +57,9 @@ * * Returns: %TRUE to allow the connection, %FALSE to ignore it */ -typedef gboolean (*NMConnectionFilterFunc) (NMSettings *settings, - NMConnection *connection, - gpointer func_data); +typedef gboolean (*NMSettingsConnectionFilterFunc) (NMSettings *settings, + NMSettingsConnection *connection, + gpointer func_data); typedef struct _NMSettingsClass NMSettingsClass; @@ -97,14 +97,12 @@ void nm_settings_add_connection_dbus (NMSettings *self, NMSettingsConnection *const* nm_settings_get_connections (NMSettings *settings, guint *out_len); -GSList *nm_settings_get_connections_sorted (NMSettings *settings); +NMSettingsConnection **nm_settings_get_connections_clone (NMSettings *self, + guint *out_len, + NMSettingsConnectionFilterFunc func, + gpointer func_data); -GSList *nm_settings_get_best_connections (NMSettings *self, - guint max_requested, - const char *ctype1, - const char *ctype2, - NMConnectionFilterFunc func, - gpointer func_data); +GSList *nm_settings_get_connections_sorted (NMSettings *settings); NMSettingsConnection *nm_settings_add_connection (NMSettings *settings, NMConnection *connection, |