// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Next MinVersion: 5 // API intended for retrieving a snapshot of the network health state. Returns // properties of any available network technologies and any connected or // connecting network when available. // NOTE: This mojom exists in two places and must be kept in sync: // Chromium: chromeos/services/network_health/public/mojom/ // ChromeOS: src/platform2/diagnostics/mojom/external/ module chromeos.network_health.mojom; import "chromeos/services/network_health/public/mojom/network_health_types.mojom"; // Observer for events generated by the NetworkHealthService hosted by the // Ash-Chrome browser process. Expected clients include the Ash-Chrome browser // itself, the Lacros-Chrome browser, and the cros_healthd system service which // provides telemetry data for additional clients (including Ash-Chrome). // A network guid uniquely identifies a network. For more information, see the // definition of "NetworkStateProperties" at // //chromeos/services/network_config/public/mojom/cros_network_config.mojom. // Next Method ID: 3 [Stable] interface NetworkEventsObserver { // Fired when a network’s connection state changes. OnConnectionStateChanged@0(string guid, NetworkState state); // Fired when a wireless network’s signal strength changes by ten or more // percent. See the definition of |signal_strength| under the "Network" // struct. OnSignalStrengthChanged@1(string guid, UInt32Value signal_strength); // Fired when the list of networks changes. [MinVersion=4] OnNetworkListChanged@2(array networks); }; // Interface for retrieving aggregated information about the current network // state and health. This services is implemented in the Ash-Chrome browser // process. // Next Method ID: 4 [Stable] interface NetworkHealthService { // Adds an observer to be notified on network events. The caller can remove // the observer created by this call by closing their end of the message // pipe. AddObserver@0(pending_remote observer); // Returns a list of networks. See NetworkHealthState.networks for more // details. GetNetworkList@1() => (array networks); // Returns the current network health state. // This is currently the same information provided by GetNetworkList. More // information will be added over time. GetHealthSnapshot@2() => (NetworkHealthState state); // Returns the list of network guids we want traffic counters for. This // includes currently active networks as well as networks that were active // within the last hour. [MinVersion=2] GetRecentlyActiveNetworks@3() => (array guids); };