Commit graph

15 commits

Author SHA1 Message Date
Lubomir Rintel 972e0d2803 all: rename the introspection data to use the interface paths in names
This makes it easier to install the files with proper names.
Also, it makes the makefile rules slightly simpler.

Lastly, the documentation is now generated into docs/api, which makes it
possible to get rid of the awkward relative file names in docbook.
2016-11-23 15:43:42 +01:00
Lubomir Rintel a8e8e76641 dbus: fix up the XML formatting
The conversion script didn't do a very good job. It got fired.
2016-04-05 14:37:51 +02:00
Lubomir Rintel 2ae34aef9f dbus: correct the links to types
gdbus-codegen is not smart enough to understand #Type, include raw
docbook directly.
2016-04-05 14:37:51 +02:00
Lubomir Rintel 6e2b188361 dbus: convert the annotations to gtk-doc blocks 2016-04-05 14:37:51 +02:00
Lubomir Rintel 618373a14f dbus: use the annotations for documentation
gdbus only understands those (and gtk docstrings, which we should eventually
use) when generating the documentation.
2016-03-26 11:28:19 +01:00
Dan Winship 6793a32a8c libnm: port to GDBus
Port libnm-core/libnm to GDBus.

The NetworkManager daemon continues to use dbus-glib; the
previously-added connection hash/variant conversion methods are now
moved to NetworkManagerUtils (along with a few other utilities that
are now only needed by the daemon code).
2014-09-18 11:51:09 -04:00
Dan Winship e42ab85f1b introspection: fix VPN.Plugin State type
It was listed as being tp:type="NM_VPN_CONNECTION_STATE", but it's
actually NM_VPN_SERVICE_STATE (which wasn't previously documented).
2014-07-15 09:44:55 -04:00
Jiří Klimeš 9dff830692 vpn: fix connecting to VPN (bgo #708255)
The ConnectInteractive() -> Connect() fallback code doesn't work, because
_connect_internal() changes the state to NM_VPN_SERVICE_STATE_STARTING before
checking if it can implement ConnectInteractive(), and then when the Connect()
call comes in, the VPN is not in STOPPED or INIT, so it returns an error.

The commit moves setting state to STARTING after the ConnectInteractive() check
availability, in the plugin. We introduce new plugin error and set it when the
the plugin does not implement ConnectInteractive(). NetworkManager uses this
error for ConnectInteractive() -> Connect() fallback.

https://bugzilla.gnome.org/show_bug.cgi?id=708255
2013-09-27 13:26:09 +02:00
Dan Williams cc924d8bab libnm-glib-vpn: add support for interactive secrets requests
There are three additions to the D-Bus interface for VPN plugins as
part of this patch:

1) ConnectInteractive(): called by NM instead of Connect() to let
the plugin know that it can request additional secrets during the
connection process using SecretsRequired

2) SecretsRequired: a new signal emitted by the plugin to indicate
to NetworkManager that additional secrets are required to connect;
can only be called if NetworkManager initiated the connection by
calling the ConnectInteractive() method

3) NewSecrets(): a new method of the plugin that NetworkManager calls
when new secrets requested by the SecretsRequired signal have been
retrieved from secret agents

We need new methods because agents need to be aware of the hints that
the VPN plugins may send with the SecretsRequired signal (detailing
the specific secrets that are required) and at this time, not all
agents support passing those hints to the VPN plugin authentication
dialogs.
2013-07-31 08:16:40 -05:00
Dan Winship 960c1ae8ff vpn: support IPv6 over VPNs
Add new API to allow passing both IPv4 and IPv6 configuration
information from VPN plugins to the backend.

Now instead of a single Ip4Config, a plugin has Config, Ip4Config, and
Ip6Config. "Config" contains information which is neither IPv4 nor
IPv6 specific, and also indicates which of Ip4Config and Ip6Config are
present. Ip4Config now only contains the IPv4-specific bits of
configuration.

There is backward compatibility in both directions: if the daemon is
new and the VPN plugin is old, then NM will notice that the plugin
emitted the Ip4Config signal without having emitted the Config signal
first, and so will assume that it is IPv4-only, and that the generic
bits of configuration have been included with the Ip4Config. If the
daemon is old and the plugin is new, then NMVPNPlugin will copy the
values from the generic config into the IPv4 config as well. (In fact,
NMVPNPlugin *always* does this, because it's harmless, and it's easier
than actually checking the daemon version.)

Currently the VPN is still configured all-at-once, after both IPv4 and
IPv6 information has been received, but the APIs allow for the
possibility of configuring them one at a time in the future.
2012-05-30 14:24:46 -04:00
Tambet Ingo b37fc86385 2008-09-22 Tambet Ingo <tambet@gmail.com>
* src/vpn-manager/nm-vpn-connection.c: Add a signal handler for the
	"Failure" signal from VPN plugins, store the failure reason, and
	use it when the state is changed to failure.

	* introspection/nm-vpn-plugin.xml: Fix the "Failure" signal's type
	description.

	* include/NetworkManagerVPN.h (NMVPNConnectionStateReason): Add a new
	reason to the end of the list to not break the API.
	(NMVPNPluginFailure): Move it here (from libnm-glib/nm-vpn-plugin.h)
	so it can be shared by plugins and daemon.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4088 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-09-22 15:29:00 +00:00
Dan Williams 8ffe21b65f 2008-02-27 Dan Williams <dcbw@redhat.com>
Patch from Will Stephenson <wstephenson@kde.org>

	* Makefile.am
	  configure.in
		- Set up spec autogeneration infrastructure

	* docs/NetworkManager DBUS API.txt
		- Note how old this doc is and where to look for the canonical
			D-Bus specification

	* introspection/*
		- Add annotations and comments



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-02-28 02:07:21 +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
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