Commit Graph

22 Commits

Author SHA1 Message Date
Dan Winship
72953e3dc4 libnm-glib: add libnm compat defines to nm-vpn-plugin-ui-interface.h
Add a bunch of compat defines to nm-vpn-plugin-ui-interface.h, to make
it easier to compile the same code against libnm-glib's
NMVpnPluginUiInterface and libnm's NMVpnEditorPlugin.

https://bugzilla.gnome.org/show_bug.cgi?id=752500
2015-07-25 10:51:23 +02:00
Dan Williams
2b9e442013 libnm/libnm-util: add VPN 'persistent' property
This property will indicate that the user wishes the VPN connection
to stay active until explicitly disconnected, even across link changes
or other interruptions.
2014-11-06 21:16:57 -06:00
Dan Winship
cb7e1893e7 libnm-util, libnm-glib: standardize copyright/license headers
- Remove list of authors from files that had them; these serve no
  purpose except to quickly get out of date (and were only used in
  libnm-util and not libnm-glib anyway).

- Just say "Copyright", not "(C) Copyright" or "Copyright (C)"

- Put copyright statement after the license, not before

- Remove "NetworkManager - Network link manager" from the few files
  that contained it, and "libnm_glib -- Access network status &
  information from glib applications" from the many files that
  contained it.

- Remove vim modeline from nm-device-olpc-mesh.[ch], add emacs modeline
  to files that were missing it.
2014-07-15 09:44:54 -04:00
Jiří Klimeš
f17ab954f6 libnm-util: make nm_setting_vpn_remove_*() return gboolean instead of void
to match other property removal functions, like nm_setting_bond_remove_option()
or nm_setting_wired_remove_s390_option().

Note:
This is an API change, make sure to bump soname when releasing libnm-util.
2013-04-03 08:35:47 +02:00
Jiří Klimeš
edb85e9720 core: fix NM_IS_*_CLASS(klass) macros
The argument is 'klass' not 'obj'.
2012-07-27 13:15:54 +02:00
Dan Winship
54ef8f3224 Fix names of error enum values
When NM was registering all of its enum types by hand, it was using
NamesLikeThis rather than the default names-like-this for the "nick"
values. When we switched to using glib-mkenums, this resulted in
dbus-glib using different strings for the D-Bus error names, causing
compatibility problems.

Fix this by using glib-mkenums annotations to manually fix all the
enum values back to what they were before. (This can't be done in a
more automated way, because the old names aren't 100% consistent. Eg,
"UNKNOWN" frequently becomes "UnknownError" rather than just
"Unknown".)
2012-03-12 15:29:52 -04:00
Dan Winship
839eab5564 Use glib-mkenums to generate enum types
Rather than generating enum classes by hand (and complaining in each
file that "this should really be standard"), use glib-mkenums.

Unfortunately, we need a very new version of glib-mkenums in order to
deal with NM's naming conventions and to fix a few other bugs, so just
import that into the source tree temporarily.

Also, to simplify the use of glib-mkenums, import Makefile.glib from
https://bugzilla.gnome.org/654395.

To avoid having to run glib-mkenums for every subdirectory of src/,
add a new "generated" directory, and put the generated enums files
there.

Finally, use Makefile.glib for marshallers too, and generate separate
ones for libnm-glib and NetworkManager.
2012-02-15 11:42:15 -05:00
Jiří Klimeš
3a23cddb37 libnm-util: add functions to get number of data items and secrets
nm_setting_vpn_get_num_data_items()
nm_setting_vpn_get_num_secrets()
2012-01-05 15:44:46 +01:00
Dan Williams
5fb8efbb19 docs: another trivial doc fix 2011-07-19 12:27:44 -05:00
Dan Williams
50df7397a5 docs: document the VPN setting 2011-07-19 12:06:47 -05:00
Dan Williams
8bc774fe16 libnm-util: remove VPNIterFunc backwards compat define 2011-02-21 18:04:49 -06:00
Dan Williams
092a6535e0 libnm-util: add generic functions for getting/setting secret flags
And remove the VPN-specific ones.  It's useful to have this stuff be
generic and the functionality wasn't really VPN-specific anyway.
2011-01-31 12:41:54 -06:00
Dan Williams
5a7cf39a62 libnm-util: add secret flags for each secret describing how the secret is stored
This allows the necessary flexibility when handling secrets; otherwise
it wouldn't be known when NM should save secrets returned from agents
to backing storage, or when the agents should store the secrets. We
can't simply use lack of a secret in persistent storage as the indicator
of this, as (for example) when creating a new connection without
secrets the storage method would be abmiguous.

