summaryrefslogtreecommitdiff
path: root/libnm-core/nm-core-internal.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-01-31 08:53:32 +0100
committerThomas Haller <thaller@redhat.com>2019-02-04 20:15:20 +0100
commit79a0238c5eb857fd4da3cc08df42ae9c716e622c (patch)
treebf3d3ea652e43a215d72d017f81b91c0bc848291 /libnm-core/nm-core-internal.h
parent4ea6c83e9b94dddbf7a86072df4b2c0abb303859 (diff)
downloadNetworkManager-79a0238c5eb857fd4da3cc08df42ae9c716e622c.tar.gz
libnm,core: move _nm_connection_for_each_secret() from core to libnm-core
_nm_connection_for_each_secret() (formerly for_each_secret()) and _nm_connection_find_secret() (formerly find_secret()) operate on a GVariant of secrets. For that, they implement certain assumptions of how to handle secrets. For example, it must special-case VPN settings, because there is no generic abstraction to handle regular secret and VPN secrets the same. Such special casing should only be done in libnm-core, at one place. Move the code to libnm-core as internal API.
Diffstat (limited to 'libnm-core/nm-core-internal.h')
-rw-r--r--libnm-core/nm-core-internal.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h
index 9385d505e7..870ec78133 100644
--- a/libnm-core/nm-core-internal.h
+++ b/libnm-core/nm-core-internal.h
@@ -733,4 +733,24 @@ GBytes *_nm_setting_802_1x_cert_value_to_bytes (NMSetting8021xCKScheme scheme,
/*****************************************************************************/
+/* Return TRUE to keep (copy to the result), FALSE to drop. */
+typedef gboolean (*NMConnectionForEachSecretFunc) (NMSettingSecretFlags flags,
+ gpointer user_data);
+
+GVariant *_nm_connection_for_each_secret (NMConnection *self,
+ GVariant *secrets,
+ gboolean remove_non_secrets,
+ NMConnectionForEachSecretFunc callback,
+ gpointer callback_data);
+
+typedef gboolean (*NMConnectionFindSecretFunc) (NMSettingSecretFlags flags,
+ gpointer user_data);
+
+gboolean _nm_connection_find_secret (NMConnection *self,
+ GVariant *secrets,
+ NMConnectionFindSecretFunc callback,
+ gpointer callback_data);
+
+/*****************************************************************************/
+
#endif