Commit Graph

7207 Commits

Author SHA1 Message Date
Dan Williams
03e118462b 2007-09-21 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (build_supplicant_config): wpa_supplicant requires the option
			key_mgmt=NONE for unencrypted networks
		- (real_act_stage2_config): clarify log message on activation



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2852 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-22 03:25:26 +00:00
Dan Williams
93b6fcea47 Fix build warnings
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2851 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-22 03:23:28 +00:00
Dan Williams
970bffc4bb Re-export nm_supplicant_config_add_option
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2850 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 21:49:15 +00:00
Dan Williams
e0dc6ad5ab Fix uninitialized variable issue
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2848 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 18:25:52 +00:00
Dan Williams
31327b579f 2007-09-21 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-manager.c
		- (nm_supplicant_manager_init): poke the supplicant at startup to
			activate it on the system bus



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2846 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 16:26:56 +00:00
Dan Williams
7e3abbe27f Remove no longer relevant comment
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2844 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 11:13:11 +00:00
Dan Williams
0802b101fb 2007-09-20 Dan Williams <dcbw@redhat.com>
* src/nm-device.c
		- (nm_device_is_activating): work around a race between auto-activation
			and the user activating the same device that is being auto-activated



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2842 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 03:49:28 +00:00
Dan Williams
ad904cdc49 2007-09-20 Dan Williams <dcbw@redhat.com>
* src/nm-device-interface.c
		- (impl_device_activate): until multiple active device support lands,
			ensure only one device can be active at a time



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2841 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 03:48:00 +00:00
Dan Williams
13a1643995 2007-09-20 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
	  src/supplicant-manager/nm-supplicant-config.h
		- (nm_supplicant_config_add_option): hide secrets from system logs



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2840 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 03:25:41 +00:00
Dan Williams
b6dfbeb71a 2007-09-20 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): re-enable the wireless device change
			checking code; insted of checking for SSIDs, check for the same
			connection instead



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2839 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 03:15:47 +00:00
Dan Williams
a8b3aa46da 2007-09-20 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (supplicant_iface_connection_state_cb_handler): don't use the card's
			composite link state when determining when to start the disconnection
			timer; that link state is already based on the supplicant interface's
			status which is exactly what's already being examined, plus the link
			state is a conglomeration of various things that we don't want here



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2838 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 03:14:38 +00:00
Dan Williams
770bee926d 2007-09-20 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_add_setting_wireless_security): uppercase
			string list keywords too since that's what wpa_supplicant wants



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2836 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 01:26:09 +00:00
Dan Williams
e8ec35bd1b Fix warnings
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2834 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 14:30:45 +00:00
Dan Williams
d24485c553 Warning fixes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2833 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 12:03:30 +00:00
Tambet Ingo
3f19c07885 2007-09-20 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-setting.h: Change the type of
        * NMSettingVPN->routes to
        GSList.

        * libnm-util/nm-setting.c (setting_vpn_destroy): Free routes
        * too.

        * src/nm-manager.c (connection_get_settings_cb): No need to use
        * weakref,
        just use (g_object_set_data_full).

        * src/vpn-manager/nm-vpn-connection.c
        * (nm_vpn_connection_get_routes): Now
        that NMSettingVPN->routes is a GSList, convert it to char **.
        (nm_vpn_connection_ip4_config_get): Free routes when done.
        (nm_vpn_connection_activate): Ditto.

        * src/nm-device-802-11-wireless.c
        * (real_connection_secrets_updated)
        (real_act_stage2_config): Use defined setting names.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2832 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 11:52:51 +00:00
Dan Williams
117cd4d076 2007-09-20 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
	  src/nm-manager.c
	  src/nm-manager.h
		- Pass an NMDeviceInterface into nm_manager_get_connection_secrets()
			so that the device can be deactivated if secrets are wrong



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2830 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 11:25:47 +00:00
Dan Williams
e6dae7aeed 2007-09-20 Dan Williams <dcbw@redhat.com>
* src/nm-manager.h
	  src/nm-device.c
		- (nm_device_activate): actually check if a given connection
			exists before assuming it doesn't



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2828 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 08:05:59 +00:00
Dan Williams
e43e695d43 Remove debug print
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2827 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 08:04:32 +00:00
Tambet Ingo
6746319495 2007-09-20 Tambet Ingo <tambet@gmail.com>
* libnm-util/nm-connection.c (register_default_creators): Use
        * defined
        setting names. Register NMSettingVPN and NMSettingVPNProperties.

        * libnm-util/nm-setting.c: Define property name strings, use
        * them.
        Implement NMSettingVPN and NMSettingVPNProperties settings.
        Implement NM_S_TYPE_GVALUE_HASH.
        (nm_setting_populate_from_hash): Handle NM_S_TYPE_GVALUE_HASH.
        (setting_connection_verify): Rename 'devtype' property to
