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: 019943bb5d
This commit is contained in:
Thomas Haller 2015-05-20 12:21:11 +02:00
parent e47eca8761
commit 533f9fa2d2
7 changed files with 22 additions and 17 deletions

View file

@ -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

View file

@ -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"

View file

@ -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);

View file

@ -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"

View file

@ -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)

View file

@ -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)

View file

@ -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"