Commit b28f6526 authored by Dan Winship's avatar Dan Winship

core: fill in nm-types.h, clean out other headers

Clean up some of the cross-includes between headers (which made it so
that, eg, if you included NetworkManagerUtils.h in a test program, you
would need to build the test with -I$(top_srcdir)/src/platform, and if
you included nm-device.h you'd need $(POLKIT_CFLAGS)) by moving all
GObject struct definitions for src/ and src/settings/ into nm-types.h
(which already existed to solve the NMDevice/NMActRequest circular
references).

Update various .c files to explicitly include the headers they used to
get implicitly, and remove some now-unnecessary -I options from
Makefiles.
parent b7c7832a
......@@ -28,9 +28,11 @@
#include <resolv.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <linux/if.h>
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "nm-setting-private.h"
#include "nm-logging.h"
#include "nm-device.h"
#include "nm-setting-connection.h"
......
......@@ -26,12 +26,7 @@
#include <stdio.h>
#include <net/ethernet.h>
#include "nm-ip4-config.h"
#include "nm-setting-ip4-config.h"
#include "nm-ip6-config.h"
#include "nm-setting-ip6-config.h"
#include "nm-connection.h"
#include "nm-setting-private.h"
gboolean nm_ethernet_address_is_valid (const struct ether_addr *test_addr);
......
......@@ -7,17 +7,13 @@ AM_CPPFLAGS = \
-I${top_builddir}/src \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src/devices \
-I${top_srcdir}/src/settings \
-I${top_srcdir}/src/platform \
-I${top_srcdir}/src/ppp-manager \
-I${top_srcdir}/include \
-I${top_builddir}/libnm-util \
-I${top_srcdir}/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(POLKIT_CFLAGS) \
$(LIBNL_CFLAGS) \
$(GUDEV_CFLAGS)
GLIB_GENERATED = nm-adsl-enum-types.h nm-adsl-enum-types.c
......
......@@ -15,10 +15,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-bluetooth"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(POLKIT_CFLAGS) \
$(LIBNL_CFLAGS) \
$(GUDEV_CFLAGS)
$(DBUS_CFLAGS)
GLIB_GENERATED = nm-bt-enum-types.h nm-bt-enum-types.c
GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
......
......@@ -25,7 +25,6 @@
#include <glib-object.h>
#include "NetworkManager.h"
#include "nm-platform.h"
#include "nm-device.h"
/* WARNING: this file is private API between NetworkManager and its internal
......
......@@ -33,6 +33,9 @@
#include "nm-device-private.h"
#include "nm-enum-types.h"
#include "nm-dbus-manager.h"
#include "nm-activation-request.h"
#include "nm-ip4-config.h"
#include "nm-platform.h"
#include "nm-device-infiniband-glue.h"
......
......@@ -35,6 +35,9 @@
#include "nm-device-private.h"
#include "nm-enum-types.h"
#include "nm-dbus-manager.h"
#include "nm-connection-provider.h"
#include "nm-activation-request.h"
#include "nm-ip4-config.h"
#include "nm-platform.h"
#include "nm-utils.h"
......
......@@ -51,11 +51,15 @@
#include "nm-dbus-manager.h"
#include "nm-utils.h"
#include "nm-logging.h"
#include "nm-activation-request.h"
#include "nm-setting-ip4-config.h"
#include "nm-ip4-config.h"
#include "nm-setting-ip6-config.h"
#include "nm-ip6-config.h"
#include "nm-setting-connection.h"
#include "nm-dnsmasq-manager.h"
#include "nm-dhcp4-config.h"
#include "nm-dhcp6-config.h"
#include "nm-rfkill-manager.h"
#include "nm-firewall-manager.h"
#include "nm-properties-changed-signal.h"
......
......@@ -28,15 +28,8 @@
#include "NetworkManager.h"
#include "nm-types.h"
#include "nm-activation-request.h"
#include "nm-ip4-config.h"
#include "nm-ip6-config.h"
#include "nm-dhcp4-config.h"
#include "nm-dhcp6-config.h"
#include "nm-connection.h"
#include "nm-rfkill-manager.h"
#include "nm-connection-provider.h"
#include "nm-platform.h"
/* Properties */
#define NM_DEVICE_UDI "udi"
......
......@@ -7,7 +7,6 @@ AM_CPPFLAGS = \
-I${top_builddir}/src \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src/devices \
-I${top_srcdir}/src/settings \
-I${top_srcdir}/src/platform \
-I${top_srcdir}/src/posix-signals \
-I${top_srcdir}/include \
......@@ -15,10 +14,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-team"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(POLKIT_CFLAGS) \
$(LIBNL_CFLAGS) \
$(GUDEV_CFLAGS)
$(DBUS_CFLAGS)
if WITH_TEAMDCTL
AM_CPPFLAGS += ${LIBTEAMDCTL_CFLAGS}
......
......@@ -26,6 +26,7 @@
#include "nm-team-factory.h"
#include "nm-device-team.h"
#include "nm-logging.h"
#include "nm-platform.h"
static GType nm_team_factory_get_type (void);
......
......@@ -17,10 +17,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(POLKIT_CFLAGS) \
$(LIBNL_CFLAGS) \
$(GUDEV_CFLAGS)
$(DBUS_CFLAGS)
GLIB_GENERATED = nm-wifi-enum-types.h nm-wifi-enum-types.c
GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
......
......@@ -53,6 +53,7 @@
#include "nm-manager.h"
#include "nm-enum-types.h"
#include "nm-dbus-manager.h"
#include "nm-platform.h"
#include "nm-wifi-enum-types.h"
/* This is a bug; but we can't really change API now... */
......
......@@ -52,6 +52,7 @@
#include "nm-setting-wireless-security.h"
#include "nm-setting-8021x.h"
#include "nm-setting-ip4-config.h"
#include "nm-ip4-config.h"
#include "nm-setting-ip6-config.h"
#include "nm-platform.h"
#include "nm-manager-auth.h"
......
......@@ -24,6 +24,7 @@
#include "nm-device-wifi.h"
#include "nm-device-olpc-mesh.h"
#include "nm-settings-connection.h"
#include "nm-platform.h"
#define NM_TYPE_WIFI_FACTORY (nm_wifi_factory_get_type ())
#define NM_WIFI_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_WIFI_FACTORY, NMWifiFactory))
......
......@@ -2,7 +2,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-I$(top_srcdir)/src/platform \
-I$(top_srcdir)/src/logging \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/devices/wifi \
......
......@@ -10,10 +10,7 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\""NetworkManager-wimax"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(POLKIT_CFLAGS) \
$(IWMX_SDK_CFLAGS) \
$(LIBNL_CFLAGS) \
$(GUDEV_CFLAGS)
$(IWMX_SDK_CFLAGS)
pkglib_LTLIBRARIES = libnm-device-plugin-wimax.la
......
......@@ -36,8 +36,10 @@
#include "nm-logging.h"
#include "nm-device-private.h"
#include "NetworkManagerUtils.h"
#include "nm-active-connection.h"
#include "nm-dbus-manager.h"
#include "nm-connection.h"
#include "nm-platform.h"
#include "nm-setting-connection.h"
#include "nm-setting-wimax.h"
#include "nm-utils.h"
......
......@@ -22,6 +22,7 @@
#include "nm-device-factory.h"
#include "nm-device-wimax.h"
#include "nm-platform.h"
#define NM_TYPE_WIMAX_FACTORY (nm_wimax_factory_get_type ())
#define NM_WIMAX_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_WIMAX_FACTORY, NMWimaxFactory))
......
......@@ -15,7 +15,6 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\""NetworkManager-wwan"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
$(POLKIT_CFLAGS) \
$(MM_GLIB_CFLAGS)
BUILT_SOURCES = $(null)
......
......@@ -26,6 +26,7 @@
#include "nm-logging.h"
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
#include "nm-platform.h"
G_DEFINE_TYPE (NMModemBroadband, nm_modem_broadband, NM_TYPE_MODEM)
......
......@@ -34,6 +34,7 @@
#include "nm-dbus-glib-types.h"
#include "nm-dhcp-client.h"
#include "nm-dhcp-utils.h"
#include "nm-platform.h"
typedef struct {
char * iface;
......
......@@ -27,6 +27,7 @@
#include "nm-dhcp-dhclient-utils.h"
#include "nm-ip4-config.h"
#include "nm-utils.h"
#include "nm-platform.h"
#include "NetworkManagerUtils.h"
#define CLIENTID_TAG "send dhcp-client-identifier"
......
......@@ -27,6 +27,7 @@
#include "nm-dhcp-utils.h"
#include "nm-utils.h"
#include "NetworkManagerUtils.h"
#include "nm-platform.h"
/********************************************/
......
......@@ -25,6 +25,7 @@
#include "nm-dhcp-dhclient-utils.h"
#include "nm-utils.h"
#include "nm-ip4-config.h"
#include "nm-platform.h"
#define DEBUG 0
......
......@@ -26,6 +26,7 @@
#include "nm-dhcp-utils.h"
#include "nm-logging.h"
#include "nm-platform.h"
#include "nm-test-utils.h"
......
......@@ -21,6 +21,7 @@
#include <string.h>
#include "nm-dns-utils.h"
#include "nm-platform.h"
#include "nm-utils.h"
static void
......
......@@ -55,6 +55,7 @@
#include "nm-posix-signals.h"
#include "nm-session-monitor.h"
#include "nm-dispatcher.h"
#include "nm-settings.h"
#if !defined(NM_DIST_VERSION)
# define NM_DIST_VERSION VERSION
......
......@@ -37,7 +37,7 @@
#include "nm-active-connection.h"
#include "nm-settings-connection.h"
#include "nm-posix-signals.h"
#include "nm-auth-subject.h"
G_DEFINE_TYPE (NMActRequest, nm_act_request, NM_TYPE_ACTIVE_CONNECTION)
......
......@@ -23,6 +23,7 @@
#include <glib.h>
#include <glib-object.h>
#include "nm-types.h"
#include "nm-connection.h"
#include "nm-active-connection.h"
......@@ -35,9 +36,9 @@
#define NM_IS_ACT_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_ACT_REQUEST))
#define NM_ACT_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ACT_REQUEST, NMActRequestClass))
typedef struct {
struct _NMActRequest {
NMActiveConnection parent;
} NMActRequest;
};
typedef struct {
NMActiveConnectionClass parent;
......
......@@ -28,6 +28,7 @@
#include "nm-device.h"
#include "nm-settings-connection.h"
#include "nm-manager-auth.h"
#include "nm-auth-subject.h"
#include "NetworkManagerUtils.h"
#include "nm-active-connection-glue.h"
......
......@@ -24,7 +24,6 @@
#include <glib-object.h>
#include "nm-types.h"
#include "nm-connection.h"
#include "nm-auth-subject.h"
#define NM_TYPE_ACTIVE_CONNECTION (nm_active_connection_get_type ())
#define NM_ACTIVE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnection))
......@@ -57,9 +56,9 @@
#define NM_ACTIVE_CONNECTION_INT_MASTER "int-master"
#define NM_ACTIVE_CONNECTION_INT_MASTER_READY "int-master-ready"
typedef struct {
struct _NMActiveConnection {
GObject parent;
} NMActiveConnection;
};
typedef struct {
GObjectClass parent;
......
......@@ -31,6 +31,8 @@
#include <polkit/polkit.h>
#endif
#include "nm-types.h"
#define NM_TYPE_AUTH_SUBJECT (nm_auth_subject_get_type ())
#define NM_AUTH_SUBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_AUTH_SUBJECT, NMAuthSubject))
#define NM_AUTH_SUBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_AUTH_SUBJECT, NMAuthSubjectClass))
......@@ -38,9 +40,9 @@
#define NM_IS_AUTH_SUBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_AUTH_SUBJECT))
#define NM_AUTH_SUBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_AUTH_SUBJECT, NMAuthSubjectClass))
typedef struct {
struct _NMAuthSubject {
GObject parent;
} NMAuthSubject;
};
typedef struct {
GObjectClass parent;
......
......@@ -19,13 +19,13 @@
#include <glib-object.h>
#include <nm-connection.h>
#include "nm-types.h"
#define NM_TYPE_CONNECTION_PROVIDER (nm_connection_provider_get_type ())
#define NM_CONNECTION_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION_PROVIDER, NMConnectionProvider))
#define NM_IS_CONNECTION_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTION_PROVIDER))
#define NM_CONNECTION_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NM_TYPE_CONNECTION_PROVIDER, NMConnectionProvider))
typedef struct _NMConnectionProvider NMConnectionProvider;
#define NM_CP_SIGNAL_CONNECTION_ADDED "cp-connection-added"
#define NM_CP_SIGNAL_CONNECTION_UPDATED "cp-connection-updated"
#define NM_CP_SIGNAL_CONNECTION_REMOVED "cp-connection-removed"
......
......@@ -26,6 +26,7 @@
#include <gio/gio.h>
#include "NetworkManager.h"
#include "nm-types.h"
#define NM_TYPE_CONNECTIVITY (nm_connectivity_get_type ())
#define NM_CONNECTIVITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTIVITY, NMConnectivity))
......@@ -40,9 +41,9 @@
#define NM_CONNECTIVITY_RESPONSE "response"
#define NM_CONNECTIVITY_STATE "state"
typedef struct {
struct _NMConnectivity {
GObject parent;
} NMConnectivity;
};
typedef struct {
GObjectClass parent;
......
......@@ -27,6 +27,8 @@
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include "nm-types.h"
G_BEGIN_DECLS
typedef gboolean (* NMDBusSignalHandlerFunc) (DBusConnection * connection,
......@@ -45,9 +47,9 @@ typedef gboolean (* NMDBusSignalHandlerFunc) (DBusConnection * connection,
#define NM_DBUS_MANAGER_PRIVATE_CONNECTION_NEW "private-connection-new"
#define NM_DBUS_MANAGER_PRIVATE_CONNECTION_DISCONNECTED "private-connection-disconnected"
typedef struct {
struct _NMDBusManager {
GObject parent;
} NMDBusManager;
};
typedef struct {
GObjectClass parent;
......
......@@ -24,6 +24,8 @@
#include <glib.h>
#include <glib-object.h>
#include "nm-types.h"
#define NM_TYPE_DHCP4_CONFIG (nm_dhcp4_config_get_type ())
#define NM_DHCP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP4_CONFIG, NMDHCP4Config))
#define NM_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP4_CONFIG, NMDHCP4ConfigClass))
......@@ -31,9 +33,9 @@
#define NM_IS_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP4_CONFIG))
#define NM_DHCP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP4_CONFIG, NMDHCP4ConfigClass))
typedef struct {
struct _NMDHCP4Config {
GObject parent;
} NMDHCP4Config;
};
typedef struct {
GObjectClass parent;
......
......@@ -24,6 +24,8 @@
#include <glib.h>
#include <glib-object.h>
#include "nm-types.h"
#define NM_TYPE_DHCP6_CONFIG (nm_dhcp6_config_get_type ())
#define NM_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP6_CONFIG, NMDHCP6Config))
#define NM_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP6_CONFIG, NMDHCP6ConfigClass))
......@@ -31,9 +33,9 @@
#define NM_IS_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP6_CONFIG))
#define NM_DHCP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP6_CONFIG, NMDHCP6ConfigClass))
typedef struct {
struct _NMDHCP6Config {
GObject parent;
} NMDHCP6Config;
};
typedef struct {
GObjectClass parent;
......
......@@ -30,6 +30,9 @@
#include "nm-utils.h"
#include "nm-logging.h"
#include "nm-dbus-manager.h"
#include "nm-device.h"
#include "nm-dhcp4-config.h"
#include "nm-dhcp6-config.h"
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
......
......@@ -25,9 +25,7 @@
#include <glib.h>
#include <stdio.h>
#include "nm-device.h"
#include "nm-ip4-config.h"
#include "nm-ip6-config.h"
#include "nm-types.h"
#include "nm-connection.h"
typedef enum {
......
......@@ -23,7 +23,7 @@
#include <glib-object.h>
#include "nm-platform.h"
#include "nm-types.h"
#include "nm-setting-ip4-config.h"
#define NM_TYPE_IP4_CONFIG (nm_ip4_config_get_type ())
......@@ -33,9 +33,9 @@
#define NM_IS_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP4_CONFIG))
#define NM_IP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
typedef struct {
struct _NMIP4Config {
GObject parent;
} NMIP4Config;
};
typedef struct {
GObjectClass parent;
......
......@@ -23,7 +23,7 @@
#include <glib-object.h>
#include "nm-platform.h"
#include "nm-types.h"
#include "nm-setting-ip6-config.h"
#define NM_TYPE_IP6_CONFIG (nm_ip6_config_get_type ())
......@@ -33,9 +33,9 @@
#define NM_IS_IP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP6_CONFIG))
#define NM_IP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP6_CONFIG, NMIP6ConfigClass))
typedef struct {
struct _NMIP6Config {
GObject parent;
} NMIP6Config;
};
typedef struct {
GObjectClass parent;
......
......@@ -32,6 +32,7 @@
#include "nm-logging.h"
#include "nm-dbus-manager.h"
#include "nm-auth-subject.h"
#include "nm-session-monitor.h"
struct NMAuthChain {
guint32 refcount;
......
......@@ -25,9 +25,7 @@
#include <dbus/dbus-glib.h>
#include <nm-connection.h>
#include "nm-dbus-manager.h"
#include "nm-session-monitor.h"
#include "nm-auth-subject.h"
#include "nm-types.h"
#define NM_AUTH_PERMISSION_ENABLE_DISABLE_NETWORK "org.freedesktop.NetworkManager.enable-disable-network"
#define NM_AUTH_PERMISSION_SLEEP_WAKE "org.freedesktop.NetworkManager.sleep-wake"
......
......@@ -68,7 +68,9 @@
#include "nm-sleep-monitor.h"
#include "nm-connectivity.h"
#include "nm-policy.h"
#include "nm-connection-provider.h"
#include "nm-session-monitor.h"
#include "nm-activation-request.h"
#define NM_AUTOIP_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd"
#define NM_AUTOIP_DBUS_IFACE "org.freedesktop.nm_avahi_autoipd"
......
......@@ -25,9 +25,9 @@
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
#include "nm-device.h"
#include "nm-settings.h"
#include "nm-auth-subject.h"
#include "nm-types.h"
#include "nm-connection.h"
#define NM_TYPE_MANAGER (nm_manager_get_type ())
#define NM_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_MANAGER, NMManager))
......@@ -77,9 +77,9 @@ typedef enum {
#define NM_MANAGER_ACTIVE_CONNECTION_REMOVED "active-connection-removed"
typedef struct {
struct _NMManager {
GObject parent;
} NMManager;
};
typedef struct {
GObjectClass parent;
......
......@@ -43,6 +43,11 @@
#include "nm-dispatcher.h"
#include "nm-utils.h"
#include "nm-glib-compat.h"
#include "nm-manager.h"
#include "nm-settings.h"
#include "nm-settings-connection.h"
#include "nm-dhcp4-config.h"
#include "nm-dhcp6-config.h"
typedef struct {
NMManager *manager;
......
......@@ -22,8 +22,7 @@
#ifndef NM_POLICY_H
#define NM_POLICY_H
#include "nm-manager.h"
#include "nm-settings.h"
#include "nm-types.h"
#define NM_TYPE_POLICY (nm_policy_get_type ())
#define NM_POLICY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_POLICY, NMPolicy))
......@@ -37,9 +36,9 @@
#define NM_POLICY_ACTIVATING_IP4_DEVICE "activating-ip4-device"
#define NM_POLICY_ACTIVATING_IP6_DEVICE "activating-ip6-device"
typedef struct {
struct _NMPolicy {
GObject parent;
} NMPolicy;
};
typedef struct {
GObjectClass parent;
......
......@@ -21,6 +21,8 @@
#include <glib-object.h>
#include "nm-types.h"
#ifndef NM_RFKILL_MANAGER_H
#define NM_RFKILL_MANAGER_H
......@@ -51,9 +53,9 @@ typedef enum {
#define NM_IS_RFKILL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_RFKILL_MANAGER))
#define NM_RFKILL_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_RFKILL_MANAGER, NMRfkillManagerClass))
typedef struct {
struct _NMRfkillManager {
GObject parent;
} NMRfkillManager;
};
typedef struct {
GObjectClass parent;
......
......@@ -23,6 +23,8 @@
#include <glib-object.h>
#include "nm-types.h"
G_BEGIN_DECLS
#define NM_TYPE_SESSION_MONITOR (nm_session_monitor_get_type ())
......@@ -34,7 +36,6 @@ G_BEGIN_DECLS
#define NM_SESSION_MONITOR_CHANGED "changed"
typedef struct _NMSessionMonitor NMSessionMonitor;
typedef struct _NMSessionMonitorClass NMSessionMonitorClass;
GType nm_session_monitor_get_type (void) G_GNUC_CONST;
......
......@@ -22,6 +22,8 @@
#include <glib-object.h>
#include "nm-types.h"
G_BEGIN_DECLS
#define NM_TYPE_SLEEP_MONITOR (nm_sleep_monitor_get_type ())
......@@ -34,7 +36,6 @@ G_BEGIN_DECLS
#define NM_SLEEP_MONITOR_SLEEPING "sleeping"
#define NM_SLEEP_MONITOR_RESUMING "resuming"
typedef struct _NMSleepMonitor NMSleepMonitor;
typedef struct _NMSleepMonitorClass NMSleepMonitorClass;
GType nm_sleep_monitor_get_type (void) G_GNUC_CONST;
......
......@@ -21,6 +21,35 @@
#ifndef NM_TYPES_H
#define NM_TYPES_H
typedef struct _NMDevice NMDevice;
/* core */
typedef struct _NMActiveConnection NMActiveConnection;
typedef struct _NMActRequest NMActRequest;
typedef struct _NMAuthSubject NMAuthSubject;
typedef struct _NMConnectionProvider NMConnectionProvider;
typedef struct _NMConnectivity NMConnectivity;
typedef struct _NMDBusManager NMDBusManager;
typedef struct _NMDevice NMDevice;
typedef struct _NMDHCP4Config NMDHCP4Config;
typedef struct _NMDHCP6Config NMDHCP6Config;
typedef struct _NMIP4Config NMIP4Config;
typedef struct _NMIP6Config NMIP6Config;
typedef struct _NMManager NMManager;
typedef struct _NMPolicy NMPolicy;
typedef struct _NMRfkillManager NMRfkillManager;
typedef struct _NMSessionMonitor NMSessionMonitor;
typedef struct _NMSleepMonitor NMSleepMonitor;
/* platform */
typedef struct _NMPlatformIP4Address NMPlatformIP4Address;
typedef struct _NMPlatformIP4Route NMPlatformIP4Route;
typedef struct _NMPlatformIP6Address NMPlatformIP6Address;
typedef struct _NMPlatformIP6Route NMPlatformIP6Route;
typedef struct _NMPlatformLink NMPlatformLink;
/* settings */
typedef struct _NMAgentManager NMAgentManager;
typedef struct _NMSecretAgent NMSecretAgent;
typedef struct _NMSettings NMSettings;
typedef struct _NMSettingsConnection NMSettingsConnection;