1. 16 Jan, 2018 1 commit
    • Thomas Haller's avatar
      libnm: add nm_vpn_service_plugin_shutdown() API · e4282529
      Thomas Haller authored
      Otherwise, the only way to disconnect the NMVpnServicePlugin
      instance is by completely unrefing it. However, often it is
      not so easy to ensure that nobody else is still keeping the
      instance alive, after the point where we no longer want to
      handle D-Bus requests. nm_vpn_service_plugin_shutdown() to the
  2. 09 Mar, 2017 1 commit
    • Thomas Haller's avatar
      include: use double-quotes to include our own headers · 831286df
      Thomas Haller authored
      In practice, this should only matter when there are multiple
      header files with the same name. That is something we try
      to avoid already, by giving headers a distinct name.
      When building NetworkManager itself, we clearly want to use
      double-quotes for including our own headers.
      But we also want to do that in our public headers. For example:
          #include <stdio.h>
          #include <nm-1.h>
          void main() {
              printf ("INCLUDED %s/nm-2.h\n", SYMB);
          #include <nm-2.h>
          #define SYMB "1"
          #define SYMB "2"
      $ cc -I./2 -I./1 ./a.c
      $ ./a.out
      INCLUDED 2/nm-2.h
      Exceptions to this are
        - headers in "shared/nm-utils" that include <NetworkManager.h>. These
          headers are copied into projects and hence used like headers owned by
          those projects.
        - examples/C
  3. 05 May, 2016 1 commit
  4. 27 Jan, 2016 1 commit
    • Thomas Haller's avatar
      libnm: include "nm-vpn-service-plugin.h" in "NetworkManager.h" · fc7c333d
      Thomas Haller authored
      "nm-vpn-service-plugin.h" includes "nm-connection.h", so there is already no
      way to use "nm-vpn-service-plugin.h" without also pulling in all "NetworkManager.h".
      On the other hand, we might not include "nm-vpn-service-plugin.h" in
      "NetworkManager.h" to keep the overall headers small (by default).
      But let's just include it too. We already opted for convenience
      over small-include by having one top-level header file.
  5. 14 Oct, 2015 1 commit
  6. 13 Oct, 2015 2 commits
    • Lubomir Rintel's avatar
      libnm/vpn-service-plugin: remove nm_vpn_service_plugin_{get,set}_state() · fd61b217
      Lubomir Rintel authored
      The plugins set state only on failures and often forget to do that. Do the
      correct status transition to STOPPED in nm_vpn_service_plugin_failure() instead.
      The get_state() is only used to find out whether to fail or orderly disconnect
      depending on whether we're STARTING or already STARTED. Handle that in
      nm_vpn_service_plugin_disconnect() in a generic manner instead.
    • Lubomir Rintel's avatar
      libnm/vpn-service-plugin: add watch-peer property · 9f15abbd
      Lubomir Rintel authored
      Make it possible to construct the plugin instance in a way that disconnects the
      connection if the DBus client that activated it drops off the bus. This makes the
      plugins conveniently clean up when NetworkManager crashes.
      We need this, as with multiple VPN support we can loose track of the client bus
      names when the daemon crashes leaving to nice way to clean up on respawn.
      However, this behavior is not desired for debugging or hypotetical VPN plugin
      users other than NetworkManager (say; "gdbus call -m o.fd.NM.VPN.Plugin.Connect").
      Let the plugin decide when to use it.
  7. 29 Jul, 2015 3 commits
  8. 19 May, 2015 1 commit
  9. 28 Oct, 2014 2 commits
    • Dan Winship's avatar
      libnm: merge nm-vpn-plugin-utils into nm-vpn-plugin-old · 4d9cbaf9
      Dan Winship authored
      The new VPN plugin API will hopefully simplify some the the tasks that
      are currently handled by nm-vpn-plugin-utils functions, so make those
      functions explicitly be part of the "old" API. (If we still want them
      in the new API we can just move them back out, and have the "_old_"
      versions just be wrappers around the undeprecated ones.)
    • Dan Winship's avatar
      libnm: rename NMVpnPlugin to NMVpnPluginOld · f4526060
      Dan Winship authored
      Rename libnm's NMVpnPlugin to NMVpnPluginOld, in preparation for
      having a new-and-improved NMVpnPlugin in NM 1.2. Also remove it from
      Make nm-vpn-plugin-old.h be separately includable, since it's not
      included from NetworkManager.h, and we probably don't want it to be.
      Remove NMVpnPlugin, NMVpnPluginUiInterface, and nm-vpn-plugin-utils
      from the docs, since they're basically undocumented anyway.