2007-08-28 Dan Williams <dcbw@redhat.com>
authorDan Williams <dcbw@redhat.com>
Tue, 28 Aug 2007 15:54:55 +0000 (15:54 +0000)
committerDan Williams <dcbw@redhat.com>
Tue, 28 Aug 2007 15:54:55 +0000 (15:54 +0000)
* src/NetworkManagerSystem.h
  src/nm-device.c
  src/nm-device.h
  src/nm-hal-manager.c
  src/NetworkManager.c
  src/nm-device-802-11-wireless.c
  src/nm-hal-manager.h
  src/nm-device-802-3-ethernet.c
  src/vpn-manager/nm-vpn-service.h
  src/vpn-manager/nm-vpn-manager.c
  src/vpn-manager/nm-vpn-manager.h
  src/vpn-manager/nm-vpn-service.c
  src/nm-device-802-11-wireless.h
  src/NetworkManagerMain.h
  src/nm-device-802-3-ethernet.h
  src/backends/NetworkManagerGentoo.c
  src/backends/NetworkManagerPaldo.c
  src/backends/NetworkManagerFrugalware.c
  src/backends/NetworkManagerRedHat.c
  src/backends/NetworkManagerSlackware.c
  src/backends/NetworkManagerGeneric.c
  src/backends/NetworkManagerArch.c
  src/backends/NetworkManagerSuSE.c
  src/backends/NetworkManagerGeneric.h
  src/backends/NetworkManagerDebian.c
- Kill NMData

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2742 4912f4e0-d625-0410-9fb7-b9a5a253dbdc

26 files changed:
ChangeLog
src/NetworkManager.c
src/NetworkManagerMain.h
src/NetworkManagerSystem.h
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerDebian.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerGeneric.c
src/backends/NetworkManagerGeneric.h
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerSuSE.c
src/nm-device-802-11-wireless.c
src/nm-device-802-11-wireless.h
src/nm-device-802-3-ethernet.c
src/nm-device-802-3-ethernet.h
src/nm-device.c
src/nm-device.h
src/nm-hal-manager.c
src/nm-hal-manager.h
src/vpn-manager/nm-vpn-manager.c
src/vpn-manager/nm-vpn-manager.h
src/vpn-manager/nm-vpn-service.c
src/vpn-manager/nm-vpn-service.h

index 75d195d..0795572 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,34 @@
 2007-08-28  Dan Williams  <dcbw@redhat.com>
 
+       * src/NetworkManagerSystem.h
+         src/nm-device.c
+         src/nm-device.h
+         src/nm-hal-manager.c
+         src/NetworkManager.c
+         src/nm-device-802-11-wireless.c
+         src/nm-hal-manager.h
+         src/nm-device-802-3-ethernet.c
+         src/vpn-manager/nm-vpn-service.h
+         src/vpn-manager/nm-vpn-manager.c
+         src/vpn-manager/nm-vpn-manager.h
+         src/vpn-manager/nm-vpn-service.c
+         src/nm-device-802-11-wireless.h
+         src/NetworkManagerMain.h
+         src/nm-device-802-3-ethernet.h
+         src/backends/NetworkManagerGentoo.c
+         src/backends/NetworkManagerPaldo.c
+         src/backends/NetworkManagerFrugalware.c
+         src/backends/NetworkManagerRedHat.c
+         src/backends/NetworkManagerSlackware.c
+         src/backends/NetworkManagerGeneric.c
+         src/backends/NetworkManagerArch.c
+         src/backends/NetworkManagerSuSE.c
+         src/backends/NetworkManagerGeneric.h
+         src/backends/NetworkManagerDebian.c
+               - Kill NMData
+
+2007-08-28  Dan Williams  <dcbw@redhat.com>
+
        * src/NetworkManagerMain.h
          src/nm-device-802-11-wireless.c
          src/NetworkManager.c
index 9174bec..b79709e 100644 (file)
@@ -65,9 +65,6 @@
  */
 static NMManager *manager = NULL;
 static GMainLoop *main_loop = NULL;
-static NMData *nm_data = NULL;
-
-static void nm_data_free (NMData *data);
 
 static void
 nm_error_monitoring_device_link_state (NMNetlinkMonitor *monitor,
@@ -108,35 +105,6 @@ nm_monitor_setup (void)
        return TRUE;
 }
 
