about summary refs log tree commit diff
path: root/src/libnmc-base/nm-client-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnmc-base/nm-client-utils.h')
-rw-r--r--src/libnmc-base/nm-client-utils.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libnmc-base/nm-client-utils.h b/src/libnmc-base/nm-client-utils.h
index 7d6ec707..c90219a5 100644
--- a/src/libnmc-base/nm-client-utils.h
+++ b/src/libnmc-base/nm-client-utils.h
@@ -62,6 +62,18 @@ const char *nmc_password_subst_char(void);
 
 void nmc_print_qrcode(const char *str);
 
+char *nmc_wifi_qr_uri_new(const char *ssid, const char *key_mgmt, const char *psk, gboolean hidden);
+
+char *nmc_wifi_qr_render_string(const char *str);
+
+/* Whether @key_mgmt denotes a passphrase-protected network (a "WPA"-type QR
+ * code), i.e. one whose QR code is useless without the password. */
+static inline gboolean
+nmc_wifi_key_mgmt_uses_psk(const char *key_mgmt)
+{
+    return NM_IN_STRSET(key_mgmt, "wpa-psk", "sae", "wpa-none");
+}
+
 GHashTable *nmc_utils_parse_passwd_file(char *contents, gssize *out_error_line, GError **error);
 
 GHashTable *