'type'.

        * introspection/nm-vpn-manager.xml: Use NMConnection for VPN
        * service
        properties.

        * src/vpn-manager/nm-vpn-service.c: Ditto.

        * src/vpn-manager/nm-vpn-connection.c: Ditto.

        * src/vpn-manager/nm-vpn-manager.c (nm_vpn_manager_connect):
        * Ditto.
        (nm_vpn_manager_new): Remove NMManager argument, it's easy
enough to get.

        * src/nm-device-802-11-wireless.c (find_best_connection): Use
        * defined setting
        names. NMSettingConnection->devtype got renamed to 'type'.

        * src/nm-device-802-3-ethernet.c (find_best_connection):
        (real_get_best_connection): Ditto.

        * src/NetworkManager.c (main): Update the vpn manager creation
        * arguments.

        * libnm-glib/nm-vpn-manager.[ch]: Update.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2826 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 06:47:15 +00:00
Dan Williams
d92897393e 2007-09-19 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
	  introspection/nm-access-point.xml
		- Change strength-changed signal into a properties-changed signal
			for all properties, not just strength.  Export that signal over dbus
			so listeners don't have to poll NM for changes.
		- (nm_ap_export_to_dbus, nm_ap_new): not every NMAccessPoint should
			get exported over D-Bus, so break up the logic and let other bits
			decided when to export the AP
		- (nm_ap_new_from_ap): remove, unused

	* src/nm-device-802-11-wireless.c
		- (merge_scanned_ap): only export APs that are actually on the device
			list, not every AP created internally

	* libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- Cache properties internally and only hit DBus when needed.  Get
			property updates from NM signals



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2825 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-19 20:44:37 +00:00
Dan Williams
40dcb05871 2007-09-14 Dan Williams <dcbw@redhat.com>
Remove unused stuff in libnm-util

	* configure.in
	  libnm-util/Makefile.am
	  libnm-util/cipher-private.h
	  libnm-util/cipher-wep-ascii.c
	  libnm-util/cipher-wep-ascii.h
	  libnm-util/cipher-wep-hex.c
	  libnm-util/cipher-wep-hex.h
	  libnm-util/cipher-wep-passphrase.c
	  libnm-util/cipher-wep-passphrase.h
	  libnm-util/cipher-wpa-psk-hex.c
	  libnm-util/cipher-wpa-psk-hex.h
	  libnm-util/cipher-wpa-psk-passphrase.c
	  libnm-util/cipher-wpa-psk-passphrase.h
	  libnm-util/cipher.c
	  libnm-util/cipher.h
	  libnm-util/dbus-helpers.c
	  libnm-util/dbus-helpers.h
	  libnm-util/gnome-keyring-md5.c
	  libnm-util/gnome-keyring-md5.h
	  libnm-util/sha1.c
	  libnm-util/sha1.h
	  src/nm-device-802-11-wireless.c
	  test/libnm-util/Makefile.am
	  test/libnm-util/test-ciphers.c
	  test/libnm-util/test-dbus-helpers.c
	  test/libnm-util/test-inputs.h
		- Removed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2816 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-15 00:38:42 +00:00
