Debian Codegraph @

data/org.freedesktop.portal.NetworkMonitor.xml

raw
1 <?xml version="1.0"?>
2 <!--
3 Copyright (C) 2016 Red Hat, Inc.
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library. If not, see <http://www.gnu.org/licenses/>.
19
20 Author: Matthias Clasen <[email protected]>
21 -->
22 <node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
23 <!--
24 org.freedesktop.portal.NetworkMonitor:
25 @short_description: Network monitoring portal
26
27 The NetworkMonitor interface provides network status information
28 to sandboxed applications. It is not a portal in the strict sense,
29 since it does not involve user interaction. Applications are
30 expected to use this interface indirectly, via a library API
31 such as the GLib GNetworkMonitor interface.
32
33 This documentation describes version 3 of this interface.
34 -->
35 <interface name="org.freedesktop.portal.NetworkMonitor">
36 <!--
37 changed:
38
39 Emitted when the network configuration changes.
40 -->
41 <signal name="changed"/>
42 <!--
43 GetAvailable:
44 @available: whether the network is available
45
46 Returns whether the network is considered available.
47 That is, whether the system as a default route for
48 at least one of IPv4 or IPv6.
49
50 This method was added in version 2 to replace
51 the available property.
52 -->
53 <method name="GetAvailable">
54 <arg type="b" name="available" direction="out"/>
55 </method>
56 <!--
57 GetMetered:
58 @metered: whether the network is metered
59
60 Returns whether the network is considered metered.
61 That is, whether the system as traffic flowing through
62 the default connection that is subject ot limitations
63 by service providers.
64
65 This method was added in version 2 to replace
66 the metered property.
67 -->
68 <method name="GetMetered">
69 <arg type="b" name="metered" direction="out"/>
70 </method>
71 <!--
72 GetConnectivity:
73 @connectivity: the level of connectivity
74
75 Returns more detailed information about the host's network
76 connectivity. The meaning of the value is:
77
78 - ``1``: Local only. The host is not configured with a route to the internet.
79 - ``2``: Limited connectivity. The host is connected to a network, but can't reach the full internet.
80 - ``3``: Captive portal. The host is behind a captive portal and cannot reach the full internet.
81 - ``4``: Full network. The host connected to a network, and can reach the full internet.
82
83 This method was added in version 2 to replace
84 the connectivity property.
85 -->
86 <method name="GetConnectivity">
87 <arg type="u" name="connectivity" direction="out"/>
88 </method>
89 <!--
90 GetStatus:
91 @status: a dictionary with the current values
92
93 Returns the three values all at once.
94
95 The following results get returned via @status:
96
97 * ``available`` (``b``)
98
99 Whether the network is available.
100
101 * ``metered`` (``b``)
102
103 Whether the network is metered.
104
105 * ``connectivity`` (``u``)
106
107 The level of connectivity.
108
109 This method was added in version 3 to avoid multiple round-trips.
110 -->
111 <method name="GetStatus">
112 <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
113 <arg type="a{sv}" name="status" direction="out"/>
114 </method>
115
116 <!--
117 CanReach:
118 @hostname: the hostname to reach
119 @port: the port to reach
120 @reachable: Whether the hostname:port was reachable
121
122 Returns whether the given hostname is believed to be reachable.
123 This method was added in version 3.
124 -->
125 <method name="CanReach">
126 <arg type="s" name="hostname" direction="in"/>
127 <arg type="u" name="port" direction="in"/>
128 <arg type="b" name="reachable" direction="out"/>
129 </method>
130
131 <property name="version" type="u" access="read"/>
132 </interface>
133 </node>