summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-05-20 12:21:11 +0200
committerThomas Haller <thaller@redhat.com>2015-05-20 12:42:14 +0200
commit533f9fa2d2daedb235f8236ca68db3bc7b429005 (patch)
tree9428919799793b920d0f5329554685652d01acde
parente47eca8761e060402a05d7c0757b40455307ec90 (diff)
downloadNetworkManager-533f9fa2d2daedb235f8236ca68db3bc7b429005.tar.gz
libnm: move internal dns-option helpers to "nm-core-internal.h"
"nm-utils-private.h" should not be used outside of libnm-core/. core/ should only use public API or "nm-core-internal.h". Also, "nm-setting-ip-config.h" is a public header and should not contain internal defines. Move them to "nm-core-internal.h" too. Fixes: 019943bb5d9efea52392610b207dececafa6fdb3
-rw-r--r--libnm-core/nm-core-internal.h18
-rw-r--r--libnm-core/nm-setting-ip-config.h8
-rw-r--r--libnm-core/nm-utils-private.h5
-rw-r--r--src/dns-manager/nm-dns-manager.c2
-rw-r--r--src/nm-ip4-config.c2
-rw-r--r--src/nm-ip6-config.c2
-rw-r--r--src/settings/plugins/ifcfg-rh/writer.c2
7 files changed, 22 insertions, 17 deletions
diff --git a/libnm-core/nm-core-internal.h b/libnm-core/nm-core-internal.h
index f586f4b351..a577626a9d 100644
--- a/libnm-core/nm-core-internal.h
+++ b/libnm-core/nm-core-internal.h
@@ -167,4 +167,22 @@ GVariant *_nm_dbus_proxy_call_sync (GDBusProxy *proxy,
gboolean _nm_dbus_error_has_name (GError *error,
const char *dbus_error_name);
+
+/***********************************************************/
+
+typedef struct {
+ const char *name;
+ gboolean numeric;
+ gboolean ipv6_only;
+} DNSOptionDesc;
+
+extern const DNSOptionDesc dns_option_descs[];
+
+gboolean _nm_utils_dns_option_validate (const char *option, char **out_name,
+ long *out_value, gboolean ipv6,
+ const DNSOptionDesc *option_descs);
+int _nm_utils_dns_option_find_idx (GPtrArray *array, const char *option);
+
+/***********************************************************/
+
#endif
diff --git a/libnm-core/nm-setting-ip-config.h b/libnm-core/nm-setting-ip-config.h
index 1e88a8bfde..b150a3178d 100644
--- a/libnm-core/nm-setting-ip-config.h
+++ b/libnm-core/nm-setting-ip-config.h
@@ -145,14 +145,6 @@ void nm_ip_route_set_attribute (NMIPRoute *route,
#define NM_SETTING_IP_CONFIG_NEVER_DEFAULT "never-default"
#define NM_SETTING_IP_CONFIG_MAY_FAIL "may-fail"
-typedef struct {
- const char *name;
- gboolean numeric;
- gboolean ipv6_only;
-} DNSOptionDesc;
-
-extern const DNSOptionDesc dns_option_descs[];
-
#define NM_SETTING_DNS_OPTION_DEBUG "debug"
#define NM_SETTING_DNS_OPTION_NDOTS "ndots"
#define NM_SETTING_DNS_OPTION_TIMEOUT "timeout"
diff --git a/libnm-core/nm-utils-private.h b/libnm-core/nm-utils-private.h
index 74e48dbee1..3219bb3772 100644
--- a/libnm-core/nm-utils-private.h
+++ b/libnm-core/nm-utils-private.h
@@ -27,11 +27,6 @@
gboolean _nm_utils_string_slist_validate (GSList *list,
const char **valid_values);
-gboolean _nm_utils_dns_option_validate (const char *option, char **out_name,
- long *out_value, gboolean ipv6,
- const DNSOptionDesc *option_descs);
-int _nm_utils_dns_option_find_idx (GPtrArray *array, const char *option);
-
/* D-Bus transform funcs */
GVariant * _nm_utils_hwaddr_to_dbus (const GValue *prop_value);
diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
index 85bbf0b50c..5c6b6e684a 100644
--- a/src/dns-manager/nm-dns-manager.c
+++ b/src/dns-manager/nm-dns-manager.c
@@ -40,7 +40,7 @@
#include <glib/gi18n.h>
#include "nm-utils.h"
-#include "nm-utils-private.h"
+#include "nm-core-internal.h"
#include "nm-dns-manager.h"
#include "nm-ip4-config.h"
#include "nm-ip6-config.h"
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
index e893351f6f..59a7fa8bbd 100644
--- a/src/nm-ip4-config.c
+++ b/src/nm-ip4-config.c
@@ -34,7 +34,7 @@
#include "NetworkManagerUtils.h"
#include "nm-core-internal.h"
#include "nm-route-manager.h"
-#include "nm-utils-private.h"
+#include "nm-core-internal.h"
G_DEFINE_TYPE (NMIP4Config, nm_ip4_config, G_TYPE_OBJECT)
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
index df2952717c..93213d61a1 100644
--- a/src/nm-ip6-config.c
+++ b/src/nm-ip6-config.c
@@ -33,7 +33,7 @@
#include "nm-dbus-glib-types.h"
#include "nm-ip6-config-glue.h"
#include "nm-route-manager.h"
-#include "nm-utils-private.h"
+#include "nm-core-internal.h"
#include "NetworkManagerUtils.h"
G_DEFINE_TYPE (NMIP6Config, nm_ip6_config, G_TYPE_OBJECT)
diff --git a/src/settings/plugins/ifcfg-rh/writer.c b/src/settings/plugins/ifcfg-rh/writer.c
index 0a54eaf643..d5f26a14b0 100644
--- a/src/settings/plugins/ifcfg-rh/writer.c
+++ b/src/settings/plugins/ifcfg-rh/writer.c
@@ -42,7 +42,7 @@
#include <nm-setting-team-port.h>
#include "nm-core-internal.h"
#include <nm-utils.h>
-#include <nm-utils-private.h>
+#include "nm-core-internal.h"
#include "nm-logging.h"
#include "gsystem-local-alloc.h"