Dan Williams
c766867b65 2007-09-14 Dan Williams <dcbw@redhat.com>
Implement deferred activation support in the device class.

	* src/nm-device-interface.c
	  src/nm-device-interface.h
		- (nm_device_interface_activate): take more arguments to support
			deferred activation; callers must pass one of (connection) OR
			(service_name, connection_path)
		- (impl_device_activate): connection validation is punted to the device
			to be able to handle deferred activation.  Yes, this means errors
			don't get returned from the Activate() dbus call, and yes, that
			should be fixed somehow later.

	* src/nm-device.c
	  src/nm-device.h
		- (clear_act_request): clear additional deferred activation stuff too
		- (deferred_activation_timeout_cb): new function; clean up when
			deferred activation times out.
		- (deferred_activation_start_cb): new function; when the connection
			finally becomes available, start device activation
		- (nm_device_activate): attach to the right signals of the activation
			request if we need to defer activation until the connection is valid

	* src/NetworkManagerPolicy.c
		- (nm_policy_device_change_check): update for additional arguments
			required for nm_device_interface_activate().  Pass NULL for these
			though because this function already knows exactly which
			NMConnection to use



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2812 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-14 19:51:04 +00:00
Dan Williams
92ee635c59 2007-09-14 Dan Williams <dcbw@redhat.com>
Implement deferred activation handling in the NMActRequest class.  When a
	client wants to activate a device but must create the NMConnection details
	on the fly, there likely hasn't been enough time yet for NM to receive the
	new connection signal and grab all the connection details.  So the
	activation is deferred (and bounded by a timer) for a while, and if the
	connection appears within the window, it is activated.

	* src/nm-activation-request.c
	  src/nm-activation-request.h
		- (nm_act_request_class_init): two new signals to support deferred
			activation, to allow the listener to handle both timeout and success
		- (nm_act_request_new_deferred): new function, starts the deferred
			activation timeout handler and listens to the NMManager for
			new-connection signals to notice when the connection comes in



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2811 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-14 19:43:28 +00:00
Dan Williams
13f21985d4 2007-09-14 Dan Williams <dcbw@redhat.com>
* src/nm-manager.h
	  src/nm-manager.c
		- (nm_manager_get_connection_service_name,
		   nm_manager_get_connection_dbus_path): get details about a connection
			known internally by the NMManager
		- (nm_manager_class_init): fix connection add/remove signal marshalers
			because NMConnection is now a GObject subclass
		- Use constant for the gobject data tag used on NMConnection objects for
			storing the associated DBusGProxy



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2810 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-14 19:36:00 +00:00
Dan Williams
21ad2cf867 2007-09-14 Dan Williams <dcbw@redhat.com>
* utils/Makefile.am
	  utils/nm-utils.c
	  utils/nm-utils.h
	  src/supplicant-manager/Makefile.am
	  src/dhcp-manager/Makefile.am
	  src/backends/Makefile.am
	  src/named-manager/Makefile.am
	  src/ppp-manager/Makefile.am
	  src/vpn-manager/Makefile.am
	  test/libnm-util/Makefile.am
	  test/test-common/Makefile.am
		- Remove utils/; it was unused



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2808 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-14 18:50:16 +00:00
Dan Williams
fbb6eec43d 2007-09-13 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-3-ethernet.c
		- (real_bring_down, nm_device_802_3_ethernet_dispose): disconnect from
			netlink monitor carrier signals on dispose, not bring down.  The
			carrier signals should be handled over the entire lifetime of the
			device anyway, not created/destroyed on up or down.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2802 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-13 18:09:28 +00:00
Tambet Ingo
326d1e8679 2007-09-12 Tambet Ingo <tambet@gmail.com>
* src/vpn-manager/nm-vpn-connection.[ch]: 
        * src/vpn-manager/nm-vpn-manager.[ch]:
        * src/vpn-manager/nm-vpn-service.[ch]: Rewrite the vpn handling
        * code. Using 
        dbus-glib, GObjects, signals etc.

        * libnm-glib/nm-vpn-manager.[ch]: 
        * libnm-glib/nm-vpn-connection.[ch]: Now that the NM
        * implementation changed
        so much, rewrite these too.

        * libnm-glib/Makefile.am: Add new files to build, build new
        * binding files for
        the new introspection files.

        * libnm-glib/nm-client.[ch]: Remove all VPN related stuff from
        * here.

        * libnm-glib/nm-dbus-utils.[ch]: Renamed from nm-utils.[ch] that
        * was shadowing
        the header with the same name from libnm-utils.

        * libnm-glib/nm-vpn-plugin.[ch]: Implement.

        * libnm-util/Makefile.am: Add nm-utils.[ch] to build.

        * introspection/nm-vpn-plugin.xml: Implement.

        * introspection/nm-vpn-connection.xml: Implement.

        * introspection/nm-vpn-manager.xml: Implement.

        * src/NetworkManagerSystem.c
        * (nm_system_vpn_device_set_from_ip4_config): Remove
        the named manager argument, it can just as easily get it as the
