From: Daniel Wagner <[email protected]>

---
 doc/session-api.txt      |   14 ++++++++++++++
 doc/session-overview.txt |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/doc/session-api.txt b/doc/session-api.txt
index 600f057..6ea91ab 100644
--- a/doc/session-api.txt
+++ b/doc/session-api.txt
@@ -319,3 +319,17 @@ Settings   string  Bearer [readonly]
                        this allows ConnMan to setup the firewall rules
                        that only traffic from the emergency application
                        are transmitted.
+
+               array{string, dict} BearerSettings [readwrite]
+
+                       In case that an application needs to define settings
+                       depending on the bearer, BearerSettings allows to
+                       overwrite the sessions global settings.
+
+                       For example the PeriodicConnect value might be different
+                       for wifi and cellular bearer type, the application can
+                       overwrite the session global PeriodicConnect here.
+
+                       The application does not have to set all settings per
+                       bearer. Only the ones which should overwrite the
+                       sessions global settings.
diff --git a/doc/session-overview.txt b/doc/session-overview.txt
index 10852c6..b2f9304 100644
--- a/doc/session-overview.txt
+++ b/doc/session-overview.txt
@@ -156,3 +156,42 @@ is okay to disonnect.
 PeriodicConnect and IdleTimeout should only consired as hints. ConnMan
 will try to meet them but there is no garantee for doing so. For
 example global settings have precedence of session settings.
+
+BearerSettings
+--------------
+
+The BearerSettings is strictly speaking syntactic sugar for the session
+API. An application could configure the same settings creating several
+session at once.
+
+For example in one use case there are two cellular uplinks A and B
+available. Only one of them is allowed to use roaming. In this case
+the application would have the need to create two sessions one for the
+cellular uplink A (roaming allowed) and the other one for the uplink B
+(roaming forbidden).
+
+One might argue that this is okay to multiplex the configuration
+space, but this has one major disadvantage. In case an application
+wants go to online it doesn't know if it should call Connect() on the
+first or the second session.
+
+The main purpose of the Session API is to move this kind of logic into
+ConnMan. No application should have to care about it.
+
+The BearerSettings allow to overwrite the session settings. The
+session settings could be considered as the common configuration among
+all bearers and the BearerSetting allow to overwrite certain settings.
+
+Accepted entries per bearer are: Priority, AvoidHandover,
+StayConnected, PeriodicConnect, IdleTimeout and RoamingPolicy.
+
+A simple configuration example might be:
+
+PeriodicConnect = 0
+IdleTimeout     = 0
+AllowedBearers  = [ ethernet, wifi, cellular ]
+BearerSettings  = [ [ cellular, { Priority        : True,
+                                 PeriodicConnect : 20,
+                                 IdleTimeout     : 1     } ],
+                   [ wifi,     { PeriodicConnect : 10,
+                                 IdleTimeout     : 2     } ] ]
-- 
1.7.4.4

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

Reply via email to