tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsINetworkConnectivityService.idl (1684B)


      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: 32 {
     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  attribute nsINetworkConnectivityService_ConnectivityState DNSv4;
     26  [infallible]
     27  attribute nsINetworkConnectivityService_ConnectivityState DNSv6;
     28  [infallible]
     29  attribute nsINetworkConnectivityService_ConnectivityState DNS_HTTPS;
     30 
     31  /* If connecting to IPv4/v6 works on the current network */
     32  [infallible]
     33  attribute nsINetworkConnectivityService_ConnectivityState IPv4;
     34  [infallible]
     35  attribute nsINetworkConnectivityService_ConnectivityState IPv6;
     36 
     37  /* If a NAT64 gateway was detected on the current network */
     38  [infallible]
     39  attribute nsINetworkConnectivityService_ConnectivityState NAT64;
     40 
     41  /* Starts the DNS request to check for DNS v4/v6 availability */
     42  void recheckDNS();
     43 
     44  /* Starts HTTP requests over IPv4 and IPv6, and checks if they work */
     45  void recheckIPConnectivity();
     46 };