summaryrefslogtreecommitdiff
path: root/libnm-util/nm-setting-ip6-config.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2012-02-08 12:56:52 -0500
committerDan Winship <danw@gnome.org>2012-02-15 11:42:15 -0500
commit839eab556419b6af5046e44361bdcf14fe028d27 (patch)
treeb9183f7d2cc207e7741960a2120756043a95f847 /libnm-util/nm-setting-ip6-config.c
parent0b57cc68fd4a146c9fe255f14c667ab306266c0c (diff)
downloadNetworkManager-839eab556419b6af5046e44361bdcf14fe028d27.tar.gz
Use glib-mkenums to generate enum types
Rather than generating enum classes by hand (and complaining in each file that "this should really be standard"), use glib-mkenums. Unfortunately, we need a very new version of glib-mkenums in order to deal with NM's naming conventions and to fix a few other bugs, so just import that into the source tree temporarily. Also, to simplify the use of glib-mkenums, import Makefile.glib from https://bugzilla.gnome.org/654395. To avoid having to run glib-mkenums for every subdirectory of src/, add a new "generated" directory, and put the generated enums files there. Finally, use Makefile.glib for marshallers too, and generate separate ones for libnm-glib and NetworkManager.
Diffstat (limited to 'libnm-util/nm-setting-ip6-config.c')
-rw-r--r--libnm-util/nm-setting-ip6-config.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/libnm-util/nm-setting-ip6-config.c b/libnm-util/nm-setting-ip6-config.c
index 4dc8f46cef..89011771f0 100644
--- a/libnm-util/nm-setting-ip6-config.c
+++ b/libnm-util/nm-setting-ip6-config.c
@@ -56,31 +56,6 @@ nm_setting_ip6_config_error_quark (void)
return quark;
}
-/* This should really be standard. */
-#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
-
-GType
-nm_setting_ip6_config_error_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- /* Unknown error. */
- ENUM_ENTRY (NM_SETTING_IP6_CONFIG_ERROR_UNKNOWN, "UnknownError"),
- /* The specified property was invalid. */
- ENUM_ENTRY (NM_SETTING_IP6_CONFIG_ERROR_INVALID_PROPERTY, "InvalidProperty"),
- /* The specified property was missing and is required. */
- ENUM_ENTRY (NM_SETTING_IP6_CONFIG_ERROR_MISSING_PROPERTY, "MissingProperty"),
- /* The specified property was not allowed in combination with the current 'method' */
- ENUM_ENTRY (NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD, "NotAllowedForMethod"),
- { 0, 0, 0 }
- };
- etype = g_enum_register_static ("NMSettingIP6ConfigError", values);
- }
- return etype;
-}
-
#if GLIB_CHECK_VERSION(2,26,0)
G_DEFINE_BOXED_TYPE (NMIP6Address, nm_ip6_address, nm_ip6_address_dup, nm_ip6_address_unref)
G_DEFINE_BOXED_TYPE (NMIP6Route, nm_ip6_route, nm_ip6_route_dup, nm_ip6_route_unref)