Blame clients/common/nm-client-utils.h

Packit Service 87a54e
/* SPDX-License-Identifier: GPL-2.0-or-later */
Packit 5756e2
/*
Packit 5756e2
 * Copyright (C) 2010 - 2017 Red Hat, Inc.
Packit 5756e2
 */
Packit 5756e2
Packit 5756e2
#ifndef __NM_CLIENT_UTILS_H__
Packit 5756e2
#define __NM_CLIENT_UTILS_H__
Packit 5756e2
Packit Service 2bceb2
#include "nm-meta-setting-desc.h"
Packit 5756e2
#include "nm-active-connection.h"
Packit 5756e2
#include "nm-device.h"
Packit 5756e2
#include "nm-libnm-core-intern/nm-libnm-core-utils.h"
Packit 5756e2
Packit Service a1bd4f
const NMObject **nmc_objects_sort_by_path(const NMObject *const *objs, gssize len);
Packit 5756e2
Packit Service a1bd4f
const char *nmc_string_is_valid(const char *input, const char **allowed, GError **error);
Packit 5756e2
Packit Service a1bd4f
gboolean nmc_string_to_uint(const char *       str,
Packit Service a1bd4f
                            gboolean           range_check,
Packit Service a1bd4f
                            unsigned long int  min,
Packit Service a1bd4f
                            unsigned long int  max,
Packit Service a1bd4f
                            unsigned long int *value);
Packit Service a1bd4f
gboolean nmc_string_to_bool(const char *str, gboolean *val_bool, GError **error);
Packit Service a1bd4f
gboolean nmc_string_to_ternary(const char *str, NMTernary *val, GError **error);
Packit 5756e2
Packit Service a1bd4f
gboolean matches(const char *cmd, const char *pattern);
Packit 5756e2
Packit 5756e2
/* FIXME: don't expose this function on its own, at least not from this file. */
Packit Service a1bd4f
const char *nmc_bond_validate_mode(const char *mode, GError **error);
Packit 5756e2
Packit Service a1bd4f
const char *nmc_device_state_to_string_with_external(NMDevice *device);
Packit 5756e2
Packit Service a1bd4f
const char *nm_active_connection_state_reason_to_string(NMActiveConnectionStateReason reason);
Packit Service a1bd4f
const char *nmc_device_state_to_string(NMDeviceState state);
Packit Service a1bd4f
const char *nmc_device_reason_to_string(NMDeviceStateReason reason);
Packit Service a1bd4f
const char *nmc_device_metered_to_string(NMMetered value);
Packit 5756e2
Packit Service a1bd4f
NMActiveConnectionState nmc_activation_get_effective_state(NMActiveConnection *active,
Packit Service a1bd4f
                                                           NMDevice *          device,
Packit Service a1bd4f
                                                           const char **       reason);
Packit 5756e2
Packit Service a1bd4f
const char *nmc_wifi_strength_bars(guint8 strength);
Packit 5756e2
Packit Service a1bd4f
const char *nmc_password_subst_char(void);
Packit 5756e2
Packit Service a1bd4f
void nmc_print_qrcode(const char *str);
Packit 5756e2
Packit Service a1bd4f
GHashTable *nmc_utils_parse_passwd_file(char *contents, gssize *out_error_line, GError **error);
Packit 5756e2
Packit Service a1bd4f
GHashTable *
Packit Service a1bd4f
nmc_utils_read_passwd_file(const char *passwd_file, gssize *out_error_line, GError **error);
Packit 5756e2
Packit 5756e2
#endif /* __NM_CLIENT_UTILS_H__ */