caller.
        (nm_system_vpn_device_unset_from_ip4_config): Ditto.

        * src/vpn-manager/nm-dbus-vpn.[ch]: Remove.

        * src/nm-dbus-manager.h: Fix up the name_owner signal signature.

        * src/dhcp-manager/nm-dhcp-manager.c (garray_to_string): Remove,
        * use one from
        libnm-utils.

        * libnm-util/nm-connection.c: Ditto.

        * src/NetworkManagerMain.h: Remove, it's finally empty.

        * configure.in: Remove utils/ from build.

        * include/NetworkManagerVPN.h: Add some more defines to reduce
        * the amount
        of hard-coded strings.

        * utils/: Move it over to libnm-util.

        * test/Makefile.am: Link against libnm-util now that util/ is
        * gone.

        * dispatcher-daemon/Makefile.am: Ditto.

        * src/Makefile.am: Ditto.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2798 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-12 16:23:53 +00:00
Dan Williams
594dd3f208 2007-09-12 Dan Williams <dcbw@redhat.com>
Wireless connections can be made with config data from the applet now.
	
	Yay.

	* src/supplicant-manager/nm-supplicant-config.h
	  src/supplicant-manager/nm-supplicant-config.c
		- (nm_supplicant_config_new): kill unused init parameter 'iface'
		- (nm_supplicant_config_add_setting_wireless,
		   nm_supplicant_config_add_setting_wireless_security): new functions;
			add key/value pairs from the settings objects to the supplicant
			config

	* src/nm-device-802-11-wireless.c
		- (cull_scan_list): fix check to not prune currently associated AP
		- (build_supplicant_config, real_act_stage2_config): call the functions
			of the NMSupplicantConfig that parse settings objects rather than
			doing it manually here



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2796 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-12 04:53:23 +00:00
Dan Williams
7d0e13919c 2007-09-12 Dan Williams <dcbw@redhat.com>
* src/supplicant-manager/nm-supplicant-interface.c
	  src/supplicant-manager/nm-supplicant-marshal.list
		- (nm_supplicant_interface_class_init): fix stupid mistake, the
			"connection-error" signal arguments should be STRING not CHAR



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2795 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-12 04:48:16 +00:00
Dan Williams
ef1624f204 2007-09-12 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerUtils.c
	  src/NetworkManagerUtils.h
		- (nm_utils_hexstr2bin): new function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2794 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-12 04:45:18 +00:00
Dan Williams
7e079e3111 2007-09-11 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (connection_get_settings_cb): emit connection-added signal
		- (connection_removed_cb): uncomment bits for system settings service,
			send connection-removed when appropriate
		- (nm_manager_get_connection_secrets, get_secrets_cb): don't clobber
			the stack by trying to g_object_set_data() on something that's
			not a GObject; handle case where settings service returns
			empty settings hash table



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2793 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 23:28:41 +00:00
Dan Williams
d17ea3aaab 2007-09-11 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerPolicy.c
		- (connection_added, connection_removed): trigger device change checks
			on connection changes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2792 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 23:25:00 +00:00
