Commit graph

13 commits

Author SHA1 Message Date
Dan Williams bf76960597 libnm-glib: documentation fixes 2011-03-10 12:35:43 -06:00
Jiří Klimeš 15351042ba libnm-glib: add 'vpn-state' and 'banner' properties to NMVPNConnection class
Without these properties, the errors like these occured:
  WARNING **: handle_property_changed: property 'vpn-state' changed but wasn't
  defined by object type NMVPNConnection.
2010-03-12 11:03:14 +01:00
Dan Williams 866d48bb9b libnm-glib: add class padding for future expansion 2009-09-30 09:21:32 -07:00
Przemysław Grzegorczyk bac45aa0d5 clean up glib includes (bgo #564376)
Only <glib.h> and <gtk/gtk.h> need to be included.
2009-01-19 00:16:40 -05:00
Dan Williams 7118676968 2008-11-14 Dan Williams <dcbw@redhat.com>
Relicense libnm-glib to LGPLv2+ with agreement from contributors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4285 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-11-14 17:41:16 +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 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 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 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 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 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
Tambet Ingo 6a68d79c08 2007-08-09 Tambet Ingo <tambet@gmail.com>
[Based on patch by Helmut Schaa <hschaa@suse.de>]

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

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

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

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

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

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



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2659 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-08-09 09:19:57 +00:00
Tambet Ingo 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