Commit graph

362 commits

Author SHA1 Message Date
Dan Williams a5a782991f 2008-09-05 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-wifi.c
		- (access_point_removed_proxy): clean up the active access point too
			just in case the active ap changed signal didn't come through yet
		- (clean_up_aps): be sure to set priv->active_ap to NULL when cleaning up



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4040 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-05 15:16:29 +00:00
Dan Williams f44da15bdf 2008-09-05 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (constructor): get initial state after we know whether NM is running
			or not



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4039 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-05 15:11:34 +00:00
Dan Williams cfd7014c9d 2008-09-05 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-dhcp4-config.c
		- (finalize): clean up the DBusGProxy



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4038 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-05 15:10:52 +00:00
Dan Williams 17af879e9b Prevent double-exports
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4021 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-27 18:09:30 +00:00
Michael Biebl 61eb8cf067 Drop nm_exported_connection_get_id symbol
The nm_exported_connection_get_id function was removed in r4013.
Remove the symbol from the version script, too.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4019 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-27 04:51:33 +00:00
Dan Williams 81f8f39920 2008-08-26 Dan Williams <dcbw@redhat.com>
Add connection UUIDs, since connection names can be changed, and since
	old-style connection IDs could change over the life of the connection.  The
	UUID should be assigned at connection creation time, be stable for a given
	connection, and should be unique among all connections for a given settings
	service.

	* configure.in
	  libnm-util/Makefile.am
		- Require libuuid

	* introspection/nm-exported-connection.xml
		- Remove "GetID" method

	* libnm-glib/nm-dbus-connection.c
	  libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- Remove id-related stuff

	* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
	  libnm-util/libnm-util.ver
		- (nm_utils_uuid_generate, nm_utils_uuid_generate_from_string): Add
			utility functions to generate UUIDs

	* libnm-util/nm-setting-connection.c
	  libnm-util/nm-setting-connection.h
		- Add 'uuid' member to the connection setting
		- (verify): require valid 'uuid' for a valid connection

	* system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
	  system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-suse/nm-suse-connection.c
	  system-settings/plugins/ifcfg-suse/parser.c
	  system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/src/main.c
		- Remove id-related stuff
		- Give connections UUIDs where needed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4013 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-27 02:57:21 +00:00
