diff options
Diffstat (limited to 'libnm-core/nm-keyfile/nm-keyfile.c')
-rw-r--r-- | libnm-core/nm-keyfile/nm-keyfile.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/libnm-core/nm-keyfile/nm-keyfile.c b/libnm-core/nm-keyfile/nm-keyfile.c index 4c09039d07..1042d2d604 100644 --- a/libnm-core/nm-keyfile/nm-keyfile.c +++ b/libnm-core/nm-keyfile/nm-keyfile.c @@ -20,11 +20,13 @@ #include "nm-glib-aux/nm-secret-utils.h" #include "systemd/nm-sd-utils-shared.h" #include "nm-libnm-core-intern/nm-common-macros.h" -#include "nm-core-internal.h" -#include "nm-keyfile-utils.h" +#include "nm-core-internal.h" +#include "nm-keyfile.h" #include "nm-setting-user.h" +#include "nm-keyfile-utils.h" + /*****************************************************************************/ typedef struct _ParseInfoProperty ParseInfoProperty; @@ -3600,14 +3602,16 @@ nm_keyfile_read_ensure_uuid(NMConnection *connection, const char *fallback_uuid_ * the relative path is made absolute using @base_dir. This must * be an absolute path. * @handler_flags: the #NMKeyfileHandlerFlags. - * @handler: read handler + * @handler: (allow-none) (scope call): read handler * @user_data: user data for read handler - * @error: error + * @error: (allow-none) (out): error * * Tries to create a NMConnection from a keyfile. The resulting keyfile is * not normalized and might not even verify. * * Returns: (transfer full): on success, returns the created connection. + * + * Since: 1.30 */ NMConnection * nm_keyfile_read(GKeyFile * keyfile, @@ -3946,6 +3950,19 @@ _write_setting_wireguard(NMSetting *setting, KeyfileWriterInfo *info) } } +/** + * nm_keyfile_write: + * @connection: the #NMConnection to persist to keyfile. + * @handler_flags: the #NMKeyfileHandlerFlags. + * @handler: (allow-none) (scope call): optional handler for events and + * to override the default behavior. + * @user_data: argument for @handler. + * @error: the #GError in case writing fails. + * + * Returns: (transfer full): a new #GKeyFile or %NULL on error. + * + * Since: 1.30 + */ GKeyFile * nm_keyfile_write(NMConnection * connection, NMKeyfileHandlerFlags handler_flags, @@ -4211,6 +4228,8 @@ nm_keyfile_utils_create_filename(const char *name, gboolean with_extension) * Note that @src is no longer valid after this call. If you want * to keep using the same GError*, you need to set it to %NULL * after calling this function on it. + * + * Since: 1.30 */ void nm_keyfile_handler_data_fail_with_error(NMKeyfileHandlerData *handler_data, GError *src) @@ -4235,6 +4254,8 @@ nm_keyfile_handler_data_fail_with_error(NMKeyfileHandlerData *handler_data, GErr * * Get context information of the current event. This function can be called * on all events, but the context information may be unset. + * + * Since: 1.30 */ void nm_keyfile_handler_data_get_context(const NMKeyfileHandlerData *handler_data, @@ -4276,6 +4297,8 @@ _nm_keyfile_handler_data_warn_get_message(const NMKeyfileHandlerData *handler_da * event. * @out_message: (out) (allow-none) (transfer none): the warning message. * @out_severity: (out) (allow-none): the #NMKeyfileWarnSeverity warning severity. + * + * Since: 1.30 */ void nm_keyfile_handler_data_warn_get(const NMKeyfileHandlerData *handler_data, |