-/*
- * nm_data_new
- *
- * Create data structure used in callbacks from libhal.
- *
- */
-static NMData *nm_data_new (void)
-{
-       NMData * data;
-
-       data = g_slice_new0 (NMData);
-
-       return data;
-}
-
-
-/*
- * nm_data_free
- *
- *   Free data structure used in callbacks.
- *
- */
-static void nm_data_free (NMData *data)
-{
-       g_return_if_fail (data != NULL);
-
-       g_slice_free (NMData, data);
-}
-
 static void
 nm_name_owner_changed_handler (NMDBusManager *mgr,
                                const char *name,
@@ -144,7 +112,6 @@ nm_name_owner_changed_handler (NMDBusManager *mgr,
                                const char *new,
                                gpointer user_data)
 {
-       NMData * data = (NMData *) user_data;
        gboolean old_owner_good = (old && (strlen (old) > 0));
        gboolean new_owner_good = (new && (strlen (new) > 0));
 
@@ -286,11 +253,11 @@ main (int argc, char *argv[])
        gboolean                show_usage = FALSE;
        char *          pidfile = NULL;
        char *          user_pidfile = NULL;
-       NMPolicy *policy;
+       NMPolicy *policy = NULL;
        NMHalManager *hal_manager = NULL;
        NMVPNManager *vpn_manager = NULL;
        NMNamedManager *named_mgr = NULL;
-       NMDBusManager * dbus_mgr;
+       NMDBusManager * dbus_mgr = NULL;
        DBusConnection *dbus_connection;
        NMSupplicantManager * sup_mgr = NULL;
        int                     exit_status = EXIT_FAILURE;
@@ -362,13 +329,6 @@ main (int argc, char *argv[])
        nm_system_init ();
        main_loop = g_main_loop_new (NULL, FALSE);
 
-       /* Initialize our instance data */
-       nm_data = nm_data_new ();
-       if (!nm_data) {
-               nm_error ("Failed to initialize.");
-               goto pidfile;
-       }
-
        /* Create watch functions that monitor cards for link status. */
        if (!nm_monitor_setup ())
                goto done;
@@ -387,11 +347,19 @@ main (int argc, char *argv[])
        g_signal_connect (dbus_mgr,
                                          "name-owner-changed",
                          G_CALLBACK (nm_name_owner_changed_handler),
-                                         nm_data);
+                                         NULL);
 
        manager = nm_manager_new ();
-       g_object_set_data (G_OBJECT (manager), "NM_DATA_HACK", nm_data);
+       if (manager == NULL) {
+               nm_error ("Failed to initialize the network manager.");
+               goto done;
+       }
+
        policy = nm_policy_new (manager);
+       if (policy == NULL) {
+               nm_error ("Failed to initialize the policy.");
+               goto done;
+       }
 
        nm_dbus_manager_register_signal_handler (dbus_mgr,
                                                                                         NMI_DBUS_INTERFACE,
@@ -406,7 +374,7 @@ main (int argc, char *argv[])
                goto done;
        }
 
-       vpn_manager = nm_vpn_manager_new (manager, nm_data);
+       vpn_manager = nm_vpn_manager_new (manager);
        if (!vpn_manager) {
                nm_warning ("Failed to start the VPN manager.");
                goto done;
@@ -424,7 +392,7 @@ main (int argc, char *argv[])
                goto done;
        }
 
-       hal_manager = nm_hal_manager_new (manager, nm_data);
+       hal_manager = nm_hal_manager_new (manager);
        if (!hal_manager)
                goto done;
 
@@ -454,8 +422,6 @@ done:
        if (manager)
                g_object_unref (manager);
 
-       nm_data_free (nm_data);
-
        if (sup_mgr)
                g_object_unref (sup_mgr);
 
@@ -465,7 +431,6 @@ done:
        g_object_unref (dbus_mgr);
        nm_logging_shutdown ();
 
-pidfile:
        if (pidfile)
                unlink (pidfile);
        g_free (pidfile);
index d0a5110..0c61b57 100644 (file)
@@ -32,8 +32,4 @@
 typedef struct NMVPNActRequest NMVPNActRequest;
 typedef struct NMVPNManager NMVPNManager;
 
-typedef struct NMData
-{
-} NMData;
-
 #endif
index fdc34c9..4752585 100644 (file)
@@ -27,8 +27,6 @@
 #include "nm-ip4-config.h"
 #include "nm-named-manager.h"
 
-struct NMData;
-
 /* Prototypes for system/distribution dependent functions,
  * implemented in the backend files in backends/ directory
  */
@@ -56,7 +54,7 @@ void                  nm_system_update_dns                                    (void);
 void                   nm_system_restart_mdns_responder                        (void);
 void                   nm_system_device_add_ip6_link_address           (NMDevice *dev);
 
-void *         nm_system_device_get_system_config                      (NMDevice *dev, struct NMData *data);
+void *         nm_system_device_get_system_config                      (NMDevice *dev);
 void                   nm_system_device_free_system_config             (NMDevice *dev, void *system_config_data);
 NMIP4Config *  nm_system_device_new_ip4_system_config          (NMDevice *dev);
 
index 8d156d9..a99800c 100644 (file)
@@ -527,7 +527,7 @@ typedef struct ArchSystemConfigData
  * info before setting stuff too.
  *
  */
-void* nm_system_device_get_system_config (NMDevice * dev, NMData *app_data)
+void* nm_system_device_get_system_config (NMDevice * dev)
 {
 
        GHashTable* ifh;
index c049ce9..cbe7632 100644 (file)
@@ -247,7 +247,7 @@ typedef struct DebSystemConfigData
  * info before setting stuff too.
  *
  */
-void* nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
+void* nm_system_device_get_system_config (NMDevice *dev)
 {
        DebSystemConfigData *   sys_data = NULL;
        if_block *curr_device;
index 5bcbb8d..4c4d2ed 100644 (file)
@@ -433,7 +433,7 @@ guint32 nm_system_get_mtu (NMDevice *dev)
  * Read in the config file for a device.
  *
  */
-void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
+void *nm_system_device_get_system_config (NMDevice *dev)
 {
        fwnet_profile_t *profile;
        fwnet_interface_t *interface;
index efd5e47..524f89e 100644 (file)
@@ -364,7 +364,7 @@ out:
  * info before setting stuff too.
  *
  */
-void* nm_generic_device_get_system_config (NMDevice *dev, NMData *app_data)
+void* nm_generic_device_get_system_config (NMDevice *dev)
 {
        return NULL;
 }
index e3aaffd..61e3cb9 100644 (file)
@@ -29,8 +29,6 @@
 #include "nm-ip4-config.h"
 #include "nm-named-manager.h"
 
-struct NMData;
-
 /* Prototypes for system/distribution dependent functions,
  * implemented in the backend files in backends/ directory
  */
@@ -59,7 +57,7 @@ void                  nm_generic_restart_mdns_responder                       (void);
 void                   nm_generic_device_add_ip6_link_address          (NMDevice *dev);
 
 void                   nm_generic_set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *ip4_config);
-void *         nm_generic_device_get_system_config                     (NMDevice *dev, struct NMData *data);
+void *         nm_generic_device_get_system_config                     (NMDevice *dev);
 void                   nm_generic_device_free_system_config            (NMDevice *dev, void *system_config_data);
 NMIP4Config *  nm_generic_device_new_ip4_system_config         (NMDevice *dev);
 
index c5fabd3..2e8647a 100644 (file)
@@ -258,7 +258,7 @@ typedef struct GentooSystemConfigData
  * info before setting stuff too.
  *
  */
-void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
+void *nm_system_device_get_system_config (NMDevice *dev)
 {
        char            *cfg_file_path = NULL;
        FILE            *file = NULL;
index 9b7eed0..05cd6d0 100644 (file)
@@ -406,7 +406,7 @@ static NMIP4Config *netdevice_file_get_ip4_config (GKeyFile *file)
  * Read in the config file for a device.
  *
  */
-void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
+void *nm_system_device_get_system_config (NMDevice *dev)
 {
        PaldoSystemConfigData   *sys_data = NULL;
        GKeyFile                                *file;
index a0aa2b4..decc691 100644 (file)
@@ -314,7 +314,7 @@ static char *get_current_profile_name (void)
  * Read in the config file for a device.
  *
  */
-void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
+void *nm_system_device_get_system_config (NMDevice *dev)
 {
        char *                          cfg_file_path = NULL;
        shvarFile *                     file;
index 5523c37..ec65900 100644 (file)
@@ -118,7 +118,7 @@ gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
  * info before setting stuff too.
  *
  */
-void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
+void *nm_system_device_get_system_config (NMDevice *dev)
 {
        return NULL;
 }
index 9423e69..287b7f2 100644 (file)
@@ -286,7 +286,7 @@ typedef struct SuSEDeviceConfigData
  * SuSE stores this information in /etc/sysconfig/network/ifcfg-*-<MAC address>
  *
  */
-void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
+void *nm_system_device_get_system_config (NMDevice *dev)
 {
        char *cfg_file_path = NULL;
        char mac[18];
index 4d24028..e627311 100644 (file)
@@ -411,7 +411,6 @@ constructor (GType type,
        GObject *object;
        NMDevice80211Wireless *self;
        NMDevice80211WirelessPrivate *priv;
-       NMData *app_data;
        const char *iface;
        NMSock *sk;
 
@@ -424,7 +423,6 @@ constructor (GType type,
        self = NM_DEVICE_802_11_WIRELESS (object);
        priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
 
-       app_data = nm_device_get_app_data (NM_DEVICE (self));
        iface = nm_device_get_iface (NM_DEVICE (self));
 
        if ((sk = nm_dev_sock_open (iface, DEV_WIRELESS, __FUNCTION__, NULL))) {
@@ -804,13 +802,9 @@ nm_device_802_11_wireless_get_best_ap (NMDevice80211Wireless *self)
        NMAccessPoint * cur_ap = NULL;
        NMActRequest *          req = NULL;
        GTimeVal                        best_timestamp = {0, 0};
-       NMData *                        app_data;
 
        g_return_val_if_fail (self != NULL, NULL);
 
-       app_data = nm_device_get_app_data (NM_DEVICE (self));
-       g_assert (app_data);
-
        if (!(ap_list = nm_device_802_11_wireless_ap_list_get (self)))
                return NULL;
 
@@ -887,12 +881,8 @@ nm_device_802_11_wireless_set_activation_ap (NMDevice80211Wireless *self,
 {
        NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
        NMAccessPoint           *ap = NULL;
-       NMData *                        app_data;
        NMAccessPointList *     dev_ap_list;
 
-       app_data = nm_device_get_app_data (NM_DEVICE (self));
-       g_assert (app_data);
-
        nm_debug ("Forcing AP '%s'", nm_utils_escape_ssid (ssid->data, ssid->len));
 
        /* Find the AP in our card's scan list first.
@@ -1978,15 +1968,11 @@ supplicant_iface_scanned_ap_cb (NMSupplicantInterface * iface,
                                 NMDevice80211Wireless * self)
 {
        NMAccessPoint *ap;
-       NMData *app_data;
 
        g_return_if_fail (self != NULL);
        g_return_if_fail (properties != NULL);
        g_return_if_fail (iface != NULL);
 
-       if (!(app_data = nm_device_get_app_data (NM_DEVICE (self))))
-               return;
-
        ap = nm_ap_new_from_properties (properties);
        if (!ap)
                return;
@@ -2838,14 +2824,10 @@ activation_success_handler (NMDevice *dev)
 static void
 activation_failure_handler (NMDevice *dev)
 {
-       NMData *                        app_data;
        NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
        NMAccessPoint * ap;
        const GByteArray * ssid;
 
-       app_data = nm_device_get_app_data (dev);
-       g_assert (app_data);
-
        if ((ap = nm_device_802_11_wireless_get_activation_ap (self)))
        {
                if (nm_ap_get_artificial (ap))
@@ -3090,21 +3072,18 @@ NMDevice80211Wireless *
 nm_device_802_11_wireless_new (int index,
                                                           const char *udi,
                                                           const char *driver,
-                                                          gboolean test_dev,
-                                                          NMData *app_data)
+                                                          gboolean test_dev)
 {
        GObject *obj;
 
        g_return_val_if_fail (index >= 0, NULL);
        g_return_val_if_fail (udi != NULL, NULL);
        g_return_val_if_fail (driver != NULL, NULL);
-       g_return_val_if_fail (app_data != NULL, NULL);
 
        obj = g_object_new (NM_TYPE_DEVICE_802_11_WIRELESS,
                                                NM_DEVICE_INTERFACE_UDI, udi,
                                                NM_DEVICE_INTERFACE_INDEX, index,
                                                NM_DEVICE_INTERFACE_DRIVER, driver,
-                                               NM_DEVICE_INTERFACE_APP_DATA, app_data,
                                                NULL);
        if (obj == NULL)
                return NULL;
index b335495..5214ba4 100644 (file)
@@ -80,8 +80,7 @@ GType nm_device_802_11_wireless_get_type (void);
 NMDevice80211Wireless *nm_device_802_11_wireless_new (int index,
                                                                                                          const char *udi,
                                                                                                          const char *driver,
-                                                                                                         gboolean test_dev,
-                                                                                                         NMData *app_data);
+                                                                                                         gboolean test_dev);
 
 void                   nm_device_802_11_wireless_set_ssid (NMDevice80211Wireless *self,
                                                                                  const GByteArray * ssid);
index f043635..5e8fd37 100644 (file)
@@ -244,21 +244,18 @@ NMDevice8023Ethernet *
 nm_device_802_3_ethernet_new (int index,
                                                          const char *udi,
                                                          const char *driver,
-                                                         gboolean test_dev,
-                                                         NMData *app_data)
+                                                         gboolean test_dev)
 {
        GObject *obj;
 
        g_return_val_if_fail (index >= 0, NULL);
        g_return_val_if_fail (udi != NULL, NULL);
        g_return_val_if_fail (driver != NULL, NULL);
-       g_return_val_if_fail (app_data != NULL, NULL);
 
        obj = g_object_new (NM_TYPE_DEVICE_802_3_ETHERNET,
                                                NM_DEVICE_INTERFACE_UDI, udi,
                                                NM_DEVICE_INTERFACE_INDEX, index,
                                                NM_DEVICE_INTERFACE_DRIVER, driver,
-                                               NM_DEVICE_INTERFACE_APP_DATA, app_data,
                                                NULL);
        if (obj == NULL)
                return NULL;
index 1dda994..352cef2 100644 (file)
@@ -55,8 +55,7 @@ GType nm_device_802_3_ethernet_get_type (void);
 NMDevice8023Ethernet *nm_device_802_3_ethernet_new (int index,
                                                                                                        const char *udi,
                                                                                                        const char *driver,
-                                                                                                       gboolean test_dev,
-                                                                                                       NMData *app_data);
+                                                                                                       gboolean test_dev);
 
 void nm_device_802_3_ethernet_get_address (NMDevice8023Ethernet *dev,
                                                                   struct ether_addr *addr);
index 596e2b5..5fd86ef 100644 (file)
@@ -68,7 +68,6 @@ struct _NMDevicePrivate
        gboolean                        link_active;
        guint32                 ip4_address;
        struct in6_addr ip6_address;
-       NMData *                        app_data;
 
        NMActRequest *          act_request;
        guint           act_source_id;
@@ -121,7 +120,6 @@ nm_device_init (NMDevice * self)
        self->priv->link_active = FALSE;
        self->priv->ip4_address = 0;
        memset (&self->priv->ip6_address, 0, sizeof (struct in6_addr));
-       self->priv->app_data = NULL;
 
        self->priv->act_source_id = 0;
 
@@ -171,7 +169,7 @@ constructor (GType type,
        }
 
        /* Grab IP config data for this device from the system configuration files */
-       priv->system_config_data = nm_system_device_get_system_config (dev, priv->app_data);
+       priv->system_config_data = nm_system_device_get_system_config (dev);
 
        /* Allow distributions to flag devices as disabled */
        if (nm_system_device_get_disabled (dev)) {
@@ -342,19 +340,6 @@ real_get_type_capabilities (NMDevice *self)
 
 
 /*
- * nm_device_get_app_data
- *
- */
-struct NMData *
-nm_device_get_app_data (NMDevice *self)
-{
-       g_return_val_if_fail (self != NULL, FALSE);
-
-       return self->priv->app_data;
-}
-
-
-/*
  * nm_device_get_act_request
  *
  * Return the devices activation request, if any.
@@ -1481,9 +1466,6 @@ set_property (GObject *object, guint prop_id,
        case NM_DEVICE_INTERFACE_PROP_DRIVER:
                priv->driver = g_strdup (g_value_get_string (value));
                break;
-       case NM_DEVICE_INTERFACE_PROP_APP_DATA:
-               priv->app_data = g_value_get_pointer (value);
-               break;
        case NM_DEVICE_INTERFACE_PROP_CAPABILITIES:
                priv->capabilities = g_value_get_uint (value);
                break;
@@ -1515,9 +1497,6 @@ get_property (GObject *object, guint prop_id,
        case NM_DEVICE_INTERFACE_PROP_DRIVER:
                g_value_set_string (value, priv->driver);
                break;
-       case NM_DEVICE_INTERFACE_PROP_APP_DATA:
-               g_value_set_pointer (value, priv->app_data);
-               break;
        case NM_DEVICE_INTERFACE_PROP_CAPABILITIES:
                g_value_set_uint (value, priv->capabilities);
                break;
@@ -1599,10 +1578,6 @@ nm_device_class_init (NMDeviceClass *klass)
                                                                          NM_DEVICE_INTERFACE_STATE);
 
        g_object_class_override_property (object_class,
-                                                                         NM_DEVICE_INTERFACE_PROP_APP_DATA,
-                                                                         NM_DEVICE_INTERFACE_APP_DATA);
-
-       g_object_class_override_property (object_class,
                                                                          NM_DEVICE_INTERFACE_PROP_DEVICE_TYPE,
                                                                          NM_DEVICE_INTERFACE_DEVICE_TYPE);
 }
index 6aa7c2c..f0a960e 100644 (file)
@@ -120,8 +120,6 @@ NMDeviceType        nm_device_get_device_type       (NMDevice *dev);
 guint32                nm_device_get_capabilities      (NMDevice *dev);
 guint32                nm_device_get_type_capabilities (NMDevice *dev);
 
-struct NMData *        nm_device_get_app_data  (NMDevice *dev);
-
 gboolean               nm_device_has_active_link       (NMDevice *dev);
 guint32                        nm_device_get_ip4_address       (NMDevice *dev);
 void                           nm_device_update_ip4_address    (NMDevice *dev);
index 63a1751..754f930 100644 (file)
@@ -11,7 +11,6 @@ struct _NMHalManager {
        LibHalContext *hal_ctx;
        NMDBusManager *dbus_mgr;
        NMManager *nm_manager;
-       NMData *nm_data;
        GSList *device_creators;
 
        gboolean nm_sleeping;
@@ -118,7 +117,7 @@ wired_device_creator (NMHalManager *manager, const char *udi)
        }
 
        driver = nm_get_device_driver_name (manager->hal_ctx, udi);
-       device = (NMDevice *) nm_device_802_3_ethernet_new (idx, udi, driver, FALSE, manager->nm_data);
+       device = (NMDevice *) nm_device_802_3_ethernet_new (idx, udi, driver, FALSE);
        g_free (driver);
 
        return device;
@@ -159,7 +158,7 @@ wireless_device_creator (NMHalManager *manager, const char *udi)
        }
 
        driver = nm_get_device_driver_name (manager->hal_ctx, udi);
-       device = (NMDevice *) nm_device_802_11_wireless_new (idx, udi, driver, FALSE, manager->nm_data);
+       device = (NMDevice *) nm_device_802_11_wireless_new (idx, udi, driver, FALSE);
        g_free (driver);
 
        return device;
@@ -429,7 +428,7 @@ nm_manager_state_changed (NMManager *nm_manager, NMState state, gpointer user_da
 }
 
 NMHalManager *
-nm_hal_manager_new (NMManager *nm_manager, NMData *nm_data)
+nm_hal_manager_new (NMManager *nm_manager)
 {
        NMHalManager *manager;
        NMDBusManager *dbus_mgr;
@@ -445,7 +444,6 @@ nm_hal_manager_new (NMManager *nm_manager, NMData *nm_data)
        manager = g_slice_new0 (NMHalManager);
        manager->nm_manager = g_object_ref (nm_manager);
        manager->dbus_mgr = dbus_mgr;
-       manager->nm_data = nm_data;
 
        register_built_in_creators (manager);
 
index 06008ed..975e680 100644 (file)
@@ -6,7 +6,7 @@
 
 typedef struct _NMHalManager NMHalManager;
 
-NMHalManager *nm_hal_manager_new (NMManager *nm_manager, NMData *nm_data);
+NMHalManager *nm_hal_manager_new (NMManager *nm_manager);
 void nm_hal_manager_destroy (NMHalManager *manager);
 
 #endif /* NM_HAL_MANAGER_H */
index a2b413b..2c59654 100644 (file)
@@ -40,7 +40,6 @@
 struct NMVPNManager
 {
        NMManager *         nm_manager;
-       NMData *                        app_data;
        GHashTable *            service_table;
        GSList *                        connections;
 
@@ -103,17 +102,15 @@ nm_dbus_nmi_vpn_signal_handler (DBusConnection *connection,
  * Create a new VPN manager instance.
  *
  */
-NMVPNManager *nm_vpn_manager_new (NMManager *nm_manager, NMData *app_data)
+NMVPNManager *nm_vpn_manager_new (NMManager *nm_manager)
 {
        NMVPNManager *  manager;
        NMDBusManager * dbus_mgr;
 
        g_return_val_if_fail (NM_IS_MANAGER (nm_manager), NULL);
-       g_return_val_if_fail (app_data != NULL, NULL);
 
        manager = g_slice_new0 (NMVPNManager);
        manager->nm_manager = g_object_ref (nm_manager);
-       manager->app_data = app_data;
 
        manager->service_table = g_hash_table_new_full (g_str_hash,
                                                        g_str_equal,
@@ -680,7 +677,7 @@ load_services (NMVPNManager *manager, GHashTable *table)
                if (!lines)
                        goto free_file_path;
  
-               service = nm_vpn_service_new (manager, manager->app_data);
+               service = nm_vpn_service_new (manager);
                success = set_service_from_contents (lines, service, &err);
                g_strfreev (lines);
 
index ad79d94..035c871 100644 (file)
@@ -27,7 +27,7 @@
 #include "nm-vpn-service.h"
 
 
-NMVPNManager *         nm_vpn_manager_new                                              (NMManager *nm_manager, NMData *app_data);
+NMVPNManager *         nm_vpn_manager_new                                              (NMManager *nm_manager);
 NMVPNConnection *      nm_vpn_manager_add_connection                           (NMVPNManager *manager, const char *name, const char *service_name, const char *user_name);
 void                           nm_vpn_manager_remove_connection                        (NMVPNManager *manager, NMVPNConnection *vpn);
 char   **                      nm_vpn_manager_get_connection_names             (NMVPNManager *manager);
index 0754619..c3ca46a 100644 (file)
@@ -44,7 +44,6 @@ struct NMVPNService
 {
        int                             refcount;
        NMVPNManager *  manager;
-       NMData *                app_data;
        GPid                    pid;
        guint32         sig_handler_id;
        gulong                  watch_id;
@@ -95,13 +94,12 @@ static void print_vpn_config (NMIP4Config *config,
  * Create a new VPNService object
  *
  */
-NMVPNService *nm_vpn_service_new (NMVPNManager *manager, NMData *app_data)
+NMVPNService *nm_vpn_service_new (NMVPNManager *manager)
 {
        NMVPNService *service = g_malloc0 (sizeof (NMVPNService));
 
        service->refcount = 1;
        service->state = NM_VPN_SERVICE_STATE_SHUTDOWN;
-       service->app_data = app_data;
        service->manager = manager;
        service->dbus_mgr = nm_dbus_manager_get ();
 
index 840a278..f45afc5 100644 (file)
@@ -32,7 +32,7 @@
 typedef struct NMVPNService NMVPNService;
 
 
-NMVPNService * nm_vpn_service_new                              (NMVPNManager *manager, NMData *app_data);
+NMVPNService * nm_vpn_service_new                              (NMVPNManager *manager);
 
 void                   nm_vpn_service_ref                              (NMVPNService *service);
 void                   nm_vpn_service_unref                    (NMVPNService *service);