summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-09-15 15:30:13 +0200
committerThomas Haller <thaller@redhat.com>2021-09-15 22:08:42 +0200
commit45bcedb77e84c1f7c3149de3114ea36cf0693868 (patch)
treec7e30e7abb9018db077c0a4ae7c0286653af66e6
parentef7258eafeb9c796bf5e62051618ce2c1f46043f (diff)
downloadNetworkManager-45bcedb77e84c1f7c3149de3114ea36cf0693868.tar.gz
core: move NM_DNS_PRIORITY_DEFAULT_{NORMAL,VPN} to libnm-base
We will use these values from NML3Cfg, and it seems wrong that NML3Cfg would include "dns/nm-dns-manager.h" for this. Enums are very "static". They have no logic, and there is less need to separate the code well. Meaning, it doesn't hurt to define this enum in "libnm-base/nm-base.h" which can be included by (almost) anybody.
-rw-r--r--src/core/dns/nm-dns-manager.h5
-rw-r--r--src/libnm-base/nm-base.h5
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/dns/nm-dns-manager.h b/src/core/dns/nm-dns-manager.h
index 501085f701..1972a5dd7a 100644
--- a/src/core/dns/nm-dns-manager.h
+++ b/src/core/dns/nm-dns-manager.h
@@ -21,11 +21,6 @@ typedef enum {
NM_DNS_IP_CONFIG_TYPE_VPN,
} NMDnsIPConfigType;
-enum {
- NM_DNS_PRIORITY_DEFAULT_NORMAL = 100,
- NM_DNS_PRIORITY_DEFAULT_VPN = 50,
-};
-
/*****************************************************************************/
struct _NMDnsConfigData;
diff --git a/src/libnm-base/nm-base.h b/src/libnm-base/nm-base.h
index b3a57aa806..0363e3b64b 100644
--- a/src/libnm-base/nm-base.h
+++ b/src/libnm-base/nm-base.h
@@ -13,6 +13,11 @@
#define _NM_MAX_CLIENT_ID_LEN (sizeof(guint32) + 128)
+enum {
+ NM_DNS_PRIORITY_DEFAULT_NORMAL = 100,
+ NM_DNS_PRIORITY_DEFAULT_VPN = 50,
+};
+
/*****************************************************************************/
typedef enum {