Dan Williams
1893a7ee9c 2007-09-11 Dan Williams <dcbw@redhat.com>
* src/nm-activation-request.c
		- (connection_secrets_updated_cb): fix c&p error in signal emission



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2791 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 23:23:51 +00:00
Dan Williams
277fcb5dc4 2007-09-11 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (real_connection_secrets_updated): fix erroneous check



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2790 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 23:23:01 +00:00
Dan Williams
e8ad28dc98 Small warning message argument cleanup
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2787 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 19:22:31 +00:00
Dan Williams
3884f45949 2007-09-11 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_new): s/index/idx, stupid system header
			somewhere defines 'index' and I missed this one when I fixed the
			shadow declaration errors earlier



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2786 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 19:21:51 +00:00
Dan Williams
82fd08b4f8 Fix wrong check when clearing activation request
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2785 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 19:20:34 +00:00
Dan Williams
2e4cabc55e Ignore secrets updates for uninteresting settings
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2783 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 18:25:34 +00:00
Dan Williams
937d1add73 2007-09-11 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_update_secrets): new function; add a virtual function that
			subclasses can implement to update their secrets
		- (setting_wireless_security_update_secrets): implement that function
			for the 802-11-wireless-security subclass

	* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_update_secrets): update secrets for a Setting and
			emit a signal on success

	* src/nm-manager.c
	  src/nm-manager.h
	  src/nm-marshal.list
		- (connection_get_settings_cb): enable system settings bits
		- (nm_manager_get_connection_secrets, get_secrets_cb): add function
			to request secrets from the settings dbus service and to
			push those secrets to the NMConnection itself

	* src/nm-activation-request.c
	  src/nm-activation-request.h
		- Attach to the 'secrets-updated' signal of the NMConnection that's
			currently being activated, and proxy that signal to other listeners.
			Goes through the activation request because the activation request
			is the thing that manages the lifetime of the NMConnection that's
			being activated.

	* src/nm-device-802-11-wireless.c
		- (real_connection_secrets_updated): implement the connection secrets
			updated notification and restart activation when secrets are
			received
		- (real_act_stage2_config): request secrets from the settings dbus
			service if secrets are needed

	* src/nm-device.c
	  src/nm-device.h
		- (clear_act_request, nm_device_activation_cancel,
		   nm_device_deactivate_quickly, nm_device_dispose): consolidate places
			where the activation request is cleared
		- (nm_device_activate, connection_secrets_updated_cb): attach to the
			updated secrets signal of activation request and add a function
			that subclasses can override to handle it easily



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2782 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 18:02:27 +00:00
Tambet Ingo
d52a52421a Squashed commit of the following:
commit aea4b8344368d815ec84ef867b2dec8eecb4a304
Author: Tambet Ingo <tambet@gmail.com>
Date:   Tue Sep 11 10:15:14 2007 +0300

    2007-09-11  Tambet Ingo  <tambet@gmail.com>

    	* src/backends/NetworkManagerSuSE.c: Fix a build issue caused by the
    	removal of NetworkManagerAPList.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2781 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 07:15:06 +00:00
Dan Williams
8b905b9762 2007-09-10 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
	  introspection/nm-access-point.xml
		- Change 'freq' property to a guint32 instead of a double since we
			weren't using the floating point bits anyway



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2780 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-10 19:56:31 +00:00
Dan Williams
0930458ea4 2007-09-10 Dan Williams <dcbw@redhat.com>
* NetworkManagerAP.c
	  NetworkManagerAP.h
	  NetworkManagerPolicy.c
	  NetworkManagerSystem.c
	  NetworkManagerUtils.c
	  NetworkManagerUtils.h
	  nm-device-802-11-wireless.c
	  nm-device-802-3-ethernet.c
	  nm-hal-manager.c
	  nm-manager.c
	  vpn-manager/nm-dbus-vpn.c
		- Warning fixes; casts and removal of unused variables



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2779 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-10 19:51:25 +00:00
Dan Williams
4c028c7cef 2007-09-10 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Kill NMNetworkType; AP types don't matter any more

	* src/NetworkManagerAPList.c
	  src/NetworkManagerAPList.h
	  src/Makefile.am
		- Kill; NMAccessPointList has outlived it's usefulness

	* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
		- (match_cipher, security_compatible, nm_ap_check_compatible): new
			functions; check if an NMConnection object is compatible with the
			settings of this AP
		- (freq_to_channel, channel_to_freq): utility functions for
			channel <-> frequency conversion

	* src/nm-device.c
	  src/nm-device.h
		- (nm_device_get_best_connection): pass the specific object around
			 (which might be the object path of a specific AP to connect to).
			 The get_best_connection() call should populate this on return
			 if needed (wireless does).

	* src/nm-device-802-3-ethernet.c
		- (real_get_best_connection): handle specific_object argument

	* src/NetworkManager.c
	  src/NetworkManagerMain.h
		- Remove unused includes

	* src/nm-device-802-11-wireless.c
	  src/nm-device-802-11-wireless.h
		- Convert the ap_list into a GSList from an NMAccessPointList
		- No need for caching the 'activation_ap' since this is now determined
			from the specific_object of the activation request, which is
			populated from the get_best_connection() call or from a user request
		- (nm_device_802_11_wireless_update_bssid): fix warning
		- (get_wireless_capabilities): fix error message format arguments
		- (nm_device_802_11_wireless_copy_allowed_to_dev_list): remove, unused
		- (find_best_connection, real_get_best_connection): implement
		- (ap_list_get_ap_by_ssid, nm_device_802_11_wireless_ap_list_print):
			move here from NetworkManagerAPList
		- (ap_need_secrets): remove; moved to nm-connection.c where it belongs
		- (real_act_stage1_prepare): just ensure an AP exists, connection is
			already verified earlier
		- (real_act_stage2_config): use nm_connection_need_secrets()

	* src/NetworkManagerPolicy.c
		- (nm_policy_auto_get_best_device): handle specific objects
		- (create_connection): remove; automatic connection creation functionality
			is handled by the Connection objects
		- (nm_policy_device_change_check): handle specific_object

	* libnm-util/nm-connection.c
		- (wireless_sec_need_secrets, nm_connection_need_secrets): implement



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2778 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-10 19:11:40 +00:00
Dan Williams
0b94b3d318 2007-09-10 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (query_connections): fix uninitialized variable problem that caused
			segfault
		- (nm_manager_add_device): take devices down on startup so that we can
			be assured that nm_device_is_up() won't short-circuit the init
			process.  Hack until the is_up check gets split into two pieces
			that aren't behaviorally confusing.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2777 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-10 18:31:56 +00:00
