mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 15:00:10 +01:00
These SPDX license identifiers are deprecated ([1]). Update them. [1] https://spdx.org/licenses/ sed \ -e '1 s%^/\* SPDX-License-Identifier: \(GPL-2.0\|LGPL-2.1\)+ \*/$%/* SPDX-License-Identifier: \1-or-later */%' \ -e '1,2 s%^\(--\|#\|//\) SPDX-License-Identifier: \(GPL-2.0\|LGPL-2.1\)+$%\1 SPDX-License-Identifier: \2-or-later%' \ -i \ $(git grep -l SPDX-License-Identifier -- \ ':(exclude)shared/c-*/' \ ':(exclude)shared/n-*/' \ ':(exclude)shared/systemd/src' \ ':(exclude)src/systemd/src')
32 lines
1.3 KiB
C
32 lines
1.3 KiB
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2017 Red Hat, Inc.
|
|
*/
|
|
|
|
#ifndef __NM_ENUM_UTILS_H__
|
|
#define __NM_ENUM_UTILS_H__
|
|
|
|
/*****************************************************************************/
|
|
|
|
typedef struct _NMUtilsEnumValueInfo {
|
|
/* currently, this is only used for _nm_utils_enum_from_str_full() to
|
|
* declare additional aliases for values. */
|
|
const char *nick;
|
|
int value;
|
|
} NMUtilsEnumValueInfo;
|
|
|
|
char * _nm_utils_enum_to_str_full(GType type,
|
|
int value,
|
|
const char * sep,
|
|
const NMUtilsEnumValueInfo *value_infos);
|
|
gboolean _nm_utils_enum_from_str_full(GType type,
|
|
const char * str,
|
|
int * out_value,
|
|
char ** err_token,
|
|
const NMUtilsEnumValueInfo *value_infos);
|
|
|
|
const char **_nm_utils_enum_get_values(GType type, int from, int to);
|
|
|
|
/*****************************************************************************/
|
|
|
|
#endif /* __NM_ENUM_UTILS_H__ */
|