Source code

Revision control

Other Tools

1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
#include "nsISupports.idl"
6
7
[scriptable, builtinclass, uuid(2693457e-3ba5-4455-991f-5350946adb12)]
8
interface nsINetworkConnectivityService : nsISupports
9
{
10
/**
11
* Each tested feature may be in one of 3 states:
12
* UNKNOWN, if a check hasn't been performed.
13
* OK, if the feature was successfully tested
14
* NOT_AVAILABLE, if the feature is blocked by the network.
15
* Note that the endpoints are guaranteed to support the features.
16
*/
17
cenum ConnectivityState: 8 {
18
UNKNOWN = 0,
19
OK = 1,
20
NOT_AVAILABLE = 2
21
};
22
23
/* If DNS v4/v6 queries actually work on the current network */
24
[infallible]
25
readonly attribute nsINetworkConnectivityService_ConnectivityState DNSv4;
26
[infallible]
27
readonly attribute nsINetworkConnectivityService_ConnectivityState DNSv6;
28
29
/* If connecting to IPv4/v6 works on the current network */
30
[infallible]
31
readonly attribute nsINetworkConnectivityService_ConnectivityState IPv4;
32
[infallible]
33
readonly attribute nsINetworkConnectivityService_ConnectivityState IPv6;
34
35
/* Starts the DNS request to check for DNS v4/v6 availability */
36
void recheckDNS();
37
38
/* Starts HTTP requests over IPv4 and IPv6, and checks if they work */
39
void recheckIPConnectivity();
40
};