2 Interface net.connman.Notification
3 Object path freely definable
7 This method gets called when the service daemon
8 unregisters the session. A counter can use it to do
9 cleanup tasks. There is no need to unregister the
10 session, because when this method gets called it has
11 already been unregistered.
13 void Update(dict settings)
15 Sends an update of changed settings. Only settings
16 that are changed will be included.
18 Initially on every session creation this method is
19 called once to inform about the current settings.
23 Interface net.connman.Session
26 Methods void Destroy()
28 Close the current session. This is similar to
29 DestroySession method on the manager interface. It
30 is just provided for convenience depending on how
31 the application wants to track the session.
35 If not connected, then attempt to connect this
38 The usage of this method depends a little bit on
39 the model of the application. Some application
40 should not try to call Connect on any session at
41 all. They should just monitor if it becomes online
44 Others might require an active connection right now.
45 So for example email notification should only check
46 for new emails when a connection is available. However
47 if the user presses the button for get email or wants
48 to send an email it should request to get online with
51 Depending on the bearer settings the current service
52 is used or a new service will be connected.
54 This method returns when the connection has been
55 established and it is online. Additionally an update
56 notification with the IP settings is sent.
58 It is also not guaranteed that a session stays online
59 after this method call. It can be taken offline at any
60 time. This might happen because of idle timeouts or
63 It is safe to call this method multiple times. The
64 actual usage will be sorted out for the application.
68 This method indicates that the current session does
69 not need a connection anymore.
71 In most cases this method returns right away without
72 any delays. However in some cases it might take a few
73 seconds before a connection can be terminated.
75 void Change(string name, variant value)
77 Change the value of certain settings. Not all
78 settings can be changed. Normally this should not
79 be needed or an extra session should be created.
80 However in some cases it makes sense to change
81 a value and trigger different behavior.
83 A change of a setting will cause an update notification
84 to be sent. Some changes might cause the session to
85 be moved to offline state.
87 Settings string Bearer [readonly]
89 This indicates the current bearer that is used
90 for this session. Or an empty string if no bearer
93 boolean Online [readonly]
95 This indicates if the connection is online or
98 This maps to the online service state. And it is
99 only valid for the selected bearer configuration.
100 Otherwise it will be reported as offline even if
101 the global state would be online.
103 In addition the Online settings notification might
104 not happen right away. Notifications of online state
105 can be delayed based on the speed of the bearer. It
106 is done to avoid congestion on bearers like 3G etc.
108 boolean Realtime [readwrite]
110 This indicates if the application uses realtime traffic.
112 For example a streaming session should set the
113 realtime value. As soon as realtime data is involved
114 then this should be set. An email client should not
117 string Name [readonly]
119 The Service name to which the system is connected.
120 It should only be used for displaying it in the UI
121 and not for getting hold on session object.
123 array{string} AllowedBearers [readwrite]
125 A list of bearers that can be used for this session.
126 In general this list should be empty to indicate that
127 any bearer is acceptable.
131 Current IPv4 configuration. This settings is only
132 valid when online is true as well. Otherwise an
133 empty dictionary is reported.
137 Current IPv6 configuration. This setting is only
138 valid when online is true as well. Otherwise an
139 empty dictionary is reported.
141 boolean AvoidHandover [readwrite]
143 By default this setting is false. It can be used
144 to indicate that a handover is currently not a good
145 idea. However no connection is guaranteed. So a
146 handover can happen anyway. This is just an indication
147 that the application would like to avoid it right now.
149 It is a bad idea to always enable this settings and
150 actually it will be reset after a while to avoid
153 Main use case it is for application that are currently
154 doing a specific tasks that it prefers to finish
155 before allowing handovers again. An example would
158 Never the less application needs to be aware that
159 handovers can happen at any time even if this is
162 boolean StayConnected [readwrite]
164 This disables the idle timeout for this session. There
165 is no guarantee and this should be used with care.
167 If the system is not online yet this value is ignored.
169 uint32 PeriodicConnect [readwrite]
171 Indicate that a periodic connection attempt every
172 n minutes should be made. The minutes value is a
173 suggestion when to connection. There is no guarantee
174 that it will be made or will succeed.
176 A value of 0 disable this feature.
178 This feature is interesting for applications that
179 wanna check status on a regular interval. And instead
180 of the application waking up and trying to connect,
181 this can be centralized nicely and multiple wakeups
182 avoided in case no connection is available.
184 An example application would be an email client that
185 wants to check for new emails every 10 minutes.
187 On purpose the smallest setting is 1 minute here since
188 waking up more often and trying to set up a connection
189 seems rather pointless use case.
191 If an interval step has passed this can be nicely
192 rescheduled when any connection matching the bearer
193 settings becomes available becomes available. Using
194 this feature it is also easy to avoid congestion.
196 uint32 IdleTimeout [readwrite]
198 If the system is idle for given period then it should
201 If the timeout is 0, this feature is disabled. If
202 different values are provided by several session object
203 the longest interval is taken as timeout value.
205 boolean EmergencyCall [readwrite]
207 Boolean representing the emergency mode of the
208 modem. The Emergency is true if an emergency call or
209 related operation is currently active.
211 Only one application is supposed to write this setting
212 and therefore it will be protected by additional
213 PolicyKit rule so that only the emergency application
216 boolean RoamingAllowed [readwrite]
218 By default this value is true. The application can
219 disabling roaming on a global level.
221 string Interface [readonly]
223 Interface name used by the service object to connect.
224 This name can be used for SO_BINDTODEVICE in the
227 uint32 SessionMarker [readonly]
229 The unique session marker can be used to mark all
230 traffic from the application with the SO_MARK
231 socket option. In combination of the EmergencyCall
232 this allows ConnMan to setup the firewall rules
233 that only traffic from the emergency application