Commit Graph

62 Commits

Author SHA1 Message Date
Dan Williams
008bab498f 2007-09-25 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_clear_secrets): new function; clear secrets out of
			each NMSetting in an NMConnection

	* libnm-util/nm-setting.h
	  libnm-util/nm-setting.c
		- (nm_setting_clear_secrets, default_setting_clear_secrets): clear 
			secrets out of an NMSetting
		- (nm_setting_connection_new, nm_setting_ip4_config_new, 
		   nm_setting_wired_new, nm_setting_wireless_new,
		   nm_setting_wireless_security_new, nm_setting_ppp_new,
		   nm_setting_vpn_new, nm_setting_vpn_properties_new): set clear_secrets
			to default handler default_setting_clear_secrets()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2871 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-25 06:11:44 +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
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
7535733df5 2007-09-16 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
	  libnm-util/nm-connection.h
		- (nm_connection_for_each_setting_value): new function; iterate over
			each setting's value and call a user-provided function with details
			about that value

	* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_enumerate_values): new function; enumerate the values
			of a specific NMSetting subclass for a user-provided function with
			details about that value
		- Change wep_tx_keyidx to a uint32
		- Create settings value tables for each setting defining their type,
			key name, offset into the NMSetting subclass' structure, and whether
			they are required and/or a secret
		- (nm_setting_populate_from_hash): generic function to populate an
			NMSetting from a GHash table, make all settings use it
		- (nm_setting_hash): generic function to derive a GHashTable from
			an NMSetting object, make all settings use it



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2823 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-16 12:47:14 +00:00
Dan Williams
e705a7082e 2007-09-11 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-connection.c
		- (nm_connection_update_secrets, need_secrets_check): move
			802-11-wireless-security need_secrets checks to the setting object
			itself, where it belongs

	* libnm-util/nm-setting.c
	  libnm-util/nm-setting.h
		- (nm_setting_need_secrets): new function
		- (setting_wireless_security_verify,
		   nm_setting_wireless_security_new_from_hash): make 'key-mgmt' required
		- (setting_wireless_security_need_secrets): mostly copy code over
			from nm-connection.c



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2784 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 18:28:36 +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
Dan Williams
9aab44b772 2007-08-29 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting.h
	  libnm-util/nm-setting.c
	  libnm-util/nm-connection.c
	  src/NetworkManagerPolicy.c
		- 'info' settings object should be 'connection' says the spec
		at NetworkManagerConfigurationSpecification



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2746 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-29 21:27:52 +00:00
Tambet Ingo
b1e15de652 2007-08-15 Tambet Ingo <tambet@gmail.com>
* src/ppp-manager: Implement ppp-manager. It's sort of dead code
        * for now since
        nothing is using it at the moment, but it'll be all useful and
stuff later on.

        * libnm-util/nm-setting.h: Define NMSettingPPP.

        * libnm-util/nm-setting.c: Implement NMSettingPPP.

        * libnm-util/nm-connection.c (register_default_creators):
        * Register ppp setting.

        * src/Makefile.am: Add ppp-manager to SUBDIRS.

        * configure.in: Require ppp headers. Build Makefile for
        * ppp-manager.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2695 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 14:30:06 +00:00
Tambet Ingo
6a68d79c08 2007-08-09 Tambet Ingo <tambet@gmail.com>
[Based on patch by Helmut Schaa <hschaa@suse.de>]

        * libnm-glib/nm-client.h:
        * libnm-glib/nm-object.h:
        * libnm-glib/nm-vpn-connection.h:
        * libnm-glib/nm-settings.h:
        * libnm-glib/nm-device.h:
        * libnm-glib/nm-ip4-config.h:
        * libnm-glib/nm-access-point.h:
        * libnm-glib/nm-device-802-3-ethernet.h:
        * libnm-util/nm-setting.h: 
        * libnm-util/nm-connection.h: Add G_BEGIN_DECLS / G_END_DECLS to
        * support C++.

        * libnm-glib/nm-object.c (nm_object_get_byte_property):
        * Implement.

        * libnm-glib/nm-access-point.c: Strength has type char.

        * gnome/vpn-properties/Makefile.am: Remove
        * GNOME_DISABLE_DEPRECTATED for now
        to fix build. GnomeDruid is deprecated in recent libgnomeui.

        * introspection/nm-access-point.xml: Strength property is char,
        * not int.

        * src/NetworkManagerAP.c (set_property): Set strength from char.
        (get_property): Handle hidden APs (with empty SSID).
        Get strength value from char.
        (nm_ap_class_init): Strength property has char type.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2659 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-09 09:19:57 +00:00
Tambet Ingo
d6cf3940cd 2007-06-08 Tambet Ingo <tambet@ximian.com>
* libnm-util/nm-setting.c: Implement NMSettingWirelessSecurity.

	* libnm-util/nm-connection.c (register_default_creators): Register wireless security
	setting.
	(gvalue_to_string): Recognize G_TYPE_UCHAR and GSList.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2581 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-08 05:47:12 +00:00
Tambet Ingo
5623bf965b 2007-06-06 Tambet Ingo <tambet@ximian.com>
* libnm-util/nm-setting.c: Get rid of dump virtual functions, that can happen
	automagically.
	Implement NMSettingIP4Config.
	Finish NMSettingWired by adding all known members.
	(setting_wired_verify): Implement.
	Finish NMSettingWireless by adding all known members.
	(setting_wireless_verify): Implement.

	* libnm-util/nm-connection.c: Register "ipv4" setting.
	(nm_connection_dump): Implement. Instead of requiring every NMSetting to implement
	dump function, we can introspect the GHashTable which is used for sending connections
	over dbus.

	* src/nm-device-802-11-wireless.c (nm_device_802_11_wireless_set_activation_ap):
	Take GByteArray for essid, it's really not a string.

	* src/nm-device.c (real_act_stage3_ip_config_start): Get information from NMSettings.
	Start DHCP request if setting is not passed or if it states that DHCP should be used.
	(real_act_stage4_get_ip4_config): If settings are provided, use them, even if it
	means overriding the values we got from DHCP.
	(real_activation_cancel_handler): Cancel DHCP transaction only if it has started, doh.
	(nm_device_deactivate_quickly): Ditto.

	* src/nm-device-interface.c (impl_device_activate): Dump the connection structure
	for debugging.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2577 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-06 13:33:51 +00:00
Tambet Ingo
6c51badc69 2007-05-07 Tambet Ingo <tambet@ximian.com>
* libnm-util/nm-connection.c: 
	* libnm-util/nm-connection.h: 
	* libnm-util/nm-setting.c:
	* libnm-util/nm-setting.h: Add.

	* libnm-util/Makefile.am: Build the added files.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2568 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-05-07 14:39:20 +00:00