Dan Williams
fba106c5b0 2007-09-09 Dan Williams <dcbw@redhat.com>
* introspection/nm-device.xml
		- The 'Activate' method now takes 3 arguments, a service name for the
		settings service (user or system), the object path of the connection
		to activate, and the specific object to activate, if any

	* src/nm-device-interface.c
		- (nm_device_interface_error_quark, nm_device_interface_error_get_type):
		Add error bits
		- (impl_device_activate): adapt to new Activate arguments; validate
		the service name and get the Connection object from the NMManager
		before starting to activate the device with the specified connection

	* src/nm-device-802-3-ethernet.c
		- (real_get_best_connection): find the best connection, or create a
		default one if no existing connections can be used

	* src/NetworkManagerPolicy.c
		- (nm_policy_auto_get_best_device): Get the device's best connection
		and only pick the device if it has one
		- (nm_policy_device_change_check): disable wireless bits for now until
		wireless get_best_connection() can be implemented (replacing "best_ap");
		don't create a default connection here as the device subclass will do
		that if needed

	* src/nm-manager.h
	  src/nm-manager.c
		- (nm_manager_get): make NMManager a singleton and expose the getter
		internally
		- Rework internal NMManager connection handling to use the same
		routines for both the system and user settings services.  Most calls
		take a new NMConnectionType argument specifying either system or user
		connections
		- (nm_manager_get_connection_by_object_path): new function; get a
		connection keyed on its object path

	* src/NetworkManager.c
		- (main): use nm_manager_get()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2776 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-09 22:18:42 +00:00
Dan Williams
04c7310517 2007-09-09 Dan Williams <dcbw@redhat.com>
* src/nm-device.h
	  src/nm-device.c
		- (nm_device_get_best_connection): new function; get best connection
			for the device at that time



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2774 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-09 17:58:44 +00:00
Dan Williams
8f76d5f2e0 2007-09-09 Dan Williams <dcbw@redhat.com>
* src/nm-device-interface.h
		- Add NMDeviceInterfaceError with an UnknownConnection error



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2773 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-09 17:58:19 +00:00
Dan Williams
b1872d9ac2 2007-09-09 Dan Williams <dcbw@redhat.com>
Stupid mistake on my part; object path and interface for settings service
	and connection objects can be the same, only the service name must be
	different for the system and user settings services.

	* include/NetworkManager.h
	  src/nm-manager.c
	  introspection/nm-settings-connection.xml
	  introspection/nm-settings.xml
	  libnm-glib/nm-settings.c
		- (nm_connection_settings_init, query_user_connections,
		   new_connection_cb): Unify NetworkManagerSettings and Connection
		   interface name and object path



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2772 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-09 14:48:31 +00:00
Dan Williams
8af139dff4 2007-09-06 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
		- (nm_manager_user_connections_destroy): clear the user connections hash
			table, don't destroy it
		- (finalize): only destroy the hash table on NMManager finalization



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2765 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-06 19:13:00 +00:00
Dan Williams
d1ac371963 2007-09-02 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
	  libnm-glib/nm-settings.c
		- defines for the user settings daemon D-Bus bits

	* src/NetworkManager.c
		- Remove stuff that referred to the old NetworkManagerInfo service

	* src/vpn-manager/nm-dbus-vpn.h
		- Move old NMI defines to the only place they are used still

	* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
	  src/nm-activation-request.c
		- Make NMConnection a GObject subclass so we can do spiffy stuff with it

	* src/nm-manager.c
	  src/nm-manager.h
		- Get connections and their settings from the user settings daemon
			at the appropriate times



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2763 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-03 01:12:23 +00:00