Michael Biebl d7940bcb9b Rename private nm_* functions to _nm_*
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4012 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-26 09:34:31 +00:00
Michael Biebl 430e898e9f Add the actual version scripts
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3995 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-22 11:32:31 +00:00
Michael Biebl bb9e550328 symbol visibility
Use a ld version script for libnm-util, libnm_glib and libnm_glib_vpn to
control the list of exported symbols.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3994 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-22 11:32:25 +00:00
Tambet Ingo 0dfa8e9caf 2008-08-12 Tambet Ingo <tambet@gmail.com>
* libnm-glib/*.c. Document some more.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3934 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-12 12:59:33 +00:00
Tambet Ingo 0f534a9f8f 2008-08-12 Tambet Ingo <tambet@gmail.com>
Start documenting libnm-glib public API using gtk-doc.

	* libnm-glib/nm-serial-device.c:
	* libnm-glib/nm-object.c:
	* libnm-glib/nm-gsm-device.c:
	* libnm-glib/nm-device.c:
	* libnm-glib/nm-device-wifi.c:
	* libnm-glib/nm-device-ethernet.c:
	* libnm-glib/nm-client.c:
	* libnm-glib/nm-cdma-device.c: Document the public API.

	* docs/libnm-glib/libnm-glib.types: Implement.

	* docs/libnm-glib/Makefile.am: Implement.

	* autogen.sh:
	* configure.in:
	* Makefile.am: Add gtk-doc support.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3932 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-12 08:05:21 +00:00
Dan Williams 3246f24248 Don't try to get active connections when NM isn't running
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3921 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-11 13:49:09 +00:00
Dan Williams 1807f545b5 2008-08-10 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-vpn-plugin.c
		- (nm_vpn_plugin_connect): stop plugin after connection failure from
			an idle handler so the Connect reply gets delivered before the
			stop StateChanged signal



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3920 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-11 01:47:09 +00:00
Dan Williams bcae312905 2008-08-07 Dan Williams <dcbw@redhat.com>
* introspection/nm-ip4-config.xml
	  libnm-glib/libnm-glib-test.c
	  libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.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/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
	  src/dhcp-manager/nm-dhcp-manager.c
	  src/nm-device.c
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Remove NIS logic; should be done from dispatcher scripts instead



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3909 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-07 19:22:23 +00:00
Dan Williams 641a7072b8 2008-08-07 Dan Williams <dcbw@redhat.com>
* callouts/nm-dispatcher-action.c
		- (nm_dispatcher_action): grab device path and create the device; pass
			the device's DHCP4 config to script caller
		- (dispatch_scripts): dump the DHCP4 config to the environment of called
			scripts

	* libnm-glib/nm-dhcp4-config.c
	  libnm-glib/nm-dhcp4-config.h
		- (nm_dhcp4_config_get_options): expose
		- (nm_dhcp4_config_get_one_option): renamed from nm_dhcp4_config_get_option



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3907 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-07 17:47:08 +00:00
Dan Williams 881370ab2c 2008-08-07 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Add the DHCP4Config D-Bus interface

	* libnm-glib/Makefile.am
	  libnm-glib/nm-dhcp4-config.c
	  libnm-glib/nm-dhcp4-config.h
		- Handle DHCP4 config objects exported by NM over D-Bus

	* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- Add a 'dhcp4-config' property

	* libnm-glib/libnm-glib-test.c
		- Print out DHCP4 config for devices
		- Fix some crashes when no connections are active

	* src/nm-device-interface.c
	  src/nm-device.c
	  src/nm-dhcp4-config.c
	  src/nm-dhcp4-config.h
		- Treat dhcp4-config object as an object path at the D-Bus interface so
			that when it doesn't exist we can proxy it as "/" which dbus-glib
			doesn't let us do when the property type is G_TYPE_OBJECT



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3905 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-07 15:26:32 +00:00
Dan Williams 2c31b5499b 2008-08-06 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
		- Add 'routes' property

	* libnm-util/nm-setting-vpn.c
	  libnm-util/nm-setting-vpn.h
		- Remove 'routes' property

	* libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- 'ignore-dhcp-dns' renamed to 'ignore-auto-dns'
		- Add 'ignore-auto-routes' property
		- 'routes' exposed over D-Bus is now an array of array of uint (4) to 
			accomodate route metrics
		- 'routes' exposed in C is now a list of NMSettingIP4Route structures

	* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
		- Add helpers for marshalling IP4 routes

	* src/NetworkManagerUtils.c
		- (nm_utils_merge_ip4_config): handle property renames and new route
			structure

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route, nm_system_device_set_from_ip4_config,
		   nm_system_vpn_device_set_from_ip4_config): respect route metrics

	* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): handle new route structure

	* system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-fedora/writer.c
		- Handle routes separately from addresses now that routes have a different
			format

	* introspection/nm-ip4-config.xml
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Rename internal routing functions
		- 'static-routes' renamed to 'routes'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3898 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-06 22:23:48 +00:00
Dan Williams 6f334cff8f 2008-08-01 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.c
		- (proxy_get_string): util function for querying a HAL property
		- (get_ancestor_device): split out from get_product_and_vendor()
		- (get_product_and_vendor): simplify; get more accurate pid & vid info
			from PCI devices by querying subsys properties
		- (nm_device_update_description): simplify



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3883 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-01 20:32:21 +00:00
Dan Williams 291019fb79 Quiet warning about unhandled property for now
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3867 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-28 14:04:31 +00:00
Dan Williams 95bb76aa7f 2008-07-11 Dan Williams <dcbw@redhat.com>
Modify the NMDevice::state-changed signal to include the previous state
	and reason. Enables the applet to provide more information why device
	activation failed.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3819 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-11 10:28:53 +00:00
Dan Williams e1e4100f76 2008-07-07 Dan Williams <dcbw@redhat.com>
Convert to using IPv4 prefixes instead of netmasks.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3812 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-07 18:57:37 +00:00
Dan Williams 5348be4d0b 2008-07-02 Dan Williams <dcbw@redhat.com>
* introspection/nm-active-connection.xml
	  introspection/nm-vpn-connection.xml
	  libnm-glib/nm-active-connection.c
	  src/nm-activation-request.c
	  src/nm-active-connection.h
	  src/vpn-manager/nm-vpn-connection.c
		- Remove "SharedServiceName" and "SharedConnection" bits from the D-Bus
			and libnm-glib API since sharing didn't get implemented that way



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3797 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-02 13:00:14 +00:00
Dan Williams dd0109ee28 2008-06-26 Dan Williams <dcbw@redhat.com>
Patch from David Cantrell <dcantrell@redhat.com>
	
	* Use inet_ntop() and inet_pton() everwhere and check for errors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3777 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-26 19:33:13 +00:00
Dan Williams b0cf66eda8 2008-06-26 Dan Williams <dcbw@redhat.com>
* Update FSF address in license headers (Michael Biebl <biebl@debian.org>)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3775 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-26 18:31:52 +00:00
Dan Williams 8afd2d8ecd 2008-06-26 Dan Williams <dcbw@redhat.com>
Patch from Michael Biebl <biebl@debian.org>

	* Clean up build system stuff



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3773 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-26 17:34:04 +00:00
Dan Williams bdeeab3eda 2008-06-20 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-vpn-plugin-ui-interface.c
	  libnm-glib/nm-vpn-plugin-ui-interface.h
		- 'validity-changed' -> 'changed' to work better with the connection
			editor.  Plugin UI widgets should emit 'changed' whenever their
			UI values change in a meaningful way.
		- (nm_vpn_plugin_ui_widget_interface_update_connection): the
			update_connection member now returns validity of the UI widget



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3761 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-20 19:46:46 +00:00
Dan Williams a9fe7c42ed 2008-06-17 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-vpn-plugin-ui-interface.c
	  libnm-glib/nm-vpn-plugin-ui-interface.h
		- Add "desc" property for longer descriptions of the VPN plugin



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3756 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-17 10:43:33 +00:00
Dan Williams 7c802e167c 2008-06-16 Dan Williams <dcbw@redhat.com>
* configure.in
	  libnm-glib/libnm_glib_vpn.pc.in
		- add a .pc file for libnm_glib_vpn

	* libnm-glib/nm-vpn-plugin-ui-interface.c
	  libnm-glib/nm-vpn-plugin-ui-interface.h
		- Move the glib/GNOME VPN UI plugin interface into libnm-glib and
			rework it substantially



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3755 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-16 19:26:30 +00:00
Dan Williams 05e9de9402 2008-06-12 Dan Williams <dcbw@redhat.com>
Add a GError argument to nm_connection_verify() and nm_setting_verify(),
	and add error enums to each NMSetting subclass.  Each NMSetting subclass now
	returns a descriptive GError when verification fails.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3751 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-12 23:58:08 +00:00
Tambet Ingo 628f271791 2008-06-09 Tambet Ingo <tambet@gmail.com>
* Add missing files.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3746 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-11 09:31:16 +00:00
Dan Williams 0fdb07ca3d 2008-06-10 Dan Williams <dcbw@redhat.com>
The grand 802-11-wireless rename.  Get rid of the 802-11/80211/802_11 bits
	and use "wifi" everwhere instead.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3742 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-10 16:32:39 +00:00
Dan Williams 2b00116361 2008-06-10 Dan Williams <dcbw@redhat.com>
The grand 802-3-ethernet rename.  Get rid of the 802-3/8023/802_3 bits.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3741 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-10 15:54:23 +00:00
Dan Williams 6919b29f11 2008-06-10 Dan Williams <dcbw@redhat.com>
Patch from Tambet Ingo <tambet@gmail.com>

	* src/ppp-manager/nm-ppp-manager.c: Add ppp stats monitoring, signal the
		changes.

	* src/nm-serial-device.c: Monitor "ppp-stats" signals from NMPPPManager. Add
		a signal to emit these changes over dbus.

	* src/Makefile.am: Genereate nm-serial-device-glue.

	* libnm-glib/nm-serial-device.[ch]: Implement.

	* libnm-glib/nm-cdma-device.[ch]
	  libnm-glib/nm-gsm-device.[ch]: Inherit from NMSerialDevice.

	* libnm-glib/Makefile.am: Add nm-serial-device.[ch].

	* introspection/nm-device-serial.xml: Implement.

	* introspection/all.xml: Fix a couple of typos, add nm-device-serial.xml.

	* introspection/Makefile.am: Add nm-device-serial.xml.

	* include/NetworkManager.h: Add a DBus interface for serial device.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3740 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-10 14:59:22 +00:00
Dan Williams 73946def0e 2008-06-09 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (access_point_removed_proxy): actually unref the AP after removing
			it from the device's AP list.  Fixes refcounting bug for APs that
			caused them to get mixed up in the applet's menu.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3734 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-06-10 01:56:14 +00:00
Tambet Ingo d2cf6fa75c 2008-05-08 Tambet Ingo <tambet@gmail.com>
Use PolicyKit to authorize the system settings' AddConnection method
    	and the system settings connections' Update and Delete methods.

    	* libnm-glib/nm-settings.c (impl_exported_connection_update)
    	(impl_exported_connection_delete, nm_exported_connection_update)
    	(nm_exported_connection_delete): Return boolean and fill GError
    	to notify the callers of the reasons why it might have failed.

    	* libnm-glib/nm-dbus-settings-system.c
    	(nm_dbus_settings_system_add_connection): Return the error from dbus
    	call so that the callers can see why it failed.

    	* libnm-glib/nm-dbus-connection.c (update, delete): Update the
    	signatures.

    	* system-settings/src/nm-polkit-helpers.[ch]: Implement.

    	* system-settings/src/nm-sysconfig-connection.[ch]: Implement. New
    	abstract base class that checks PolicyKit permissions.

    	* system-settings/src/dbus-settings.c:
    	(impl_settings_add_connection): Check the policy before carring out
    	the request.

    	* system-settings/plugins/keyfile/nm-keyfile-connection.c:
    	Inherit from NMSysconfigConnection, check the policies before
    	allowing updating or removing.

    	* system-settings/plugins/ifcfg-suse/nm-suse-connection.c:
    	Inherit from NMSysconfigConnection.

    	* introspection/nm-exported-connection.xml: Annotate "Update" and
    	"Delete" methods with async flag so that the implementations can get
    	access to DBusGMethodInvocation.

    	* system-settings/src/dbus-settings.c
    	(settings_add_connection_check_privileges): Implement.
    	(impl_settings_add_connection): Check the privileges before adding a new
    	connection. Improve error reporting.

    	* introspection/nm-settings-system.xml: Make the 'AddConnection' method
    	async so that the implementation can access DBusGMethodInvocation.

    	* configure.in: Check for PolicyKit.

    	* policy/org.freedesktop.network-manager-settings.system.policy:
    	New file.

    	* policy/Makefile.am: Install the policy file.

    	* configure.in: Add 'policy' subdir.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3646 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-09 06:33:30 +00:00
Tambet Ingo bbaf9e2bfc 2008-05-07 Tambet Ingo <tambet@gmail.com>
Patch from André Lemos.

	* libnm-glib/nm-dbus-settings.c (fetch_connections_done): Fix a memory
	corruption.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3638 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-07 09:21:44 +00:00
Dan Williams 51503b2d5f 2008-05-06 Dan Williams <dcbw@redhat.com>
* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): clean up; update for changes to
			NMIP4Config to support multiple IP addresses

	* src/NetworkManagerUtils.c
		- (nm_utils_merge_ip4_config): update for multiple IP addresses

	* src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Store a list of IPv4 address/netmask/gateway tuples
		- (nm_ip4_config_get_gateway, nm_ip4_config_set_gateway,
		   nm_ip4_config_get_netmask, nm_ip4_config_set_netmask,
		   nm_ip4_config_get_broadcast, nm_ip4_config_set_broadcast,
		   nm_ip4_config_set_address): remove
		- (nm_ip4_config_take_address, nm_ip4_config_add_address,
		   nm_ip4_config_replace_address, nm_ip4_config_get_num_addresses):
			new functions; handle multiple IPv4 addresses

	* src/nm-device.c
	  src/ppp-manager/nm-ppp-manager.c
	  src/vpn-manager/nm-vpn-connection.c
	  src/NetworkManagerPolicy.c
	  test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- update for changes to NMIP4Config for multiple IPv4 addresses

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route): don't add the route if any address
			is on the same subnet as the destination
		- (check_one_address): ignore the exact match, just match family and
			interface index
		- (add_ip4_addresses): add all IPv4 addresses in an NMIP4Config to
			an interface
		- (nm_system_device_set_from_ip4_config): use add_ip4_addresses()
		- (nm_system_vpn_device_set_from_ip4_config): use add_ip4_addresses()

	* introspection/nm-ip4-config.xml
		- Remove 'address', 'gateway', 'netmask', and 'broadcast' properties
		- Add 'addresses' property which is an array of (uuu) tuples of
			address/netmask/gateway

	* libnm-util/nm-setting-ip4-config.c
		- (set_property): use ip-address <-> GValue converters from nm-utils.c

	* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
		- Handle D-Bus interface changes to support multiple IP addresses



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3637 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-06 21:53:22 +00:00
Tambet Ingo 5b2aea3d63 2008-05-06 Tambet Ingo <tambet@gmail.com>
* libnm-glib/nm-dbus-settings.c (fetch_connections_done): Don't leak
	the returned connection paths.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3633 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-06 07:59:30 +00:00
Dan Williams ae72ec796a Fix GValue type name print
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3632 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-05 17:17:08 +00:00
Dan Williams 2f850a90e6 Build fix
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3631 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-05 16:33:01 +00:00
Tambet Ingo 17f26b8d31 2008-05-05 Tambet Ingo <tambet@gmail.com>
* libnm-glib/nm-dbus-settings.c (constructor): Fix the
	"PropertiesChanged" signal signature.

	* libnm-glib/nm-dbus-connection.c (constructor): Use the common GType
	defined in nm-dbus-glib-types.h.
	Don't register the connection on dbus, we're a proxy class to
	communicate with an already registered connection over dbus.

2008-04-30  Tambet Ingo  <tambet@gmail.com>

	Implement new subclasses of NMSettings and NMExportedConnection to make
	it easier for the applet to access and modify system settings.

	* libnm-glib/nm-dbus-connection.[ch]:
	* libnm-glib/nm-dbus-settings.[ch]:
	* libnm-glib/nm-dbus-settings-system.[ch]: Implement.

	* libnm-glib/Makefile.am: Add the new files to build, generate some more
	bindings and glue.

	* include/NetworkManager.h: Define the system settings DBus interface.

2008-04-30  Tambet Ingo  <tambet@gmail.com>

	Implement additional C API for exported connections to make them identical
	with the DBus API. Change the (list_connections) virtual function to be
	more usable from C - instead of requiring implementers to return a GPtrArray
	of dbus paths, return a list of connections.

	* libnm-glib/nm-settings.c (nm_exported_connection_class_init): Fix a typo.
	(nm_settings_list_connections):
	(nm_exported_connection_new):
	(nm_exported_connection_update):
	(nm_exported_connection_delete): Implement.

	(impl_settings_list_connections):
	(impl_exported_connection_update):
	(impl_exported_connection_delete): Use the new public functions to make
	sure the C and dbus interfaces stay in sync.

	* system-settings/src/dbus-settings.c (list_connections): Return a list of
	connections.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3630 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-05-05 07:07:44 +00:00
Tambet Ingo e6a5d0be51 2008-04-22 Tambet Ingo <tambet@gmail.com>
Implement GKeyFile system settings plugin.
	Implement writing system settings (currently supported only by GKeyFile plugin).

	* system-settings/src/main.c:
	* system-settings/src/dbus-settings.c: Move the communication with plugins
	from main.c to dbus-settings.c. Makes it possible to talk to all registered
	plugins for adding/updating/removing connections.

	* system-settings/src/nm-system-config-interface.c
	(nm_system_config_interface_add_connection): Implement
	(nm_system_config_interface_update_connection): Implement.
	(nm_system_config_interface_remove_connection): Implement.

	* system-settings/plugins/keyfile/Makefile.am:
	* system-settings/plugins/keyfile/plugin.[ch]:
	* system-settings/plugins/keyfile/writer.[ch]:
	* system-settings/plugins/keyfile/reader.[ch]: Implement.

	* system-settings/plugins/Makefile.am: Add GKeyFile plugin.

	* configure.in: Generate GKeyFile Makefile.

	* libnm-glib/nm-settings.c (impl_exported_connection_get_id): Fix a memory
	corruption, need to duplicate the returned string.
	(impl_exported_connection_update): Implement.
	(impl_exported_connection_delete): Implement.

	* introspection/nm-settings-system.xml: Add "AddConnection" method.

	* introspection/nm-exported-connection.xml: Add "Update" and "Delete" methods.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3587 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-22 14:48:02 +00:00
Dan Williams 675d12263a 2008-04-21 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Add NMActiveConnectionState enum

	* introspection/nm-active-connection.xml
	  introspection/nm-vpn-connection.xml
		- Add 'State' property for overall active connection state
		- Add 'Default' property, when True means this active connection
			has the default route
		- Add PropertyChanged signals so changes actually go out over the bus

	* src/nm-active-connection.h
		- Add defines for State & Default properties

	* src/nm-activation-request.c
		- Add 'state' and 'default' properties, hook up to device 'state-changed'
			signal to determine active connection state

	* src/vpn-manager/nm-vpn-connection.c
	  src/vpn-manager/nm-vpn-connection.h
	  src/vpn-manager/nm-vpn-manager.c
	  src/vpn-manager/nm-vpn-service.c
		- Rename old 'state' to 'vpn-state'
		- Rename nm_vpn_connection_get_state() -> nm_vpn_connection_get_vpn_state()
		- Add 'state' and 'default' properties, hook up to the vpn connection's
			'vpn-state-changed' signal

	* libnm-glib/nm-active-connection.c
	  libnm-glib/nm-active-connection.h
		- Add new 'state' and 'default' properties and accessors

	* libnm-glib/nm-vpn-connection.c
	  libnm-glib/nm-vpn-connection.h
		- Rename old 'state' property to 'vpn-state'
		- Add new 'state' and 'default' properties and accessors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3582 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-22 00:28:02 +00:00
Dan Williams 702ad9c9a8 2008-04-15 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.c
		- (get_product_and_vendor): handle serial devices correctly
		- (nm_device_update_description): pass device to get_product_and_vendor()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3565 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-16 13:41:56 +00:00
Dan Williams 1e1c99afba 2008-04-15 Dan Williams <dcbw@redhat.com>
Remove exposure of wireless-tools mode types in the API.

	* include/NetworkManager.h
		- Define NM80211Mode enum

	* introspection/generic-types.xml
		- Describe NM_802_11_MODE enum
		- Remove IW_MODE_* enum

	* introspection/nm-access-point.xml
	  libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- 'mode' is now of type NM80211Mode, a DBUS_TYPE_UINT

	* introspection/nm-device-802-11-wireless.xml
	  libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-device-802-11-wireless.h
		- 'mode' is now of type NM80211Mode, a DBUS_TYPE_UINT

	* libnm-util/nm-setting-wireless.c
	  src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
	  src/nm-device-802-11-wireless.c
	  src/nm-device-802-11-wireless.h
	  test/nm-tool.c
		- Use NM80211Mode not IW_MODE_*



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3562 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-15 20:39:34 +00:00
Dan Williams 91ef98d3ce Add missing include
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3549 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-10 02:51:17 +00:00
Dan Williams 9a49506152 2008-04-08 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-object-cache.c
	  libnm-glib/nm-settings.c
	  src/dhcp-manager/nm-dhcp-manager.c
	  system-settings/plugins/ifcfg-fedora/plugin.c
	  system-settings/plugins/ifcfg-suse/plugin.c
	  system-settings/src/nm-system-config-hal-manager.c
	  libnm-util/nm-utils.c
		- Remove usage of GStaticMutex since gcc-4.3 hates it and because we're
			not threadsafe anyway



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3548 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 21:15:45 +00:00
Dan Williams c53aa093e1 2008-04-07 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- Proxy the 'managed' property



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3543 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 03:58:43 +00:00
Dan Williams 54aac18883 2008-04-07 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Remove the DOWN and CANCELLED device states
		- Add UNMANAGED and UNAVAILABLE device states
		- Document the device states

	* introspection/nm-device.xml
	  src/nm-device-interface.c
	  src/nm-device-interface.h
		- Add the 'managed' property

	* test/nm-tool.c
		- (detail_device): print out device state

	* src/NetworkManagerSystem.h
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerDebian.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerMandriva.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerSuSE.c
		- (nm_system_device_get_system_config, nm_system_device_get_disabled
		   nm_system_device_free_system_config): remove; they were unused and
			their functionality should be re-implemented in each distro's
			system settings service plugin 

	* src/nm-gsm-device.c
	  src/nm-gsm-device.h
	  src/nm-cdma-device.c
	  src/nm-cdma-device.h
		- (*_new): take the 'managed' argument

	* src/nm-device.c
		- (nm_device_set_address): remove, fold into nm_device_bring_up()
		- (nm_device_init): start in unmanaged state, not disconnected
		- (constructor): don't start device until the system settings service
			has had a chance to figure out if the device is managed or not
		- (nm_device_deactivate, nm_device_bring_up, nm_device_bring_down):
			don't set device state here, let callers handle that as appropriate
		- (nm_device_dispose): don't touch the device if it's not managed
		- (set_property, get_property, nm_device_class_init): implement the
			'managed' property
		- (nm_device_state_changed): bring the device up if its now managed,
			and deactivate it if it used to be active
		- (nm_device_get_managed, nm_device_set_managed): do the right thing
			with the managed state

	* src/nm-hal-manager.c
		- (wired_device_creator, wireless_device_creator, modem_device_creator):
			take initial managed state and pass it along to device constructors
		- (create_device_and_add_to_list): get managed state and pass to
			type creators

	* src/nm-device-802-11-wireless.c
		- (real_can_activate): fold in most of
			nm_device_802_11_wireless_can_activate()
		- (can_scan): can't scan in UNAVAILABLE or UNMANAGED
		- (link_timeout_cb): instead of deactivating, change device state and
			let the device state handler to it
		- (real_update_hw_address): clean up
		- (state_changed_cb): when entering UNAVAILABLE state, schedule an idle
			handler to transition to DISCONNECTED if the device isn't rfkilled

	* src/nm-device-802-3-ethernet.c
		- (set_carrier): move above callers and get rid of prototype
		- (device_state_changed): when entering UNAVAILABLE state, schedule an
			idle handler to transition to DISCONNECTED if the device has a
			carrier
		- (real_update_hw_address): clean up
		- (link_timeout_cb, ppp_state_changed): change state instead of calling
			deactivation directly as deactivation doesn't change state anymore

	* src/NetworkManagerPolicy.c
		- (schedule_activate_check): yay, remove wireless_enabled hack since
			the NMManager and wireless devices work that out themselves now
		- (device_state_changed): change to a switch and update for new device
			states
		- (device_carrier_changed): remove; device handles this now through
			state changes
		- (device_added): don't care about carrier any more; the initial
			activation check will happen when the device transitions to
			DISCONNECTED

	* src/nm-manager.c
		- (dispose): clear unmanaged devices
		- (handle_unmanaged_devices): update unmanaged device list and toggle
			the managed property on each device when needed
		- (system_settings_properties_changed_cb): handle signals from the
			system settings service
		- (system_settings_get_unmanaged_devices_cb): handle callback from
			getting the unmanaged device list method call
		- (query_unmanaged_devices): ask the system settings service for its
			list of unmanaged devices
		- (nm_manager_name_owner_changed, initial_get_connections): get unmanaged
			devices
		- (manager_set_wireless_enabled): push rfkill state down to wireless
			devices directly and let them handle the necessary state transitions
		- (manager_device_state_changed): update for new device states
		- (nm_manager_add_device): set initial rfkill state on wireless devices
		- (nm_manager_remove_device): don't touch the device if it's unmanaged
		- (nm_manager_activate_connection): return error if the device is
			unmanaged
		- (nm_manager_sleep): handle new device states correctly; don't change
			the state of unavailable/unmanaged devices

	* libnm-glib/nm-device-802-11-wireless.c
		- (state_changed_cb): update for new device states



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3540 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-08 02:58:02 +00:00
Dan Williams 0422784433 2008-04-05 Dan Williams <dcbw@redhat.com>
* Makefile.am
	  configure.in
	  marshallers/Makefile.am
	  marshallers/nm-marshal-main.c
	  marshallers/nm-marshal.list
		- Consolidate marshallers

	* libnm-glib/nm-marshal-main.c
	  libnm-glib/nm-marshal.list
	  src/marshallers/Makefile.am
	  src/marshallers/nm-marshal-main.c
	  src/marshallers/nm-marshal.list
		- Remove

	* libnm-glib/Makefile.am
	  src/Makefile.am
	  src/dhcp-manager/Makefile.am
	  src/ppp-manager/Makefile.am
	  src/supplicant-manager/Makefile.am
	  src/vpn-manager/Makefile.am
		- Use consolidated marshallers



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3533 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-05 16:28:24 +00:00
Dan Williams f934f0b1f7 2008-04-03 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
	    - (nm_exported_connection_get_id): new function
		- (impl_exported_connection_get_id): use nm_exported_connection_get_id()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3528 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-04-03 18:19:19 +00:00
Dan Williams 59731b9cbd 2008-03-31 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
		- (activate_cb): pass the new active connection to callback; fix
			message when no callback is specified



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3518 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-31 14:47:19 +00:00
Dan Williams f7943baac4 Remove uneccessary array free
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3516 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-30 22:19:53 +00:00
Dan Williams 961e3e7bf7 2008-03-29 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (access_point_added_proxy): create new APs if not found



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3512 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-29 20:07:30 +00:00
Dan Williams 512350a5cd 2008-03-29 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (proxy_name_owner_changed): tell wireless devices about rfkill state
			before freeing them



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3511 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-29 20:03:07 +00:00
Dan Williams c01b4c9e2e 2008-03-27 Dan Williams <dcbw@redhat.com>
* nm-object.c
		- (nm_object_queue_notify): don't notify multiple times for the same
			property

	* nm-object-private.h
		- (handle_ptr_array_return): return NULL if the given array is NULL or
			if it has zero elements

	* nm-ip4-config.c
		- (finalize): use g_ptr_array_foreach() when freeing domains
		- (nm_ip4_config_get_domains): use handle_ptr_array_return()

	* nm-active-connection.c
		- (nm_active_connection_get_devices): use handle_ptr_array_return()

	* nm-device-802-11-wireless.c
	  nm-device-802-11-wireless.h
		- (nm_device_802_11_wireless_get_access_points): return const; use
			handle_ptr_array_return()

	* nm-types.c
		- (nm_object_array_demarshal): always create an array, even of length
			zero, to distinguish between "NM returned no items" and "haven't
			asked NM yet"

	* nm-client.c
		- (dispose): free active connections too
		- (proxy_name_owner_changed): free active connections too when NM goes
			away
		- (nm_client_get_devices): return const; use handle_ptr_array_return()
		- (nm_client_get_active_connections): use handle_ptr_array_return()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3506 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-27 14:10:43 +00:00
Dan Williams ec89663e7d 2008-03-26 Dan Williams <dcbw@redhat.com>
Rework VPN connection handling for a more consistent D-Bus API.  The
	VPNManager object has been removed, and active VPN connections are now the
	same as any other active connection.  The Manager object's ActivateConnection
	and DeactivateConnection methods are used to start and stop a VPN connection,
	and the VPNConnection objects are subclasses of the ActiveConnection objects.
	When activating a VPN connection, pass the path of the active connection
	to which the VPN connection is tied in the 'specific_object' argument.

	Consequently, the libnm-glib API has been reworked to match this arrangement,
	with the VPNManager object removed, and the NMVPNConnection objects now
	being subclasses of NMActiveConnection.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3504 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-26 13:43:01 +00:00
Dan Williams 56010ad03a 2008-03-25 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-active-connection.c
	  libnm-glib/nm-access-point.c
		- Use nm_object_queue_notify() instead of g_object_notify()

	* libnm-glib/nm-device.c
		- (demarshal_ip4_config): distinguish between successful but missing
			ip4-config request, and unsuccessful and missing ip4-config request
		- (nm_device_get_ip4_config): don't try to demarshal a NULL ip4-config
			path
		- Use nm_object_queue_notify() instead of g_object_notify()

	* libnm-glib/nm-device-802-11-wireless.c
		- (demarshal_active_ap): distinguish between successfull but missing
			active-ap request, and unsuccessful and missing active-ap request
		- (dispose, clean_up_aps): consolidate AP list and active AP clearing
			code
		- (nm_device_802_11_wireless_set_wireless_enabled): add a private hook
			for the NMClient to notify the device that wireless is disabled,
			and therefore to clear the AP list and active AP
		- Use nm_object_queue_notify() instead of g_object_notify()

	* libnm-glib/nm-client.c
		- (poke_wireless_devices_with_rf_status): new function
		- (update_wireless_status): notify wireless devices of the rfkill status
			so they can clean up if needed
		- Use nm_object_queue_notify() instead of g_object_notify()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3502 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-25 12:41:17 +00:00
Dan Williams 9a163be59a 2008-03-25 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-object.c
	  libnm-glib/nm-object-private.h
		- (nm_object_queue_notify): add helper to batch & postpone GObject notify
			signals to an idle handler
		- (nm_object_get_property): add a timeout to the D-Bus method call



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3501 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-25 11:34:33 +00:00
Dan Williams 0e2a163856 2008-03-25 Dan Williams <dcbw@redhat.com>
* introspection/nm-device-cdma.xml
	  introspection/nm-device-gsm.xml
	  introspection/Makefile.am
	  introspection/all.xml
		- Add introspection for CDMA and GSM devices for PropertiesChanged signal

	* src/nm-gsm-device.h
	  src/nm-gsm-device.c
	  src/nm-cdma-device.h
	  src/nm-cdma-device.c
	  src/Makefile.am
		- Implement PropertiesChanged signals

	* libnm-glib/nm-cdma-device.c
	  libnm-glib/nm-cdma-device.c
		- Attach to PropertiesChanged signals



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3500 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-25 11:32:44 +00:00
Dan Williams d60eb8d3ba 2008-03-25 Dan Williams <dcbw@redhat.com>
* introspection/nm-device-cdma.xml
	  introspection/nm-device-gsm.xml
	  introspection/Makefile.am
	  introspection/all.xml
		- Add introspection for CDMA and GSM devices for PropertiesChanged signal

	* src/nm-gsm-device.h
	  src/nm-gsm-device.c
	  src/nm-cdma-device.h
	  src/nm-cdma-device.c
	  src/Makefile.am
		- Implement PropertiesChanged signals

	* libnm-glib/nm-cdma-device.c
	  libnm-glib/nm-cdma-device.c
		- Attach to PropertiesChanged signals



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3499 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-25 11:31:33 +00:00
Dan Williams a95ec1b046 Ensure that zero-length array translates to NULL
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3498 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-25 11:18:57 +00:00
Dan Williams 4901747c77 Handle errors better when updating active AP
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3497 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-24 19:48:56 +00:00
Dan Williams c5a9312e24 2008-03-24 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (client_device_added_proxy): add new devices to the internal device
			list so they appear to clients



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3496 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-24 19:30:11 +00:00
Dan Williams 007351657f 2008-03-24 Dan Williams <dcbw@redhat.com>
Massive fixup of libnm-glib to:
	a) have all objects (with the exception of VPN) cache their properties and
		update them asynchronously on PropertiesChanged signals from NM
	b) return internal const data for most attributes/properties instead of
		allocated values that the caller must free
	c) cache wrapped objects such that a given D-Bus path will always map to the
		same GObject returned by libnm-glib
	d) remove a few signals and move them to GObject property notifications
	e) match recent NM D-Bus API changes for activation/deactivation
	f) remove some private functions from libnm-glib headers



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3491 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-24 15:17:30 +00:00
Dan Williams 393685203f 2008-03-20 Dan Williams <dcbw@redhat.com>
* introspection/nm-manager.xml
	  introspection/nm-manager-client.xml
		- (ActivateConnection): return the object path of the active connection
			on success
		- (GetActiveConnections): remove
		- (DeactivateConnection): new function; deactivate a currently active
			connection
		- Add an ActiveConnections property which returns an array of
			active connection object paths

	* introspection/nm-device.xml
		- (Deactivate): remove

	* introspection/all.xml
		- Add ActiveConnection introspection

	* introspection/nm-active-connection.xml
		- Add the ActiveConnection object

	* include/NetworkManager.h
		- Add the Connection.Active D-Bus interface

	* src/nm-device-interface.c
		- (impl_device_deactivate): remove

	* src/nm-activation-request.c
	  src/nm-activation-request.c
	  src/Makefile.am
		- Implement the Connection.Active D-Bus interface

	* src/nm-manager.c
		- (get_property, nm_manager_class_init): add ACTIVE_CONNECTIONS property
		- (nm_manager_activate_device): return the active connection path
		- (connection_added_default_handler, impl_manager_activate_connection):
			return the active connection to the caller
		- (add_one_connection_element, impl_manager_get_active_connections):
			remove
		- (impl_manager_deactivate_connection): new function; deactivate an
			active connection

	* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- Remove Deactivate() function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3484 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-20 19:56:12 +00:00
Dan Williams fbb5062271 2008-03-19 Dan Williams <dcbw@redhat.com>
* introspection/nm-manager.xml
	  introspection/nm-manager-client.xml
		- Rename the ActivateDevice method to ActivateConnection to better
			reflect it's usage; it's arguments get reordered a bit too
		- Convert GetActiveConnections method return from a struct to a dict

	* include/NetworkManager.h
		- Define the dict keys for return value of GetActiveConnections

	* src/nm-manager.c
		- impl_manager_activate_device -> impl_manager_activate_connection
		- (add_one_connection_element): return a populated hash table, not
			a structure

	* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
		- nm_client_activate_device -> nm_client_activate_connection
		- nm_client_free_active_connection_element -> nm_client_free_active_connections_element
		- (nm_client_get_active_connections): return a GSList of GHashTables,
			instead of the custom structures.  Each element of the returned list
			must be freed with nm_client_free_active_connections_element()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3482 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-19 20:58:21 +00:00
Dan Williams a90c522da9 2008-03-14 Dan Williams <dcbw@redhat.com>
* include/wireless-helper.h
	  include/Makefile.am
		- One place for all the junk needed for #including wireless.h

	* test/nm-tool.c
	  src/NetworkManagerAP.c
	  src/wpa.c
	  src/Makefile.am
	  libnm-util/nm-utils.c
	  libnm-util/nm-setting-wireless.c
	  libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-access-point.c
	  libnm-glib/libnm-glib-test.c
		- include wireless-helper.h, not iwlib.h

	* configure.in
		- Don't need libiw really, just need to check for wireless.h

	* src/kernel-types.h
		- Remove; used types moved into wpa.c

	* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_update_signal_strength,
		   real_get_generic_capabilities, nm_device_802_11_wireless_get_mode,
		   nm_device_802_11_wireless_set_mode,
		   nm_device_802_11_wireless_get_frequency,
		   nm_device_802_11_wireless_get_ssid,
		   nm_device_802_11_wireless_set_ssid,
		   nm_device_802_11_wireless_get_bitrate,
		   nm_device_802_11_wireless_get_bssid,
		   nm_device_802_11_wireless_disable_encryption): use ioctl() directly
			instead of iwlib functions




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3462 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-14 21:12:03 +00:00
Dan Williams ea7fd7fffd 2008-03-12 Dan Williams <dcbw@redhat.com>
Harmonize the 802.11 bitrate API

	* introspection/nm-access-point.xml
		- 'Rate' -> 'MaxBitrate'; clarify units

	* introspection/nm-device-802-11-wireless.xml
		- Clarify units of 'Bitrate'

	* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
		- (set_property, get_property, nm_ap_class_init): rename 'rate'
			property to 'max-bitrate'
		- (foreach_property_cb): convert rate to Kb/s

	* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_bitrate): return rate in Kb/s

	* libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- 'rate' -> 'max-bitrate'

	* test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- Fix up for these changes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3432 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 17:44:39 +00:00
Dan Williams f30cf17bf7 2008-03-12 Dan Williams <dcbw@redhat.com>
Move the 'carrier' property from NMDevice to NMDevice8023Ethernet;
	convert the libnm-glib NMDevice8023Ethernet to cached properties

	* introspection/nm-device-802-3-ethernet.xml
		- New 'Carrier' property
		- New 'PropertiesChanged' signal

	* introspection/nm-device.xml
		- Remove 'Carrier' property
		- Remove 'CarrierChanged' signal

	* src/nm-device-interface.c
	  src/nm-device-interface.h
		- (nm_device_interface_init): remove 'carrier' property and
			'carrier-changed' signal

	* src/nm-device.c
	  src/nm-device.h
		- (nm_device_get_carrier, nm_device_set_carrier): remove
		- (nm_device_activate_stage5_ip_config_commit): don't bother updating
			the link here; wired device will handle that
		- (handle_dhcp_lease_change): don't bother updating link here
		- (get_property, nm_device_class_init): remove carrier property

	* src/nm-device-802-11-wireless.c
		- (real_update_link, nm_device_802_11_wireless_class_init): remove
			real_update_link(); wireless devices don't use carrier at all
		- (link_timeout_cb, supplicant_iface_state_cb_handler,
		   supplicant_iface_connection_state_cb_handler,
		   supplicant_mgr_state_cb_handler): remove anything to do with carrier

	* src/nm-device-802-3-ethernet.c
	  src/nm-device-802-3-ethernet.h
		- (nm_device_802_3_ethernet_carrier_on,
		   nm_device_802_3_ethernet_carrier_off, constructor): use set_carrier()
			instead of nm_device_set_carrier()
		- (device_state_changed): update link from sysfs on activation;
			replaces real_update_link()
		- (real_update_link): remove, replaced by device_state_changed()
		- (nm_device_802_3_ethernet_get_carrier, set_carrier): new functions
		- (nm_device_802_3_ethernet_get_speed): move up with other getters/setters
		- (real_get_generic_capabilities, real_can_interrupt_activation): use
			new get_carrier function
		- (get_property): add 'carrier' property
		- (nm_device_802_3_ethernet_class_init): add 'carrier' property and
			hook into property-changed signal helper

	* src/NetworkManagerPolicy.c
		- (device_carrier_changed): will only ever be called with a wired device
		- (device_added): only hook up to carrier-changed for wired devices

	* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- (constructor, nm_device_class_init): remove carrier-changed signal
		- (device_carrier_changed_proxy): remove; unused
		- (nm_device_get_carrier): remove; carrier a property of wired devices

	* libnm-glib/nm-device-802-3-ethernet.c
	  libnm-glib/nm-device-802-3-ethernet.h
		- Convert to cached properties like AP and Wireless objects
		- (nm_device_802_3_ethernet_get_hw_address): now returns a 'const char *'
			instead of a 'char *', return value should not be freed
		- (nm_device_802_3_ethernet_get_carrier): return current carrier status
		- (constructor): hook into properties-changed helper
		- (set_property, get_property): new functions
		- (nm_device_802_3_ethernet_class_init): export GObject properties

	* test/nm-tool.c
		- (detail_device): strdup the wired hardware address too since it's
			cached now

	* libnm-glib/libnm-glib-test.c
		- (dump_wired): strdup the wired hardware address too since it's
			cached now



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3428 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-12 16:12:39 +00:00
Dan Williams bf974b6aa4 2008-03-07 Dan Williams <dcbw@redhat.com>
Change manager's StateChange signal to StateChanged for consistency.

	* introspection/nm-manager.xml
		- Add 'StateChanged' signal
		- Move 'StateChange' down to the deprecated section

	* src/nm-hal-manager.c
		- (nm_hal_manager_new): connect to 'state-changed' instead

	* src/NetworkManagerPolicy.c
		- (nm_policy_new): connect to 'state-changed' instead

	* src/nm-manager.c
	  src/nm-manager.h
		- (nm_manager_update_state): emit both 'state-changed' and 'state-change'
		- (nm_manager_class_init): add 'state-changed' and not the deprecation
			of 'state-change'

	* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
		- (constructor, nm_client_class_init, client_state_changed_proxy):
			track and proxy 'state-changed' instead of 'state-change'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3393 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 23:17:48 +00:00
Dan Williams 593520f9a8 2008-03-07 Dan Williams <dcbw@redhat.com>
* src/nm-hal-manager.c
		- (nm_get_device_driver_name): use net.originating_device first, fall
			back to physical device.  HAL has deprecated physical_device.

	* libnm-glib/nm-device.c
		- (get_product_and_vendor): use net.originating_device first, fall
			back to physical device.  HAL has deprecated physical_device.
		- (nm_device_update_description): s/physical_device_udi/orig_dev_udi



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3386 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-07 17:13:38 +00:00
Dan Williams 529a246913 2008-03-04 Dan Williams <dcbw@redhat.com>
Patch from Michael Biebl <biebl@debian.org>

	* NetworkManager.pc.in
		- doesn't actually depend on dbus-1

	* libnm-util/nm-utils.h
		- remove unused #include <dbus/dbus.h>

	* libnm-glib/libnm_glib.pc.in
		- depends on glib and dbus-glib



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3374 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-04 21:59:24 +00:00
Dan Williams d70072b20a 2008-02-25 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.c
		- (set_property): use g_value_dup_object() to ref the object as was
			intended originally



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3343 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-25 22:08:45 +00:00
Dan Williams fd0ab916c8 2008-02-20 Dan Williams <dcbw@redhat.com>
* Global rename of NMConnectionSettings -> NMExportedConnection to cut down
		on confusing names

	* Add 'path' and 'scope' properties to NMConnection since both NM and the
		applet were having to hack this in anyway.  Remove the 'path' stuff from
		NMExportedConnection

	* Internally rename NMConnectionType -> NMConnectionScope

	* Provide default implementations of the 'get_id' and 'get_settings' methods
		of NMExportedConnection



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3334 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-20 22:37:39 +00:00
Dan Williams 7bd325bc42 Fix leak
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3270 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-26 05:53:29 +00:00
Dan Williams 4c2f6219a9 2008-01-24 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (get_access_point): move the "/" check here; check for invalid path
			too
		- (nm_device_802_11_wireless_set_active_ap): leave the "/" check up
			to get_access_point()
		- (access_point_added_proxy, access_point_removed_proxy): don't try
			to send signals for non-existent access points



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3269 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-24 19:07:14 +00:00
Dan Williams 6ef8fc433f 2008-01-24 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_set_active_ap): path of "/" means no AP



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3268 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-24 18:59:50 +00:00
Dan Williams 3d81b8f156 2008-01-23 Dan Williams <dcbw@redhat.com>
* libnm-glib/libnm_glib.c
		- (libnm_glib_init): make thread joinable
		- (libnm_glib_ctx_free): join thread on exit to clean up memory



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3265 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-24 03:03:55 +00:00
Dan Williams 54b327f35a 2008-01-21 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Add CDMA mobile broadband card device type

	* src/nm-hal-manager.c
		- (modem_device_creator): handle both CDMA and GSM modems; the device
			must now be tagged with 'cdma' or 'gsm' capability

	* src/nm-cdma-device.c
	  src/nm-cdma-device.h
	  src/Makefile.am
		- Add the CDMA mobile broadband card device class

	* libnm-util/nm-connection.c
		- (register_default_settings): add NMSettingCdma

	* libnm-util/nm-setting-cdma.c
	  libnm-util/nm-setting-cdma.h
	  libnm-util/Makefile.am
		- Add the CDMA mobile broadband card setting class

	* libnm-glib/nm-cdma-device.c
	  libnm-glib/nm-cdma-device.h
	  libnm-glib/Makefile.am
		- Add the CDMA mobile broadband card GLib proxy class

	* libnm-glib/nm-client.c
		- (get_device): handle CDMA devices too



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3261 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-21 19:14:18 +00:00
Dan Williams c203ada95a 2008-01-13 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_access_points): fix memory leak



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3237 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-01-14 03:23:29 +00:00
Tambet Ingo 0bd26c1abe 2007-12-10 Tambet Ingo <tambet@gmail.com>
* Replace all occurences of 'UMTS' with 'GSM'.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3161 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-10 09:17:40 +00:00
Dan Williams eda2d662cd 2007-12-07 Dan Williams <dcbw@redhat.com>
Noticed by Christian Persch <chpe@gnome.org>

	Always chain up to parent object in dispose and finalize handlers.
		(gnome.org #433112)



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3154 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-12-07 15:32:45 +00:00
Tambet Ingo db5a10dc4d 2007-11-28 Tambet Ingo <tambet@gmail.com>
Merge the beginnings of the new GSM card support.

        * src/ppp-manager/nm-ppp-manager.c (nm_ppp_manager_stop): Remove
        * the
        ppp watch source before killing pppd - If this happens from
g_object_unref()
        then the ppp manager is already destroyed by the time the watch
callback runs.

        * src/nm-hal-manager.c: Add a device_type_name string to the
        * device
        creators, so that we can print a nice human readable string when
a
        device is added.

        * src/nm-umts-device.c (automatic_registration_get_network):
        * Query
        for the activated network, not much is done with the result
thought.

        * src/nm-serial-device.c (nm_serial_device_get_reply):
        * Implement.
        (ppp_ip4_config): Change the device state to activated here for
now.
        (real_check_connection): Make sure the connection includes ppp
setting.

        * libnm-glib/nm-client.c (get_device): Handle umts devices.

        * libnm-glib/Makefile.am: Add the new files to build.

        * libnm-glib/nm-umts-device.c: 
        * libnm-glib/nm-umts-device.h: Implement.

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

        * src/nm-umts-device.c (automatic_registration_get_network): For
        * now, dial
        immediately, nm_serial_device_get_reply() isn't implemented
correctly yet.

        * src/nm-serial-device.c (wait_for_reply_info_destroy): Don't
        * try to remove
        the timeout source - this function is only called when the
timeout source has
        been removed.
        (nm_serial_device_wait_for_reply): Allocate the duplicate
responses array
        to be big enough to contain the terminating zero element as
well.
        The timeout argument is meant to be in seconds now.
        (real_deactivate_quickly): Implement.

        * src/NetworkManager.conf: Allow root to own 
        "org.freedesktop.NetworkManager.PPP", deny it for everybody
else.

        * libnm-util/nm-setting-umts.c: Network type and band properties
        * are ints,
        (not unsigned ints).

        * libnm-util/nm-setting-serial.c (nm_setting_serial_class_init):
        * Fix a 
        small issue with parity bounds - capital letters have lower
ascii codes
        than lower case letters.

        * libnm-util/nm-connection.c (register_default_settings):
        * Register serial
        and umts settings.

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

        Remove the "index" property from devices as not all device types
have this.

        * include/NetworkManager.h (NM_DBUS_PATH_DEVICE): Remove.

        * src/nm-hal-manager.c (nm_get_device_index_from_hal): Remove.
        (wired_device_creator): Get the device interface from hal to
create the device.
        (wireless_device_creator): Ditto.

        * src/nm-device.c (nm_device_init): Remove the index member.
        (constructor): Remove the checks for index property, make
interface property
        a require constructor property.
        Use the HAL udi for DBus path for devices.
        (nm_device_get_index): Remove.
        (set_property): Remove index handling.
        (get_property): Ditto.
        (nm_device_get_dbus_path): Remove.

        * src/nm-device-interface.c (nm_device_interface_init): Remove
        * the index
        property.

        * src/nm-device-802-3-ethernet.c
        * (nm_device_802_3_ethernet_link_activated):
        Access the device index through it's interface.
        (nm_device_802_3_ethernet_link_deactivated): Ditto.
        (nm_device_802_3_ethernet_new): Remove the useless argument
test_dev. Remove
        index argument. Add interface argument.

        * src/nm-device-802-11-wireless.c
        * (nm_device_802_11_wireless_new): Remove
        the useless test_dev argument. Remove index argument. Add
interface arugment.

        * src/NetworkManagerSystem.c
        * (nm_system_device_set_from_ip4_config): Get the
        device index through interface.
        (nm_system_set_mtu): Ditto.

        * introspection/nm-device.xml: Remove the "Index" property.

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

        * src/nm-serial-device.c: 
        * src/nm-serial-device.c: 
        * src/nm-umts-device.c:
        * src/nm-umts-device.h: Implement.

        * src/nm-hal-manager.c (nm_get_device_driver_name):
        * libhal_free_string the string 
        allocated by libhal.
        (modem_device_creator): Implement.
        (register_built_in_creators): Register the modem creator.

        * src/nm-device-802-11-wireless.c
        * (nm_device_802_11_wireless_new): 
        Remove the unused test_dev argument.

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

        * src/Makefile.am: Add new files to build.
        Link in ppp-manager.

        * libnm-util/nm-setting-umts.c: 
        * libnm-util/nm-setting-umts.h: 
        * libnm-util/nm-setting-serial.c: 
        * libnm-util/nm-setting-serial.h: Implement.

        * libnm-util/Makefile.am: Add new files to build.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3116 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-29 14:38:07 +00:00
Dan Williams 6076621fd0 2007-11-26 Dan Williams <dcbw@redhat.com>
* Fix warnings so everything compiles with --enable-more-warnings



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3108 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-26 16:59:47 +00:00
Dan Williams 441a7ad8fc 2007-11-15 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.h
	  libnm-glib/nm-device.c
		- (nm_device_get_product, nm_device_get_vendor): should be returning
			const char *



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3092 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 21:24:50 +00:00
Dan Williams da6ef40b95 2007-11-15 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.c
		- (get_product_and_vendor): don't try to free things that should be
			freed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3091 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-15 21:13:14 +00:00
Dan Williams 29c735dca4 Warning fixes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3083 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-13 21:03:37 +00:00
Dan Williams a2b0d04517 2007-11-13 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.h
	  libnm-glib/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_hw_address): return should be const

	* test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- Fixes for above change



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3082 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-13 20:03:31 +00:00
Dan Williams 65b9233068 2007-11-09 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.h
	  libnm-glib/nm-settings.c
		- (nm_settings_new_error): remove
		- (nm_settings_error_quark): add; instead of nm_settings_new_error,
			clients should use g_set_error() with NM_SETTINGS_ERROR



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3077 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-09 16:24:39 +00:00
Dan Williams b3c00a7be8 2007-10-31 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.h
	  libnm-glib/nm-device.c
		- (nm_device_get_description): remove
		- (nm_device_get_product, nm_device_get_vendor): add
		- (nm_device_update_description): new function (private); walk HAL
			devices to get product and vendor IDs for a specific device



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3058 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-31 22:11:42 +00:00
Dan Williams 89e6709b20 More descriptive error message
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3052 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-29 15:32:35 +00:00
Dan Williams 792b14dec4 2007-10-26 Dan Williams <dcbw@redhat.com>
Patch from Helmut Schaa <hschaa@suse.de> (and more bits from me)

	* src/NetworkManagerAP.c
	  src/NetworkManagerAP.h
	  libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- Make 'rate' property a guint32 to better match with WEXT and
			wpa_supplicant and to allow representation of higher bitrates

	* src/nm-device-802-11-wireless.c
	  introspection/nm-device-802-11-wireless.xml
	  libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-device-802-11-wireless.h
		- Make 'bitrate' property a guint32 to match AP 'rate' property type

	* src/nm-device-802-3-ethernet.c
	  src/nm-device-802-3-ethernet.h
	  introspection/nm-device-802-3-ethernet.xml
	  libnm-glib/nm-device-802-3-ethernet.c
	  libnm-glib/nm-device-802-3-ethernet.h
		- Make 'speed' property a guint32 to match other speed/rate types
		- Make nm_device_802_3_ethernet_get_speed() static

	* test/nm-tool.c
		- Update for the changes above



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3030 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-27 02:58:32 +00:00
Dan Williams 42a732d9b9 2007-10-19 Dan Williams <dcbw@redhat.com>
Split the GetSecrets() call off to a separate D-Bus interface so that it
	can be more easily locked down with D-Bus policy.  Only 'root' (ie, NM)
	should be able to call GetSecrets().

	* include/NetworkManager.h
		- Define the connection secrets D-Bus interface

	* src/vpn-manager/nm-vpn-connection.c
		- (clear_need_auth): get the right proxy object for the connection
			secrets interface
		- (get_connection_secrets): use the connection secrets proxy; send
			empty hints in get secrets request

	* src/nm-activation-request.c
		- (nm_act_request_request_connection_secrets): use the connection
			secrets proxy; send empty hints in get secrets request

	* src/nm-manager.c
	  src/nm-manager.h
		- (connection_get_settings_cb): set the connection secrets proxy on
			the connection object too
		- (internal_new_connection_cb): create the connection secrets proxy

	* introspection/nm-settings-connection.xml
		- Define Connection.Secrets interface and move GetSecrets there
		- Add a 'hints' argument to GetSecrets

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- (impl_connection_settings_get_secrets): add 'hints' argument



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2989 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-19 04:55:05 +00:00
Dan Williams 8d260a57f1 2007-10-16 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (update_wireless_status): consolidate updates of wireless status
		- (constructor): use update_wireless_status()
		- (manager_running): set wireless status off when NM goes away; requery
			the wireless status when NM comes back



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2983 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 20:20:17 +00:00
Dan Williams ef24e205b8 2007-10-16 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (nm_client_activate_device): actually use the fixed-up specific
			object path



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2982 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 20:09:48 +00:00
Dan Williams bebd0e38b8 2007-10-16 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-client.c
		- (nm_client_activate_device): convert NULL specific_object to "/",
			which is used in place of NULL

	* src/nm-manager.c
		- (impl_manager_activate_device): convert "/" specific_object back into
			NULL



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2979 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-16 18:59:36 +00:00
Tambet Ingo 7e2a621f0a 2007-10-15 Tambet Ingo <tambet@gmail.com>
Implement killswitch polling through HAL.

        * src/nm-manager.c: Add wireless hardware status property. Add 
        'properties-changed' signal for changes in wireless and wireless
hardware
        state changes.

        * src/nm-hal-manager.c: Poll hal for killswitch statuses in
        * every 6 seconds
        and update NMManager's wireless hardware state when it has
changed.
        (nm_hal_manager_new): Don't try to add initial devices here -
(hal_init)
        already does that.

        * libnm-glib/nm-client.c: Add wireless hardware status property.
        * Cache the
        values of wireless state and wireless hardware state. Listen for
the
        'properties-changed' signals, update the cached values and emit
notify.

        * include/NetworkManager.h: Fix a typo in a comment.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2975 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-15 14:46:37 +00:00
Tambet Ingo 86306041af 2007-10-12 Tambet Ingo <tambet@gmail.com>
Rework the "properties-changed" signal listening implementation.
        Add a generic implementation to NMObject class that listens for
        the signal and calls property setters of the target NMObject.

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

        * libnm-glib/nm-device-802-11-wireless.c: Move the GObject
        * consturction
        code to the end of file so that all the static functions are
available
        without extra declarations.
        Remove the "properties-changed" signal handling and use the
framework from
        NMObject.
        Implement property setters for properties that change with 
        "properties-changed" signal.

        * libnm-glib/nm-access-point.c: Ditto.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2972 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-12 10:18:46 +00:00
Tambet Ingo 24adbe3fa4 2007-10-09 Tambet Ingo <tambet@gmail.com>
* src/NetworkManagerUtils.c
        (nm_utils_is_empty_ssid):
        (nm_utils_escape_ssid):
        (nm_utils_same_ssid): Remove. These functions are copied and
pasted in a 
        lot of places, so they belong to libnm-utils instead.

        Now with 100% less compiler warnings:

        * libnm-util/nm-utils.c (nm_dbus_escape_object_path): Remove,
        * unused.
        (nm_dbus_unescape_object_path): Ditto.
        (nm_utils_ssid_to_utf8): Ditto.
        (nm_utils_is_empty_ssid): Move here from
src/NetworkManagerUtils.c
        (nm_utils_escape_ssid): Ditto.
        (nm_utils_same_ssid): Ditto.

        * src/nm-manager.c: Include 'netinet/ether.h' for ether_aton_r.
        (add_one_connection_element): Remove an unused variable.
        (impl_manager_get_active_connections): Ditto.

        * src/NetworkManagerPolicy.c (get_device_connection): Remove an
        * unused
        variable.

        * src/nm-dbus-manager.c (nm_dbus_manager_start_service): Remove
        * a leftover
        from the previous commit.

        * src/nm-device-802-11-wireless.c (set_current_ap): Remove
        * unused variable.
        (real_act_stage1_prepare): Ditto.
        (activation_success_handler): Ditto.
        (get_property): Ditto.

        * src/nm-device-802-3-ethernet.c (real_get_best_connection):
        * Remove unused
        variable.

        * src/ppp-manager/nm-pppd-plugin.c (nm_ip_up): Remove the check
        * for 'ifname',
        it's always set.

        * src/supplicant-manager/nm-supplicant-config.c 
        (nm_supplicant_config_add_setting_wireless): Cast the
GByteArray's 'guint8 *'
        to expected "char *".
        (nm_supplicant_config_add_setting_wireless): Ditto.
        (nm_supplicant_config_remove_option): Remove, not used.

        * libnm-glib/libnm-glib-test.c (dump_access_point): Frequency is
        * a guint32,
        not double.
        (test_wireless_enabled): Ifdef out unused function.
        (device_deactivate): Ditto.
        (device_state_changed): Ditto.
        (nm_utils_is_empty_ssid): Remove, it's now in libnm-utils.
        (nm_utils_escape_ssid): Ditto.

        * test/nm-tool.c (nm_utils_escape_ssid): Remove, it's now in
        * libnm-utils.
        (nm_utils_is_empty_ssid): Ditto.

        * libnm-glib/nm-client.c
        * (nm_client_free_active_connection_element): Remove
        unused variable.

        * libnm-util/nm-setting.c (setting_wireless_destroy): Remove
        * unused variable.
        (setting_vpn_properties_update_secrets): Ditto.
        (int_to_gvalue): Ifdef out for now, not used.
        (byte_to_gvalue): Ditto.

        * libnm-util/dbus-dict-helpers.c
        * (_nmu_dbus_add_dict_entry_string_array): 
        Unused, remove.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2960 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-09 08:57:35 +00:00
Dan Williams d030019245 2007-10-06 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_get_active_access_point): don't segfault
			on error when getting the active access point over D-Bus from NM



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2939 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-06 04:24:30 +00:00
Dan Williams 1f2cdcab4d 2007-10-05 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device-802-11-wireless.c
		- Cache properties and update cached properties on D-Bus signals from NM



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2937 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-05 20:54:13 +00:00
Dan Williams 37f9149cb7 2007-10-05 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
		- (nm_access_point_get_hw_address): return 'const char *', not 'char *'
			because the value is cached internally now.  Callers should not
			free the internal value.
		- Make signal name defines private

	* test/nm-tool.c
	  libnm-glib/libnm-glib-test.c
		- Don't free value returned from nm_access_point_get_hw_address()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2935 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-05 16:00:06 +00:00
Dan Williams 27a1a0e95a 2007-10-04 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.c
		- (nm_connection_settings_class_init): provide correct type for argument
			to the Updated signal so that dbus-glib knows how to marshal it



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2931 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-04 14:08:08 +00:00
Dan Williams 3874276f91 Ensure the GError is clear before using
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2930 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-04 14:07:25 +00:00
Dan Williams fc8130ddd0 2007-10-03 Dan Williams <dcbw@redhat.com>
* src/nm-device-802-11-wireless.c
	  src/nm-device-802-11-wireless.h
	  introspection/nm-device-802-11-wireless.xml
		- GetActiveNetworks -> GetAccessPoints
		- ActiveNetwork -> ActiveAccessPoint
		- NetworkAdded -> AccessPointAdded
		- NetowrkRemoved -> AccessPointRemoved

	* libnm-glib/nm-device-802-11-wireless.c
	  libnm-glib/nm-device-802-11-wireless.h
		- network-added signal -> access-point-added
		- network-removed signal -> access-point-removed
		- nm_device_802_11_wireless_get_active_network() ->
			nm_device_802_11_wireless_get_active_access_point()
		- nm_device_802_11_wireless_get_network_by_path() ->
			nm_device_802_11_wireless_get_access_point_by_path()
		- nm_device_802_11_wireless_get_networks() ->
			nm_device_802_11_wireless_get_access_points()

	* libnm-glib/libnm-glib-test.c
	  test/nm-tool.c
	  src/NetworkManagerPolicy.c
		- Fixups for Network -> AccessPoint



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2928 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-03 18:20:35 +00:00
Dan Williams f9fd8667d1 2007-10-03 Dan Williams <dcbw@redhat.com>
Add a GetActiveConnections() method on the Manager object.

	* src/nm-manager.c
	  src/nm-manager.h
	  introspection/nm-manager.xml
		- (connection_get_settings_cb): keep connection type around too
		- (impl_manager_get_active_connections, add_one_connection_element):
			implement; returns all active connections and what devices they
			apply to

	* libnm-glib/nm-client.c
	  libnm-glib/nm-client.h
	  introspection/nm-manager-client.xml
		- (nm_client_get_devices): GPtrArray elements are allocated and owned
			by the caller; free here to avoid memory leak
		- (nm_client_get_active_connections): implement; return the list of
			active connections
		- (nm_client_free_active_connection_element): implement; free an element
			of the GSList returned by nm_client_get_active_connections()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2927 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-03 14:48:25 +00:00
Dan Williams 84cd0661af 2007-10-01 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.c
		- (nm_device_class_init): actually tell glib about the carrier-changed
			signal



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2921 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-02 01:12:14 +00:00
Dan Williams e5b834c1f9 2007-10-01 Dan Williams <dcbw@redhat.com>
* include/NetworkManagerVPN.h
		- define VPN connection state change reason codes

	* src/vpn-manager/Makefile.am
	  src/vpn-manager/nm-vpn-marshal.list
	  src/vpn-manager/nm-vpn-marshal-main.c
		- Add marshallers for StateChanged signal

	* introspection/nm-vpn-connection.xml
		- New Banner property
		- StateChanged signal now includes a 'reason' argument

	* src/vpn-manager/nm-vpn-connection.c
	  src/vpn-manager/nm-vpn-connection.h
		- Add a "Banner" property that contains the returned VPN server login
			banner (if any); valid only in the ACTIVATED state
		- (nm_vpn_connection_set_state, nm_vpn_connection_disconnect): now takes
			a 'reason' argument and emits that reason along with the
			state-changed signal
		- Fix up calls to nm_vpn_connection_set_state() to include a reason
		- (nm_vpn_connection_ip4_config_get): save banner for later
		- (nm_vpn_connection_get_banner, get_property,
		   nm_vpn_connection_class_init): implement Banner property

	* src/vpn-manager/nm-vpn-service.c
		- (nm_vpn_service_connections_stop): take a reason argument; copy the
			connection list because elements may get added/removed from it
			while iterating over the list
		- (connection_state_changed): signal now includes the 'reason' argument

	* libnm-glib/nm-vpn-connection.c
	  libnm-glib/nm-vpn-connection.h
		- (nm_vpn_connection_get_banner): new function
		- (state_changed_proxy): handle reason argument



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2916 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-01 17:57:36 +00:00
Tambet Ingo 485bcfe571 2007-09-28 Tambet Ingo <tambet@gmail.com>
* src/nm-manager.c:
        * src/nm-manager.h:
        Implement device activation through NMManager.
        Implement "pending device activation" here - If the connection
isn't found,
        we try to wait for up to 5 seconds for the connection to be
provided.
        Add NMConnectionType argument to "connection-added" and
"connection-removed"
        signals.
        (nm_manager_get): Remove. Finally.

        * src/nm-activation-request.c: 
        * src/nm-activation-request.h: 
        Remove all the deferred activation code.

        * src/nm-device.c: Remove all the deferred activation code. Once
        * the device
        activation is started, it's started. Update the activation
virtual function
        signature.

        * src/nm-device-interface.c:
        * src/nm-device-interface.h:
        Device activation now takes only NMActRequest argument.
        Don't expose device activation directly on dbus, it's supposed
to go through
        NMManager now.

        * src/NetworkManagerPolicy.c (nm_policy_device_change_check):
        * Make the code
        a bit more compact.
        Use the new device activation methods through NMManager.

        * introspection/nm-manager-client.xml: 
        * introspection/nm-manager.xml: 
        * libnm-glib/nm-client.c:
        * libnm-glib/nm-client.h:
        Add device activation method.
        
        * libnm-glib/nm-device.c: 
        * libnm-glib/nm-device.h: 
        * introspection/nm-device.xml: 
        Remove device activation method. It's done through NMManager
now.

        * src/vpn-manager/nm-vpn-manager.c (impl_vpn_manager_connect):
        * Use the shiny
        new (nm_manager_get_device_by_path) function, get rid of our own
)find_device).



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2915 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-10-01 15:38:39 +00:00
Dan Williams a3e10d7da2 2007-09-28 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-vpn-connection.c
		- (nm_vpn_connection_get_state): try to update state if the current
			state is UNKNOWN



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2914 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-29 03:59:57 +00:00
Dan Williams 6e47b9a495 2007-09-26 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-vpn-plugin.c
		- (impl_vpn_plugin_need_secrets): fix logic when no secrets are needed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2896 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-27 03:03:09 +00:00
Dan Williams d7696ae510 2007-09-26 Dan Williams <dcbw@redhat.com>
* introspection/nm-vpn-plugin.xml
	  libnm-glib/nm-vpn-plugin.c
	  libnm-glib/nm-vpn-plugin.h
		- (impl_vpn_plugin_need_secrets): implement a call that should return
			the name of the NMSetting in an NMConnection that may require
			secrets specific to that VPN plugin



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2892 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-27 02:20:53 +00:00
Tambet Ingo 571812b40c 2007-09-26 Tambet Ingo <tambet@gmail.com>
* libnm-glib/nm-vpn-plugin.c (nm_vpn_plugin_connect): Update the
        * plugin activation
        method.
        (impl_vpn_plugin_connect): Convert properties hash to
NMConnection, activate, and
        unreference the connection.

        * introspection/nm-vpn-plugin.xml: Modify the 'Connect' method
        * arguments: instead of
        passing properties hash and routes string list, pass
NMConnection (in hashed form).

        * src/vpn-manager/nm-vpn-connection.c
        * (nm_vpn_connection_get_routes): Return routes
        as GSList, no need to copy stuff around anymore.
        (nm_vpn_connection_activate): Update the plugin activation
method.

        * src/NetworkManagerSystem.c
        * (nm_system_vpn_device_set_from_ip4_config): Convert
        routes argument to GSList.

        * vpn-daemons/vpnc/src/nm-vpnc-service.c (real_connect):
        The arguments have changed, update.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2890 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-26 15:42:09 +00:00
Dan Williams 04f8d563fa 2007-09-25 Dan Williams <dcbw@redhat.com>
* introspection/nm-device.xml
	  libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- Add 'Carrier' property to exported NMDevice objects

	* src/nm-device-interface.h
	  src/nm-device-interface.c
	  src/nm-device.c
		- Add a 'carrier' property to internal NMDevice objects



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2884 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-25 17:30:01 +00:00
Dan Williams ae74953a4d 2007-09-25 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- (new_error -> nm_settings_new_error): make public so that subclasses
			can use the same error domain.  Also pass a valid error code to
			g_error_new_literal() so that libdbus doesn't assert when converting
			the GError into a DBusError
		- (impl_settings_list_connections, impl_connection_settings_get_id,
		   impl_connection_settings_get_settings,
		   impl_connection_settings_get_secrets): use new error creator
			function



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2879 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-25 08:45:31 +00:00
Dan Williams 1817c62082 2007-09-25 Dan Williams <dcbw@redhat.com>
Properly re-query secrets from the settings daemon when stuff fails.

	* src/nm-device-802-11-wireless.c
		- (ap_auth_enforced): handle static WEP correctly here by differentiating
			between Shared Key and Open System auth modes
		- (link_timeout_cb, supplicant_connection_timeout_cb,
		   real_act_stage4_ip_config_timeout): clear existing secrets and
			request new ones when something fails due to a suspected wrong key
		- (real_act_stage2_config): fix for new request_new argument to
			nm_manager_get_connection_secrets()

	* src/nm-manager.c
	  src/nm-manager.h
		- (nm_manager_get_connection_secrets): return error status; pass
			new request_new argument on to the settings daemon

	* introspection/nm-settings-connection.xml
		- New 'request_new' argument to the GetSecrets call that hints to the
			settings daemon to ask the user for completely new secrets

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- (impl_connection_settings_get_secrets): handle new 'request_new'
			argument



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2872 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-25 06:21:38 +00:00
Dan Williams 1155cd963f 2007-09-24 Dan Williams <dcbw@redhat.com>
Patch from Ross Burton <ross@burtonini.com>

	* test/nm-tool.c
	  callouts/nm-dhcp-client-action.c
	  src/nm-netlink.c
	  src/vpn-manager/nm-vpn-connection.c
	  libnm-glib/libnm-glib-test.c
		- warning fixes



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2863 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-24 14:58:52 +00:00
Dan Williams f95dd6b2d5 Fix rh #232691; never got onto trunk
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2845 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 16:25:54 +00:00
Dan Williams 8626b35c99 2007-09-20 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-access-point.c
		- (handle_property_changed): strength is a UCHAR



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2837 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-21 02:06:33 +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
Dan Williams 174d339a34 2007-09-20 Dan Williams <dcbw@redhat.com>
* introspection/nm-settings-connection.xml
	  libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- Make GetSecrets asynchronous on the server side



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2829 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-20 09:22:42 +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 b6d82bcc61 2007-09-13 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-vpn-manager.h
	  libnm-glib/nm-vpn-manager.c
		- (nm_vpn_manager_connect): take routes as a GSList, not a char **



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2803 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-13 18:10:46 +00:00
Dan Williams 9cda18eea2 2007-09-13 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-device.c
	  libnm-glib/nm-device.h
		- (nm_device_activate): take a connection object path rather than an
			NMConnection because NMConnection isn't exported over D-Bus and
			therefore it dbus-glib can't automatically get an object path from it



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2801 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-13 11:50:21 +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 ab4aa2d752 2007-09-11 Dan Williams <dcbw@redhat.com>
* introspection/nm-device.xml
	  libnm-glib/nm-device.c
	  libnm-glib/nm-device.c
		- Fix Activate call argument borkage; Activate takes 3 arguments



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2789 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 19:33:29 +00:00
Dan Williams 504b69874f 2007-09-11 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.c
		- (nm_access_point_get_frequency): now returns guint32 to match
			property change on 2007-09-10



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2788 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-11 19:31:59 +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 1e9c50f196 Fix wrong debug comment
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2768 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-07 00:38:53 +00:00
Dan Williams c5d0e07d00 2007-09-06 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-object.c
		- (nm_object_get_string_property, nm_object_get_object_path_property,
		   nm_object_get_int_property, nm_object_get_uint_property,
		   nm_object_get_boolean_property, nm_object_get_byte_property,
		   nm_object_get_double_property, nm_object_get_byte_array_property):
			clear GValues after copying their contents, fixes memory leaks
			after every property access because dbus-glib copies the values
			from the DBusMessage into the GValue already.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2767 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-06 19:17:44 +00:00
Dan Williams 5dc24dd407 2007-09-06 Dan Williams <dcbw@redhat.com>
* introspection/nm-access-point.xml
		- Fix WpaFlags and RsnFlags property names to be what dbus-glib expects
			them to be.  There's some magic property name parsing going on in
			dbus-glib that breaks up property names based on studly-caps and
			puts - between words.

	* libnm-glib/nm-access-point.c
		- (nm_access_point_get_wpa_flags, nm_access_point_get_rsn_flags):
			Fix property names



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2766 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-09-06 19:15:49 +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
Dan Williams a6346fac4a Fix some warnings and other errors
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2755 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-30 21:54:56 +00:00
Dan Williams ad0f89c69f 2007-08-29 Dan Williams <dcbw@redhat.com>
* include/NetworkManager.h
		- Keep NMConnection object path in sync

	* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- Break D-Bus object registration out of the init function, because
		every object that's exported over D-Bus needs to use the _same_
		DBusConnection.  Otherwise, each object would get a different object
		path tree and wouldn't be callable.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2747 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-30 02:45:29 +00:00
Dan Williams 3e4d340871 2007-08-29 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-settings.c
	  libnm-glib/nm-settings.h
		- make the dbus path a property of the object, and autogenerate it.
		It can't be composed of the 'id' field becuase that's not available
		yet during the GObject creation in nm_connection_settings_init()



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2745 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-29 21:13:46 +00:00
Dan Williams 7a8f33aa3d 2007-08-28 Dan Williams <dcbw@redhat.com>
Remove NMAPSecurity objects, they are replaced with flags on the APs for
	each AP's capabilities, and by NMConnection/NMSettings objects for user
	defined connections.

	* include/NetworkManager.h
		- Redefine 802.11 security properties.  There are now device capabilities
			and AP flags and AP security flags.  It was way to unclear before.

	* src/Makefile.am
	  src/nm-ap-security-leap.h
	  src/nm-ap-security-leap.c
	  src/nm-ap-security-wpa-eap.c
	  src/nm-ap-security-wpa-eap.h
	  src/nm-ap-security-private.h
	  src/nm-ap-security-wpa-psk.c
	  src/nm-ap-security-wpa-psk.h
	  src/nm-ap-security-wep.c
	  src/nm-ap-security-wep.h
	  src/nm-ap-security.c
	  src/nm-ap-security.h
		- Removed, to be replaced with NMConnection/NMSettings objects

	* src/nm-dbus-nmi.c
	  src/nm-dbus-nmi.h
		- Removed, to be replaced by code that talks to the new info daemon
			interface and gets NMConnection/NMSettings objects

	* src/backends/NetworkManagerSuSE.c
		- Remove usage of NMAPSecurity; should be replaced by a system-level
			info-daemon that does the same thing but talks the new info-daemon
			D-Bus interface

	* src/NetworkManagerAP.h
	  src/NetworkManagerAP.c
	  src/NetworkManagerAPList.c
	  libnm-glib/libnm-glib-test.c
		- Remove usage of NMAPSecurity objects and adjust to new flags for
			WPA/RSN

	* libnm-glib/nm-access-point.c
	  libnm-glib/nm-access-point.h
	  introspection/nm-access-point.xml
	  test/nm-tool.c
		- Adjust to new flags for AP security

	* utils/nm-utils.c
	  utils/nm-utils.h
	  src/vpn-manager/nm-dbus-vpn.c
		- Remove D-Bus pending call stuff from nm-utils and put it in the VPN
			stuff which is the only place it's used

	* src/nm-device-interface.c
	  src/nm-device-interface.h
	  introspection/nm-device.xml
	  src/nm-activation-request.c
	  src/nm-activation-request.h
	  src/nm-device.c
		- Add a new 'specific_object' argument that hints to NM what actual
			AP or other device-specific thing the connection should apply to.
			NMConnection objects can apply to more than one actual device/AP.

	* libnm-util/nm-connection.c
	* libnm-util/nm-connection.h
		- Add 'have_secrets" call stubs

	* libnm-util/cipher.h
		- Move NM_AUTH_TYPE_* defines here for now

	* src/nm-device-802-11-wireless.c
		- Remove usage of NMAPSecurity, to be replaced with NMConnection/
			NMSettings objects

	* src/NetworkManagerDbus.c
	* src/NetworkManagerPolicy.c
		- Remove usage of update_allowed_networks, should be pushing data in
			a different manner



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2738 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-28 14:47:31 +00:00
Dan Williams 9c9ae6abff 2007-08-16 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (nm_client_init): create VPN connections hash table with key free
			function
		- (proxy_vpn_connection_added): VPN connections hash table key should
			be a duplicated value, not the same memory address as the VPN
			connection name.  This is because the VPN connection name could
			potentially be freed and set to something else during the lifetime
			of the NMVPNConnection object.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2706 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-16 22:54:22 +00:00
Dan Williams e2ca9c32f3 2007-08-15 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- (nm_client_get_best_vpn_state): fix leakage of the vpn connection list



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2696 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 16:25:48 +00:00
Tambet Ingo 8bed6ff2de 2007-08-14 Tambet Ingo <tambet@gmail.com>
* libnm-glib/Makefile.am: Use nm-manager-client.xml to produce
        * nm-client-bindings.

        * introspection/nm-manager-client.xml: Add a horrible horrbile
        * hack to work around
        an issue with dbus-glib bindings generator. The issue is, the
generated C caller
        functions for dbus methods "Sleep(bool)" and "sleep()" both have
the same function
        name and different arguments and it won't compile anymore. To
fix this, we now have
        two copies of nm-manager.xml file. nm-manager.xml contains the
actual interface,
        that is new API + compatibility API and used by the daemon. The
other, 
        nm-manager-client.xml is only the new API without compatibility
bits and is used
        by libnm-glib to make it compile.

        * introspection/nm-manager.xml: Define compatibility methods
        * (sleep, wake, state).

        * src/nm-manager.c (impl_manager_legacy_sleep)
        (impl_manager_legacy_wake, impl_manager_legacy_state): Implement
the compatibility
        interface functions for 0.6 branch.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2688 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-15 07:52:25 +00:00
Dan Williams e3d15a5f73 2007-08-14 Dan Williams <dcbw@redhat.com>
* include/NetworkManagerVPN.h
	  src/vpn-manager/nm-dbus-vpn.c
	  src/vpn-manager/nm-dbus-vpn.h
	  src/vpn-manager/nm-vpn-act-request.c
	  src/vpn-manager/nm-vpn-act-request.h
	  src/vpn-manager/nm-vpn-service.c
	  src/vpn-manager/nm-vpn-service.h
	  libnm-glib/nm-vpn-connection.c
	  libnm-glib/nm-vpn-connection.h
	  libnm-glib/nm-client.h
		- Rename NM_VPN_STATE_* -> NM_VPN_SERVICE_STATE_* and NMVPNState -> 
			NMVPNServiceState to clarify what they apply to
		- Rename NM_VPN_ACT_STAGE_* -> NM_VPN_CONNECTION_STATE_* and
			NMVPNActStage -> NMVPNConnectionState for the same reason

	* libnm-glib/nm-client.c
		- Constant + type renames from above
		- Properly handle NameOwnerChanged/manager_running signals
			for NM service; only emit when state really changes
		- Use hash tables correctly so that the key (which was previously owned
			by the D-Bus message) now has the same lifetime as the value, since
			the key is now taken from the the NMVPNConnection itself.  This
			really fixes the double-VPN names in the applet



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2677 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-14 14:09:57 +00:00
Dan Williams bb95403393 2007-08-13 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-client.c
		- Convert internal VPN connection tracking from a list to a hash table
			to easily avoid duplicates
		- (nm_client_get_vpn_connections): now returns an allocated GSList that
			must be freed by the caller, like nm_client_get_devices()
		- (nm_client_remove_vpn_connection): don't let the removal signal
			leak through for NMVPNConnection objects that aren't actually
			tracked.
		- (manager_running): throw away VPN connection list when NM goes away,
			like with the device list



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2675 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-14 02:55:14 +00:00
Rodrigo Moya 3cd8398aee 2007-08-13 Rodrigo Moya <rodrigo@gnome-db.org>
* include/NetworkManager.h: added DBus path for connection settings.

	* libnm-glib/nm-settings.[ch] (nm_settings_signal_new_connection,
	nm_connection_settings_signal_updated,
	nm_connection_settings_signal_removed): new functions to wrap the
	objects' signals.
	(nm_connection_settings_init): register GObject with DBus.
	(nm_connection_settings_get_dbus_object_path): new function.

	* libnm-glib/Makefile.am: added libnmutil to link flags.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2672 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-13 13:07:33 +00:00
Tambet Ingo fbe9becbd4 2007-08-13 Tambet Ingo <tambet@gmail.com>
* libnm-glib/libnm-glib.pc.in: Rename to libnm_glib.pc.in.

        * libnm-glib/Makefile.am: Add legacy libnm_glib.[ch] to the
        * build.
        Rename the library from libnm-glib to libnm_glib to maintain the
library API
        compatibility with 0.6 branch.

        * Makefile.am: Remove gnome/ SUBDIR.

        * gnome/libnm_glib/libnm_glib.[ch]: Move to libnm-glib/.

        * src/Makefile.am: Remove the WPA_SUPPLICANT_BIN define.

        * dispatcher-daemon/Makefile.am: Link the binary with
        * libnm_glib.

        * configure.in: Remove GNOME checks, NetworkManager does not
        * need any of these
        anymore.
        Remove checks for wpa_supplicant binary, it's used over dbus.
        Remove gnome/ directory files form AC_OUTPUT, that directory is
getting moved.

        * test/Makefile.am: Remove define WPA_SUPPLICANT_BIN.
        Link the binaries with libnm_glib.la.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2669 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-13 07:54:28 +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
Rodrigo Moya 8fa04018cc 2007-08-03 Rodrigo Moya <rodrigo@gnome-db.org>
* introspection/Makefile.am:
	* introspection/nm-settings.xml:
	* introspection/nm-settings-connection.xml: added Settings interfaces.

	* libnm-glib/nm-settings.[ch]:
	* libnm-glib/Makefile.am: added abstract class for Settings interfaces
	containing the DBus implementation.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2656 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-03 16:10:04 +00:00
Dan Williams f4540f0412 2007-06-27 Dan Williams <dcbw@redhat.com>
* Make SSIDs GByteArrays everywhere
	* Rename "essid" -> "ssid" everywhere that's appropriate
	* Refcount activation_ap member of the 802.11 wireless device class



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2620 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-27 16:18:52 +00:00
Tambet Ingo 8c33f85a90 2007-06-27 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-object.[ch]: Add these to the SVN, oops.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2619 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-27 14:02:16 +00:00
Tambet Ingo 636b1140c5 2007-06-21 Tambet Ingo <tambet@ximian.com>
* libnm-glib/Makefile.am: Add NMObject to build, remove nm-utils.[ch].

	* nm-utils.[ch]: Remove.

	* libnm-glib/nm-object.c: Implement a base class for all libnm-glib dbus-aware
	objects for easy property access and dbus connection handling.

	* libnm-glib/nm-client.c: Derive from NMObject.

	* libnm-glib/nm-device.c: Ditto.

	* libnm-glib/nm-device-802-3-ethernet.c: Changes for being based on NMObject.

	* libnm-glib/nm-device-802-11-wireless.c: Ditto.

	* libnm-glib/nm-ip4-config.c: Ditto.

	* libnm-glib/nm-access-point.c: Ditto.

	* libnm-util/nm-connection.c (nm_connection_compare): Add a stub for connection
	comparision. Currently used by the device activation code to determine if the new
	activation is the same as the old one.

	* src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network): Don't use the obsolete and
	wrong way of getting the dbus path for AP. Fixes the issue where the applet isn't
	able to ask password for the AP.

	* src/nm-device.c (nm_device_activate): Change the logic here - instead of giving
	up if the device is already connected, tear down it's connection (if it isn't the
	same as new one) and start the activation.

	* src/nm-manager.c: Add the beginnings of NMConnection storage and signals.

	* src/NetworkManagerAP.c (nm_ap_init): Set the default values to AP memebers, fixes
	the issue where all APs are always listed as encrypted.

	* src/NetworkManagerDbus.c (nm_dbus_get_object_path_for_network): Remove. APs have
	their own registered paths.

	* test/nm-tool.c (detail_device): Don't try to get active network from wireless
	device if it's not connected - dbus-glib will happily crash trying to marshal NULL.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2615 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-22 15:09:02 +00:00
Christopher Aillon 9caa66c446 2007-06-11 Christopher Aillon <caillon@redhat.com>
Patch from Christian Persch <chpe@gnome.org>

	* libnm-glib/Makefile.am:
	* dispatcher-daemon/Makefile.am:
	Use the correct variables, the correct paths, and correct ordering. (446315)


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2588 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-06-12 03:02:38 +00:00
Tambet Ingo ff0fd77b08 2007-05-07 Tambet Ingo <tambet@ximian.com>
* libnm-glib/Makefile.am: Link with libnm-util to gain access to
	NMConnection.

	* libnm-glib/nm-device-802-11-wireless.c:
	(nm_device_802_3_ethernet_activate): Remove.

	* libnm-glib/nm-device-802-3-ethernet.c
	(nm_device_802_3_ethernet_activate): Remove.

	* libnm-glib/nm-device.c (nm_device_activate): Implement.

	* src/nm-device-802-3-ethernet.c: Implement the new activation using
	NMConnection.

	* src/nm-device-802-11-wireless.c: Store an activation AP once the
	activation has started.
	Implement the new activation using NMConnection.

	* src/nm-activation-request.c: Store a generic connection object instead
	of a wireless-specific AP.

	* src/NetworkManagerPolicy.c (create_connection): Implement. Depending
	on device type, create a device specific connection object suitable for
	device activation.

	* src/nm-device.c (nm_device_activate): Re-implement. Call the device
	specific check to validate the connection and on success start the
	activation.

	* src/nm-device-interface.h: Add a activate virtual function to the
	interface definition.

	* src/nm-device-interface.c (nm_device_interface_activate): Implement.
	(impl_device_activate): Implement.

	* introspection/nm-device.xml: Add a generic device activation interface
	that accepts an abstract NMConnection structure that has device-specific
	information in it.

	* introspection/nm-device-802-3-ethernet.xml: Remove the wired-specific
	activation interface.

	* introspection/nm-device-802-11-wireless.xml: Remove the wireless-specific
	activation interface.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2569 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-05-07 15:17:45 +00:00
Tambet Ingo d79895713d 2007-03-27 Tambet Ingo <tambet@ximian.com>
* libnm-glib/Makefile.am: Fix the build issue.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2502 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-27 11:38:17 +00:00
Tambet Ingo 45c54c10b2 2007-03-26 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-vpn-connection.h: 
	* libnm-glib/nm-vpn-connection.c: Implement.

	* libnm-glib/nm-client.c: Add VPN support.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2501 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-26 12:42:29 +00:00
Tambet Ingo e1c3b5538c 2007-03-16 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device.c (nm_device_get_description): Implement.

	* libnm-glib/nm-client.c (nm_client_manager_is_running): Implement. Also add a
	"manager-running" signal that notifies the appearance/disappearance of NM.
	(nm_client_sleep): Implement.

	* libnm-glib/nm-device.c:
	* libnm-glib/nm-device-802-11-wireless.c: 
	* libnm-glib/nm-device-802-3-ethernet.c: 

	Don't inherit from DBusGProxy, add a proxy to private
	data. The reason is, classes inherited from NMDevice wouldn't get any dbus signals
	for anything but their own dbus interface. DBusGProxy objects support only one
	interfaces and to work around this, NMDevice has spearate proxy for each dbus
	interface. The nice side effect of this change is that we do not create a new
	DBusGProxy object for each property access.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2479 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-16 09:37:53 +00:00
Tambet Ingo 96c246cfc4 2007-03-02 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device-802-11-wireless.c
	(nm_device_802_11_wireless_get_capabilities): Implement.

	* libnm-glib/nm-device.c (nm_device_get_capabilities): Implement.

	* src/nm-device-802-11-wireless.c: Add "WirelessCapabilities" property.

	* src/named-manager/nm-named-manager.c (remove_one_zone_from_named): Unref the
	reply only if it's not NULL. Not sure why this started happening right now.

	* src/nm-manager.c (device_stop_and_free): Remove. No need to have different
	code paths for when devices get removed on shutdown or when a device is just
	removed.
	(finalize): Don't use a g_slist_foreach() when removing devices, the list data
	gets freed so any signal from a device (disconnected for instance) would invoke
	NMState update which would crash.
	(nm_manager_remove_device): Bring the device down when it gets removed.

	* src/NetworkManagerPolicy.c (nm_policy_auto_get_best_device): Remove
	the unused dev_type.

	* src/nm-hal-manager.c (create_device_and_add_to_list): Don't keep the
	reference to the added device, NMManager will own it (if it wants).

	* test/nm-tool.c: Rewrite using libnm-glib.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2417 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-05 08:49:30 +00:00
Tambet Ingo 352caa34c6 2007-03-02 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device-802-11-wireless.c: Cache networks (bssids) list.
	We get signalled when it changes.

	* libnm-glib/nm-client.c: Cache NMState and device list, we get signalled
	when it changes.

	* libnm-glib/nm-device.c: Cache the device state property.

	* libnm-glib/nm-access-point.c: Cache the strength property.

	* src/nm-device-802-11-wireless.c: Fix wireless device scanning scheduler.
	The new algorithm is to start from SCAN_INTERVAL_MIN (currently defined as 0)
	and add a SCAN_INTERVAL_STEP (currently 20 seconds) with each successful scan
	until SCAN_INTERVAL_MAX (currently 120 seconds) is reached. Do not scan while
	the device is down, activating, or activated (in case of A/B/G cards).
	Remove some old dead ifdef'ed out code that used to configure wireless devices,
	it's all done through supplicant now.

	* src/supplicant-manager/nm-supplicant-interface.c: Fix the reference
	counting issues with pending calls which caused leaks and crashes when
	interface was removed (now that the interface actually gets removed).

	* src/nm-call-store.c: Make a copy of data before running a foreach
	with user callback on it - The most common usage pattern is to cancel
	(and thus remove) all pending calls with foreach which would modify
	the hash table we're iterating over.

	* src/nm-manager.c: When a device is added, make sure it is "up". When
	it's removed or disabled due to disabling wireless or networking, bring
	it down.

	* include/NetworkManager.h: Add new device state NM_DEVICE_STATE_DOWN.

	* src/nm-device-802-11-wireless.c: 
	* src/nm-device-802-3-ethernet.c: 
	* src/nm-device.c:
		- Remove "init" virtual function, all gobjects have a place for that
		  already (constructor).
		- Replace "start" virtual function with "bring_up", devices can be
		  brought up and down more than just on startup now.
		- Add "is_up" virtual function.
		- Implement one way to bring a device down instead of previous 4 different
		  ways, each of witch did something different.

	* src/NetworkManagerUtils.c (nm_dev_sock_open): This doesn't need an NMDevice,
	all it needs is the device interface.

	Get rid of NMData.dev_list (3 members to go).
	Get rif of NMData in a lot of places.

	* gnome/libnm_glib/libnm_glib.c: Make it compile again.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2395 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-03-02 09:30:48 +00:00
Tambet Ingo 537b30f99e 2007-02-20 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device-802-11-wireless.c: Add "network-added" and
	"network-removed" signals.

	* libnm-glib/libnm-glib.pc.in: Require NetworkManager >= 0.7.0.

	* libnm-glib/nm-access-point.c: Add "strength-changed" signal, emit it
	when receiving the signal from dbus.

	* src/nm-device-802-11-wireless.c (get_property): Fix PROP_ACTIVE_NETWORK
	property.

	* src/NetworkManagerPolicy.c (state_changed): Fix a typo to make the
	deactivation of the previously activated device working again.

	* src/nm-activation-request.c: Remove NMActStage property and it's getter
	and setter.

	* src/nm-device.c (nm_device_is_activated): Remove.
	state == NM_DEVICE_STATE_ACTIVATED is just as easy to use.

	* include/NetworkManager.h: Remove NM_DBUS_NO_DEVICES_ERROR,
	NM_DBUS_NO_DIALUP_ERROR, NM_DBUS_NO_NETWORKS_ERROR,
	NM_DBUS_NO_ACTIVE_DEVICE_ERROR, NM_DBUS_NO_ACTIVE_NET_ERROR errors and
	NM_DBUS_SIGNAL_STATE_CHANGE signal.
	Remove NMNetworkStatus and NMActStage enums.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-20 15:24:42 +00:00
Tambet Ingo 3dcd9d2d17 2007-02-19 Tambet Ingo <tambet@ximian.com>
* src/vpn-manager/nm-vpn-manager.c: Handle the DBUS state changes itself.
	Handle device state changes and disconnect VPN if it's device deactivates.

	* src/nm-dbus-nm.c: 
	* src/nm-dbus-nm.h: 
	* src/nm-dbus-device.c: 
	* src/nm-dbus-device.c: 
	* src/nm-dbus-net.c: 
	* src/nm-dbus-net.h: Remove. All of it is implemented byt the new dbus API.

	* src/NetworkManagerMain.h: Get rid of all but 3 properties of NMData.

	* src/nm-device.c (nm_device_get_by_udi):
	(nm_device_get_by_iface): Remove. This doesn't belong here and is already
	implemented in the correct location (NMManager).
	Rip out all the test_device stuff.

	* src/NetworkManagerPolicy.c: Remove the leftover activation success and
	failure handlers, it's all done by NMDevice already.

	* src/NetworkManager.c: Move the signal handling here from nm-logging.c
	Remove the iochannel hack to route the unix signals to the main thread since
	we're not threaded anymore.

	* src/NetworkManagerAP.c: Implement HWAddress property.

	* src/NetworkManagerDbus.c: Remove the dbus signal sending code, it happens
	automatically with dbus-glib.

	* src/nm-netlink-monitor.c: 
	* src/nm-netlink-monitor.h:
		- Move it low in the class hierarchy, don't reference any NM types.
		- Remove private data from the header.
		- Use type safe checks in public API methods.
		- Make it a singleton so we don't have to pass the single reference around.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2339 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-19 13:09:32 +00:00
Tambet Ingo c40051389c 2007-02-16 Tambet Ingo <tambet@ximian.com>
* introspection/nm-ip4-config.xml: Implement.

	* libnm-glib/libnm-glib-test.c: Use new DBUS API in tests.

	* libnm-glib/nm-ip4-config.c:
	* libnm-glib/nm-ip4-config.c: Implement.

	* src/nm-ap-security[-*]: Remove circular dependencies between APs and AP
	securities. APs reference security.

	* src/nm-device-802-11-wireless.c: Implement missing properties that need to
	be exported over DBUS.

	* src/nm-device-802-3-ethernet.c: Ditto.

	* src/NetworkManagerAP.c:
	* src/NetworkManagerAP.h:
		- Convert to GObject, export over DBUS.

	* src/nm-ip4-config.h:
	* src/nm-ip4-config.h:
		- Convert to GObject, export over DBUS.




git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-16 11:23:49 +00:00
Tambet Ingo 7eeefaea40 2007-02-12 Tambet Ingo <tambet@ximian.com>
* libnm-glib/nm-device.c (nm_device_get_use_dhcp): Remove.

	* libnm-glib/nm-access-point.c (nm_access_point_is_broadcast): Remove.

	* introspection/nm-device-802-3-ethernet.xml: Rename 'Address' property to
	'HwAddress'.

	* introspection/nm-device.xml: Remove 'UseDhcp' property.

	* introspection/nm-access-point.xml: Remove 'Broadcast' property.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2310 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-02-12 14:46:49 +00:00
Tambet Ingo 8a4c57f631 2007-02-12 Tambet Ingo <tambet@ximian.com>
Totally break NetworkManager. Please use 0.6 branch until futher notice.

	* src/:
		- Remove old low-level dbus interface implementations and replace them
		  with dbus-glib one.

	* configure.in:
		- Require dbus-glib >= 0.72.
		- Plug in new sources to build.

	* libnm-glib/:
		- Implement GObject wrappers on top of DBUS glib auto-generated bindings
		  to make it more convenient to use from GObject based programs.

	* introspection/:
		- Implement DBUS XML introspection files, used by both NM and libnm-glib.



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