Commit Graph

6 Commits

Author SHA1 Message Date
Lubomir Rintel
3517084b92 vpn-plugin-info: drop nm_vpn_plugin_info_get_service()
It is not used externally and its use might be confusing and undesired when we
add plugin aliases. The external users should only use the name when idenfiying
the plugin and nm_vpn_plugin_info_list_find_by_service() when matchin the plugin.
2015-11-02 16:01:21 +01:00
Lubomir Rintel
6c213e3cb4 libnm-core/vpn-plugin-info: add nm_vpn_plugin_info_supports_multiple() 2015-10-13 18:20:56 +02:00
Thomas Haller
e0bded93f3 libnm: avoid deprecated warning for NMVpnPluginInfo
When merely including "nm-vpn-plugin-info.h" (or "NetworkManager.h")
gcc raises warnings like:
  "Not available before 1.2 [-Werror=deprecated-declarations]"

The problem is that the NMVpnPluginInfo typedef itself is marked as
deprecated but also used by other functions like nm_vpn_plugin_info_get_name().

    typedef struct {
        int field;
    } Foo G_UNAVAILABLE(1,2);

    G_UNAVAILABLE(1,2)
    void deprecated_function (Foo *foo);

    warning: ‘Foo’ is deprecated: Not available before 1.2 [-Wdeprecated-declarations]

I think that when a function is itself deprecated, gcc should not warn about
the use of a deprecated typedef.
Gcc's documentation states: "Note that the warnings only occur for
uses and then only if the type is being applied to an identifier
that itself is not being declared as deprecated.".
Apparently, this only works for structs, but not for typedef of structs.

Anyway. Remove the deprecation from NMVpnPluginInfo to avoid the compiler
warning.

https://bugzilla.gnome.org/show_bug.cgi?id=753098

Fixes: d6226bd987
2015-08-04 15:59:32 +02:00
Dan Williams
3a7db0dd9e introspection: fix some annotations
Fixes: eafa6c3584
Fixes: eed0d0c58f
Fixes: b5cc017ba4
Fixes: bce040daa2
2015-07-31 14:19:14 -05:00
Thomas Haller
eafa6c3584 libnm: add load method to NMVpnPluginInfo
https://bugzilla.gnome.org/show_bug.cgi?id=749877
2015-07-29 22:34:35 +02:00
Thomas Haller
d6226bd987 libnm: add NMVpnPluginInfo class
NMVpnPluginInfo is little more then a wrapper around
the GKeyFile that describes the VPN plugin settings,
i.e. the name files under "/etc/NetworkManager/VPN/".

Add this class to make the VPN API more explicit. Clients
now can use NMVpnPluginInfo instead of concerning themselves
with loading the keyfile and the meaning of its properties.

Also add support for a new VPN plugins directory
"/usr/lib/NetworkManager/VPN", which should replace
"/etc/NetworkManager/VPN" in the future. But we have to
consider both locations for backward compatibility.

The content of the VPN directory is not user configuration,
hence it should not be under "/etc". See related bug 738853.
2015-07-29 22:34:35 +02:00