At the same time, fold in "always ask" functionality for OTP tokens
so user agents don't have to store that attribute themselves out-of-band.
2011-01-29 13:34:24 -06:00
Giovanni Campagna
3ebecd2a29 introspection: add GObject introspection support (bgo #637032)
Add the necessary annotations (the mininum required, that is those
on return values. NULL parameters or container types may require
more), and the Autotools stuff to get a NetworkManager GIR for
libnm-util and a NMClient for libnm-glib.
2011-01-21 14:46:09 -06:00
Dan Williams
0596068561 libnm-util: add class padding for future expansion 2009-09-30 09:21:32 -07:00
Tambet Ingo
8f6eb995f9 2008-10-29 Tambet Ingo <tambet@gmail.com>
Half of it by Dan Williams <dcbw@redhat.com>

	* libnm-util/libnm-util.ver
	libnm-util/nm-setting-vpn.c
	libnm-util/nm-setting-vpn.h
		- Make properties private and add accessor functions.

	* src/vpn-manager/nm-vpn-connection.c
	src/vpn-manager/nm-vpn-manager.c
	system-settings/plugins/keyfile/reader.c
	vpn-daemons/openvpn/properties/auth-helpers.c
	vpn-daemons/openvpn/properties/import-export.c
	vpn-daemons/openvpn/properties/nm-openvpn.c
	vpn-daemons/openvpn/src/nm-openvpn-service.c
	vpn-daemons/pptp/auth-dialog/main.c
	vpn-daemons/pptp/properties/advanced-dialog.c
	vpn-daemons/pptp/properties/nm-pptp.c
	vpn-daemons/pptp/src/nm-pptp-service.c
	vpn-daemons/vpnc/properties/nm-vpnc.c
	vpn-daemons/vpnc/src/nm-vpnc-service.c
		- Use VPN setting accessors.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4232 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-10-29 09:13:40 +00:00
Dan Williams
ba15ee5f50 2008-09-04 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-vpn.c
	  libnm-util/nm-setting-vpn.h
		- Split VPN secrets from VPN data so that settings services can actually
			figure out that they are secrets and store them accordingly

	* system-settings/plugins/keyfile/nm-keyfile-connection.c
	  system-settings/plugins/keyfile/reader.c
	  system-settings/plugins/keyfile/reader.h
	  system-settings/plugins/keyfile/writer.c
		- Store VPN secrets separately from VPN data so that they can be fetched
			on demand
		- Implement the get_secrets() call so that (a) secrets don't leak out
			to unprivileged callers, and (b) secrets can be sent to privileged
			callers when needed

	* vpn-daemons/vpnc/src/nm-vpnc-service.c
		- Handle split VPN secrets



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4031 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-04 14:32:14 +00:00
Dan Williams
10661abe17 2008-08-11 Dan Williams <dcbw@redhat.com>
Merge the vpn-properties setting with the vpn setting since it was pointless
	to keep both of them around.  Convert the vpn 'data' hash table to a hash
	of string:string (instead of string:variant) so that system settings plugins
	can have an easier time dealing with the arbitrary key/value pairs.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3923 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-08-11 17:13:22 +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
281791ac77 2008-07-27 Dan Williams <dcbw@redhat.com>
* libnm-util/*
		- Relicense to LGPLv2+



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3859 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-07-27 20:03:46 +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
6b79d40a76 2007-11-07 Tambet Ingo <tambet@gmail.com>
Rework NMSetting structures: Move each setting to it's own file.
        Convert to GObject. Remove home grown setting types and use
GTypes.
        Use GObject property introspection for hash conversion,
enumerating
        properties, etc.

        * libnm-util/nm-setting-connection.[ch]
        * libnm-util/nm-setting-ip4-config.[ch]
        * libnm-util/nm-setting-ppp.[ch]
        * libnm-util/nm-setting-vpn.[ch]
        * libnm-util/nm-setting-vpn-properties.[ch]
        * libnm-util/nm-setting-wired.[ch]
        * libnm-util/nm-setting-wireless.[ch]
        * libnm-util/nm-setting-wireless-security.[ch]

        New files, each containing a setting.

        * libnm-util/nm-setting-template.[ch]: A template for creating
        * new
        settings. To use it, just replace 'template' with the new
setting
        name, and you're half-way done.

        * libnm-util/nm-setting.c: Convert to GObject and use GObject
        introspection instead of internal types and tables.

        * libnm-util/nm-connection.c: Adapt the new NMSetting work.

        * libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles
        GValue types defined by dbus-glib for composed types like
collections,
        structures and maps.

        * src/*: The API of NMSetting and NMConnection changed a bit:
        * Getting
        a setting from connection takes the setting type now. Also,
since
        the settings are in multiple files, include relevant settings.



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2007-11-07 16:06:43 +00:00