8 Manager interface described in vpn-manager-api.txt is to be used
9 by both the connectivity UI and by ConnMan. The Create(),
10 Remove(), RegisterAgent() and UnregisterAgent() functions are for
11 UI usage. The GetConnections() method and ConnectionAdded() and
12 ConnectionRemoved() signals are for ConnMan VPN plugin to use.
14 The UI should use the methods like this:
15 - Ask VPN properties (like certs, usernames etc) from the user.
16 - Call Manager.Create() to create a VPN connection (note that
17 the system does not yet try to connect to VPN at this point)
18 - Register an agent to vpnd so that vpnd can ask any extra
19 parameters etc from the user if needed.
20 - If the user wants to connect to VPN gateway, then the
21 connection attempt should be done in ConnMan side as
22 there will be a service created there.
23 - If the user wishes to remove the VPN configuration, the UI
24 can call the Manager.Remove() which removes the VPN connection.
25 If the VPN was in use, the VPN connection is also disconnected.
26 - When UI is terminated, the UI should call the UnregisterAgent()
28 The ConnMan calls VPN daemon like this:
29 - There is a VPN plugin which at startup starts to listen the
30 ConnectionAdded() and ConnectionRemoved() signals.
31 - The VPN plugin will call GetConnections() in order to get
32 available VPN connections. It will then create a provider service
33 for each VPN connection that is returned.
34 - User can then connect to the VPN by calling the service Connect()
36 - The existing ConnMan Manager.ConnectProvider() interface can still
37 work by calling vpn.Manager.Create() and then call vpn.Connection.Connect()
38 but this ConnectProvider() interface will be deprecated at some
46 The Manager.Create() will return the object path of the created
47 vpn.Connection object and place it in idle state. Note that
48 vpn.Connection.PropertyChanged signal is not called when Connection
49 object is created because the same parameters are returned via
50 vpn.Manager.ConnectionAdded() signal.
51 The vpn.Connection object can be connected using the Connect() method
52 and disconnected by calling Disconnect() method. When the connection
53 is established (meaning VPN client has managed to create a connection
54 to VPN server), then State property is set to "ready" and PropertyChanged
55 signal is sent. If the connection cannot be established, then
56 State property is set to "failure".
57 After successfull connection, the relevant connection properties are sent
58 by PropertyChanged signal; like IPv[4|6] information, the index of the
59 VPN tunneling interface (if there is any), nameserver information,
60 server specified routes etc.