From: Patrik Flykt <[email protected]>

         Hi,

Here is a patch set that implements saving and loading of provider (VPN)
settings. The motivation of the patch set besides just saving settings is
to later on enable ConnMan to automatically instantiate service structs for
VPNs on startup or network scan, thus making possible for the Session API
to also wait for VPN connections. Although tempting to create such
functionality right away, this functionality is best done in future patch
sets.

The pattern for registering provider storage functions and saving provider
settings is copied from service. The difference to service saving and
loading is per provider vpn plugin saving functions (patches 08,10,12-14)
which enables each VPN to define which strings it wants to have saved. At
the same time there is no corresponding load function, the provider load
function simply loads all strings that have previously been saved (in patch
07).

Patches 05, 06 and 11 are fixes for minor issues.


Cheers,

        Patrik


Patrik Flykt (14):
  storage: Load and save support for a provider.
  provider: Register storage on initialization, unregister on cleanup.
  provider: load provider data on probe, save on connect
  provider: Add profile information to provider struct
  provider: Free provider->host
  provider: Properly set host and domain provider members
  provider: Load and save provider data
  provider: Define a save function for provider drivers
  provider: Helper function for fetching the save file group
  vpn: Extend vpn driver struct with save support
  provider: Get 'Host' and 'VPN.Domain' from provider struct
  openconnect: Save support for openconnect VPN
  openvpn: Save support for openvpn
  vpnc: Save support for vpnc

 include/provider.h    |    4 ++
 include/storage.h     |    3 +
 plugins/openconnect.c |   26 ++++++++++
 plugins/openvpn.c     |   18 +++++++
 plugins/vpn.c         |   15 ++++++
 plugins/vpn.h         |    1 +
 plugins/vpnc.c        |   18 +++++++
 src/connman.h         |    2 +
 src/provider.c        |  131 +++++++++++++++++++++++++++++++++++++++++++++++--
 src/storage.c         |   36 +++++++++++++
 10 files changed, 250 insertions(+), 4 deletions(-)

-- 
1.7.2.5

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to