2011-09-22 10:16:07 -05:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
|
|
|
/* NetworkManager -- Network link manager
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2011 Red Hat, Inc.
|
2013-01-15 18:48:51 +01:00
|
|
|
* Copyright (C) 2013 Thomas Bechtold <thomasbechtold@jpberlin.de>
|
2011-09-22 10:16:07 -05:00
|
|
|
*/
|
|
|
|
|
|
all: fix up multiple-include-guard defines
Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
guard, which meant that nm-test-utils.h could not tell which of them
was being included (and so, eg, if you tried to include
nm-ip4-config.h in a libnm test, it would fail to compile because
nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
Fix this by changing the include guards in the non-API-stable parts of
the tree:
- libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H
- libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__
- src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__
And likewise for all other headers.
The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
__NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
consistent with the general scheme, do still mostly make sense in
isolation.
2014-08-13 14:10:11 -04:00
|
|
|
#ifndef __NETWORKMANAGER_CONFIG_H__
|
|
|
|
|
#define __NETWORKMANAGER_CONFIG_H__
|
2011-09-22 10:16:07 -05:00
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
|
2014-07-17 16:24:17 -04:00
|
|
|
#include "nm-types.h"
|
2013-03-12 13:14:54 -04:00
|
|
|
|
2013-01-15 18:48:51 +01:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
#define NM_TYPE_CONFIG (nm_config_get_type ())
|
|
|
|
|
#define NM_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONFIG, NMConfig))
|
|
|
|
|
#define NM_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_CONFIG, NMConfigClass))
|
|
|
|
|
#define NM_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONFIG))
|
|
|
|
|
#define NM_IS_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_CONFIG))
|
|
|
|
|
#define NM_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CONFIG, NMConfigClass))
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
GObject parent;
|
|
|
|
|
} NMConfig;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
GObjectClass parent;
|
|
|
|
|
} NMConfigClass;
|
|
|
|
|
|
|
|
|
|
GType nm_config_get_type (void);
|
2011-09-22 10:16:07 -05:00
|
|
|
|
2013-01-15 18:48:51 +01:00
|
|
|
NMConfig *nm_config_get (void);
|
2011-09-22 10:16:07 -05:00
|
|
|
|
|
|
|
|
const char *nm_config_get_path (NMConfig *config);
|
2013-06-14 16:05:04 -04:00
|
|
|
const char *nm_config_get_description (NMConfig *config);
|
2011-09-22 10:16:07 -05:00
|
|
|
const char **nm_config_get_plugins (NMConfig *config);
|
2013-05-23 19:05:40 -03:00
|
|
|
gboolean nm_config_get_monitor_connection_files (NMConfig *config);
|
2014-08-14 13:34:57 +02:00
|
|
|
gboolean nm_config_get_auth_polkit (NMConfig *config);
|
2011-09-22 10:16:07 -05:00
|
|
|
const char *nm_config_get_dhcp_client (NMConfig *config);
|
2013-03-26 10:03:06 -04:00
|
|
|
const char *nm_config_get_dns_mode (NMConfig *config);
|
2011-09-22 10:16:07 -05:00
|
|
|
const char *nm_config_get_log_level (NMConfig *config);
|
|
|
|
|
const char *nm_config_get_log_domains (NMConfig *config);
|
2014-03-06 22:04:44 +01:00
|
|
|
const char *nm_config_get_debug (NMConfig *config);
|
2011-10-21 21:21:30 +02:00
|
|
|
const char *nm_config_get_connectivity_uri (NMConfig *config);
|
2014-07-29 20:04:42 +02:00
|
|
|
guint nm_config_get_connectivity_interval (NMConfig *config);
|
2011-10-21 21:21:30 +02:00
|
|
|
const char *nm_config_get_connectivity_response (NMConfig *config);
|
2011-09-22 10:16:07 -05:00
|
|
|
|
2014-07-17 16:24:17 -04:00
|
|
|
gboolean nm_config_get_ethernet_can_auto_default (NMConfig *config, NMDevice *device);
|
|
|
|
|
void nm_config_set_ethernet_no_auto_default (NMConfig *config, NMDevice *device);
|
2013-03-12 13:14:54 -04:00
|
|
|
|
2014-07-17 16:24:17 -04:00
|
|
|
gboolean nm_config_get_ignore_carrier (NMConfig *config, NMDevice *device);
|
2013-03-19 10:24:35 -04:00
|
|
|
|
2013-03-12 13:14:54 -04:00
|
|
|
char *nm_config_get_value (NMConfig *config, const char *group, const char *key, GError **error);
|
|
|
|
|
|
2013-03-11 12:06:38 -04:00
|
|
|
/* for main.c only */
|
|
|
|
|
GOptionEntry *nm_config_get_options (void);
|
|
|
|
|
NMConfig *nm_config_new (GError **error);
|
|
|
|
|
|
2013-01-15 18:48:51 +01:00
|
|
|
G_END_DECLS
|
2011-09-22 10:16:07 -05:00
|
|
|
|
all: fix up multiple-include-guard defines
Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
guard, which meant that nm-test-utils.h could not tell which of them
was being included (and so, eg, if you tried to include
nm-ip4-config.h in a libnm test, it would fail to compile because
nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
Fix this by changing the include guards in the non-API-stable parts of
the tree:
- libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H
- libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__
- src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__
And likewise for all other headers.
The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
__NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
consistent with the general scheme, do still mostly make sense in
isolation.
2014-08-13 14:10:11 -04:00
|
|
|
#endif /* __NETWORKMANAGER_CONFIG_H__ */
|
2011-09-22 10:16:07 -05:00
|
|
|
|