From da8e21a7d747d0b36debf411457a0439511698bc Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 18 Nov 2011 00:40:31 -0600 Subject: [PATCH] core: kill NMDeviceInterface --- src/Makefile.am | 2 - src/modem-manager/nm-modem.c | 1 - src/nm-device-bt.c | 1 - src/nm-device-ethernet.c | 1 - src/nm-device-infiniband.c | 1 - src/nm-device-interface.c | 70 ----------------------------- src/nm-device-interface.h | 43 ------------------ src/nm-device-modem.c | 1 - src/nm-device-olpc-mesh.c | 1 - src/nm-device-wifi.c | 1 - src/nm-device-wired.c | 1 - src/nm-device.c | 1 - src/nm-manager.c | 3 +- src/nm-manager.h | 1 - src/nm-policy.c | 1 - src/vpn-manager/nm-vpn-connection.c | 1 - src/wimax/nm-device-wimax.c | 1 - 17 files changed, 1 insertion(+), 130 deletions(-) delete mode 100644 src/nm-device-interface.c delete mode 100644 src/nm-device-interface.h diff --git a/src/Makefile.am b/src/Makefile.am index 9685cc0e63..821d220624 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -115,8 +115,6 @@ NetworkManager_SOURCES = \ nm-call-store.h \ nm-device.c \ nm-device.h \ - nm-device-interface.c \ - nm-device-interface.h \ nm-device-private.h \ nm-device-ethernet.c \ nm-device-ethernet.h \ diff --git a/src/modem-manager/nm-modem.c b/src/modem-manager/nm-modem.c index 8eafe1933e..3459612cdb 100644 --- a/src/modem-manager/nm-modem.c +++ b/src/modem-manager/nm-modem.c @@ -30,7 +30,6 @@ #include "nm-logging.h" #include "NetworkManagerUtils.h" #include "nm-device-private.h" -#include "nm-device-interface.h" #include "nm-dbus-glib-types.h" G_DEFINE_TYPE (NMModem, nm_modem, G_TYPE_OBJECT) diff --git a/src/nm-device-bt.c b/src/nm-device-bt.c index 124cbdfc0d..a67610ad97 100644 --- a/src/nm-device-bt.c +++ b/src/nm-device-bt.c @@ -31,7 +31,6 @@ #include "nm-bluez-common.h" #include "nm-dbus-manager.h" #include "nm-device-bt.h" -#include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-logging.h" #include "nm-marshal.h" diff --git a/src/nm-device-ethernet.c b/src/nm-device-ethernet.c index 5b74c5a0d0..a508fb6a5e 100644 --- a/src/nm-device-ethernet.c +++ b/src/nm-device-ethernet.c @@ -40,7 +40,6 @@ #include "nm-glib-compat.h" #include "nm-device-ethernet.h" -#include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-activation-request.h" #include "NetworkManagerUtils.h" diff --git a/src/nm-device-infiniband.c b/src/nm-device-infiniband.c index f69f7c1b31..4865163c73 100644 --- a/src/nm-device-infiniband.c +++ b/src/nm-device-infiniband.c @@ -27,7 +27,6 @@ #include #include "nm-device-infiniband.h" -#include "nm-device-interface.h" #include "nm-logging.h" #include "nm-properties-changed-signal.h" #include "nm-utils.h" diff --git a/src/nm-device-interface.c b/src/nm-device-interface.c deleted file mode 100644 index 15f511a4e8..0000000000 --- a/src/nm-device-interface.c +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- 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) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2010 Red Hat, Inc. - */ - -#include - -#include "nm-marshal.h" -#include "nm-setting-connection.h" -#include "nm-device-interface.h" -#include "nm-logging.h" -#include "nm-properties-changed-signal.h" -#include "nm-rfkill.h" - -static void -nm_device_interface_init (gpointer g_iface) -{ - static gboolean initialized = FALSE; - - if (initialized) - return; - /* Signals */ - initialized = TRUE; -} - - -GType -nm_device_interface_get_type (void) -{ - static GType device_interface_type = 0; - - if (!device_interface_type) { - const GTypeInfo device_interface_info = { - sizeof (NMDeviceInterface), /* class_size */ - nm_device_interface_init, /* base_init */ - NULL, /* base_finalize */ - NULL, - NULL, /* class_finalize */ - NULL, /* class_data */ - 0, - 0, /* n_preallocs */ - NULL - }; - - device_interface_type = g_type_register_static (G_TYPE_INTERFACE, - "NMDeviceInterface", - &device_interface_info, 0); - - g_type_interface_add_prerequisite (device_interface_type, G_TYPE_OBJECT); - } - - return device_interface_type; -} - diff --git a/src/nm-device-interface.h b/src/nm-device-interface.h deleted file mode 100644 index 342a33d703..0000000000 --- a/src/nm-device-interface.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- 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) 2007 - 2008 Novell, Inc. - * Copyright (C) 2007 - 2010 Red Hat, Inc. - */ - -#ifndef NM_DEVICE_INTERFACE_H -#define NM_DEVICE_INTERFACE_H - -#include -#include "NetworkManager.h" -#include "nm-connection.h" -#include "nm-activation-request.h" - -#define NM_TYPE_DEVICE_INTERFACE (nm_device_interface_get_type ()) -#define NM_DEVICE_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_INTERFACE, NMDeviceInterface)) -#define NM_IS_DEVICE_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_INTERFACE)) -#define NM_DEVICE_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NM_TYPE_DEVICE_INTERFACE, NMDeviceInterface)) - -typedef struct _NMDeviceInterface NMDeviceInterface; - -struct _NMDeviceInterface { - GTypeInterface g_iface; -}; - -GType nm_device_interface_get_type (void); - -#endif /* NM_DEVICE_INTERFACE_H */ diff --git a/src/nm-device-modem.c b/src/nm-device-modem.c index edfec0ab2c..8689a88015 100644 --- a/src/nm-device-modem.c +++ b/src/nm-device-modem.c @@ -21,7 +21,6 @@ #include #include "nm-device-modem.h" -#include "nm-device-interface.h" #include "nm-modem.h" #include "nm-modem-cdma.h" #include "nm-modem-gsm.h" diff --git a/src/nm-device-olpc-mesh.c b/src/nm-device-olpc-mesh.c index 17e43e66df..007b818e95 100644 --- a/src/nm-device-olpc-mesh.c +++ b/src/nm-device-olpc-mesh.c @@ -43,7 +43,6 @@ #include "nm-device.h" #include "nm-device-wifi.h" #include "nm-device-olpc-mesh.h" -#include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-utils.h" #include "nm-logging.h" diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index be7e9a91d3..ad23790865 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -39,7 +39,6 @@ #include "nm-glib-compat.h" #include "nm-device.h" #include "nm-device-wifi.h" -#include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-utils.h" #include "nm-logging.h" diff --git a/src/nm-device-wired.c b/src/nm-device-wired.c index 5a26ec6e11..03ca0d2e10 100644 --- a/src/nm-device-wired.c +++ b/src/nm-device-wired.c @@ -27,7 +27,6 @@ #include #include "nm-device-wired.h" -#include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-dhcp-manager.h" #include "nm-logging.h" diff --git a/src/nm-device.c b/src/nm-device.c index 1285db0624..12fb63ca08 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -36,7 +36,6 @@ #include #include "nm-glib-compat.h" -#include "nm-device-interface.h" #include "nm-device.h" #include "nm-device-private.h" #include "NetworkManagerUtils.h" diff --git a/src/nm-manager.c b/src/nm-manager.c index 44b976d9ba..790322bd5b 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -38,7 +38,6 @@ #include "nm-vpn-manager.h" #include "nm-modem-manager.h" #include "nm-device-bt.h" -#include "nm-device-interface.h" #include "nm-device.h" #include "nm-device-ethernet.h" #include "nm-device-wifi.h" @@ -1171,7 +1170,7 @@ manager_update_radio_enabled (NMManager *self, } static void -manager_hidden_ap_found (NMDeviceInterface *device, +manager_hidden_ap_found (NMDevice *device, NMAccessPoint *ap, gpointer user_data) { diff --git a/src/nm-manager.h b/src/nm-manager.h index 4e8d67e497..f2c0e5b5b9 100644 --- a/src/nm-manager.h +++ b/src/nm-manager.h @@ -26,7 +26,6 @@ #include #include #include "nm-device.h" -#include "nm-device-interface.h" #include "nm-settings.h" #define NM_TYPE_MANAGER (nm_manager_get_type ()) diff --git a/src/nm-policy.c b/src/nm-policy.c index f24b70b423..306695d636 100644 --- a/src/nm-policy.c +++ b/src/nm-policy.c @@ -31,7 +31,6 @@ #include "nm-wifi-ap.h" #include "nm-activation-request.h" #include "nm-logging.h" -#include "nm-device-interface.h" #include "nm-device.h" #include "nm-device-wifi.h" #include "nm-device-ethernet.h" diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index 397f8057d0..eb8180200d 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -30,7 +30,6 @@ #include "NetworkManager.h" #include "NetworkManagerVPN.h" #include "nm-vpn-connection.h" -#include "nm-device-interface.h" #include "nm-setting-connection.h" #include "nm-setting-vpn.h" #include "nm-setting-ip4-config.h" diff --git a/src/wimax/nm-device-wimax.c b/src/wimax/nm-device-wimax.c index cbda77587d..6e374e23db 100644 --- a/src/wimax/nm-device-wimax.c +++ b/src/wimax/nm-device-wimax.c @@ -33,7 +33,6 @@ #include "nm-device-wimax.h" #include "nm-wimax-util.h" #include "nm-logging.h" -#include "nm-device-interface.h" #include "nm-device-private.h" #include "nm-system.h" #include "NetworkManagerUtils.h"