NetworkManager/shared/nm-glib-aux/nm-enum-utils.h
Thomas Haller 88071abb43
all: unify comment style for SPDX-License-Identifier tag
Our coding style recommends C style comments (/* */) instead of C++
(//). Also, systemd (which we partly fork) uses C style comments for
the SPDX-License-Identifier.

Unify the style.

  $ sed -i '1 s#// SPDX-License-Identifier: \([^ ]\+\)$#/* SPDX-License-Identifier: \1 */#' -- $(git ls-files -- '*.[hc]' '*.[hc]pp')
2020-09-29 16:50:53 +02:00

33 lines
1.3 KiB
C

/* SPDX-License-Identifier: LGPL-2.1+ */
/*
* 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__ */