session doc: Fix typo
[framework/connectivity/connman.git] / doc / session-overview.txt
1 Session API
2 ***********
3
4
5 Connection management algorithm basics
6 ======================================
7
8 When a session is created, a sorted list of services is added to the
9 session. The services are filtered and stable sorted according
10 following rules:
11
12  - AllowedBearers (filter and sort)
13  - RoamingPolicy (filter and sort)
14
15 A stable sorting algorithm maintains the relative order.
16
17 If a service is removed or added all sessions are updated according
18 the above rules.
19
20 There are three triggers which lead to evaluate the connect
21 algorithm:
22
23  - Session.Connect()
24  - PeriodicConnect
25  - Offline
26
27 Connect algorithm:
28
29               Session.Connect()     Offline
30               PeriodicConnect        |
31                        | Yes  +------+-------+  No
32                        +------+StayConnected?+------ Do nothing
33                        |      +--------------+
34 Session.Change() ------+
35                        |
36                 +------+-------+
37           +-----+EmergencyCall?+-----+
38        Yes|     +--------------+     |No
39           |                          |
40         Connect to            +--------------+
41         first available   +---+AvoidHandover?+---+
42         Service           |   +--------------+   |
43                        Yes|                      |No
44                  +----------------+              |
45              +---+In service_list +---+          |
46           Yes|   |and online?     |   |No        |
47              |   +----------------+   |          |
48              |                        |          |
49          Take that one                Take first in
50                                       the service list
51
52 There are two triggers which lead to evaluate the disconnect
53 algorithm
54
55  - Session.Disconnect()
56  - IdleTimeout
57
58 Disconnect algorithm:
59
60   Session.Disconnect()
61   IdleTimeout
62        |
63        +--- Session.Change()
64        |
65 +-----------------+    Yes
66 |service not used +-------------+
67 |by other session?|             |
68 +------.----------+             |
69        |No                      |
70        |                        |
71     Service.Disconnect()   Do nothing