2006-11-25 Dan Williams <dcbw@redhat.com>

* src/supplicant-manager/nm-supplicant-types.h
		- new file; move all supplicant manager object typedefs here for
			#include sanity

	* src/supplicant-manager/nm-supplicant-interface.c
	  src/supplicant-manager/nm-supplicant-interface.h
		- new file; an object that interfaces an NMDevice object to the
			supplicant and handles signals from the supplicant.  This object
			does all necessary DBus communication with wpa_supplicant.

	* src/supplicant-manager/nm-supplicant-manager.c
	  src/supplicant-manager/nm-supplicant-manager.h
		- Actually do something.  Track the state of the wpa_supplicant service
			and deal with its comings & goings.  Handle life events of
			supplicant interfaces too.
		- Move NMSupplicantManager typedef to nm-supplicant-types.h

	* src/supplicant-manager/nm-supplicant-connection.h
		- Move NMSupplicantConnection typedef to nm-supplicant-types.h

	* src/supplicant-manager/Makefile.am
		- Add new files to build, and add libnm-util to includes

	* src/nm-marshal.list
		- New marshaler type: VOID:UINT,UINT

	* src/nm-device-802-3-ethernet.c
		- (real_init): grab a supplicant interface
		- (nm_device_802_3_ethernet_dispose): release the supplicant interface
		- (supplicant_iface_state_cb): new function, stub for handling
			supplicant interface state changes

	* src/nm-device-802-11-wireless.c
		- (real_init): grab a supplicant interface
		- (nm_device_802_11_wireless_dispose): release the supplicant interface
		- (supplicant_iface_state_cb): new function, stub for handling
			supplicant interface state changes

	* src/NetworkManager.c
		- (main): create and keep the supplicant manager around for the lifetime
			of NetworkManager

	* src/Makefile.am
		- Link to the supplicant manager sub-library and use the supplicant
			manager includes


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2125 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2006-11-25 15:41:04 +00:00
parent 81c31e820a
commit 4bc25ba3bf
13 changed files with 1296 additions and 18 deletions

View File

@@ -55,6 +55,7 @@
#include "nm-dbus-nm.h"
#include "nm-dbus-manager.h"
#include "nm-dbus-device.h"
#include "nm-supplicant-manager.h"
#include "nm-dbus-net.h"
#include "nm-netlink-monitor.h"
#include "nm-dhcp-manager.h"
@@ -743,6 +744,7 @@ main (int argc, char *argv[])
char * user_pidfile = NULL;
NMDBusManager * dbus_mgr;
DBusConnection *dbus_connection;
NMSupplicantManager * sup_mgr = NULL;
int exit_status = EXIT_FAILURE;
guint32 id;
@@ -846,6 +848,13 @@ main (int argc, char *argv[])
nm_dbus_manager_register_method_list (dbus_mgr, nm_data->device_methods);
nm_data->net_methods = nm_dbus_net_methods_setup (nm_data);
/* Initialize the supplicant manager */
sup_mgr = nm_supplicant_manager_get ();
if (!sup_mgr) {
nm_error ("Failed to initialize the supplicant manager.");
goto done;
}
nm_data->vpn_manager = nm_vpn_manager_new (nm_data);
if (!nm_data->vpn_manager) {
nm_warning ("Failed to start the VPN manager.");
@@ -907,6 +916,10 @@ done:
nm_dbus_manager_remove_signal_handler (dbus_mgr, nm_data->nmi_sig_handler_id);
nm_data_free (nm_data);
if (sup_mgr)
g_object_unref (sup_mgr);
/* nm_data_free needs the dbus connection, so must kill the
* dbus manager after that.
*/