blob: 13b06b2d99154499dddf62efb554ec8ab9e07630 [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// These are shared enums used by cros_network_config.
// NOTE: This mojom should kept in sync with the copy in Chromium's repo in
// src/chromeos/services/network_config/public/mojom/network_config.mojom.
module chromeos.network_config.mojom;
// Connection state of visible networks.
[Stable, Extensible]
enum ConnectionStateType {
// The network is connected and internet connectivity is available.
kOnline,
// The network is connected and not in a detected portal state, but
// internet connectivity may not be available.
kConnected,
// The network is connected but a portal state was detected. Internet
// connectivity may be limited. Additional details are in PortalState.
kPortal,
// The network is in the process of connecting.
kConnecting,
// The network is not connected.
kNotConnected,
};
// Device / Technology state for devices.
[Stable, Extensible]
enum DeviceStateType {
// The device is available but not yet initialized and can not be enabled.
kUninitialized,
// The device is initialized but disabled.
kDisabled,
// The device is in the process of disabling. Enable calls may fail until
// disabling has completed.
kDisabling,
// The device is in the process of enabling. Disable calls may fail until
// enabling has completed.
kEnabling,
// The device is enabled. Networks can be configured and connected.
kEnabled,
// The device is disabled and enabling the device is prohibited by policy.
kProhibited,
// Not used in DeviceStateProperties, but useful when querying by type.
kUnavailable,
};
// The network technology type. NOTE: 'All' and 'Wireless' are only used by
// FilterType for requesting groups of networks.
[Stable, Extensible]
enum NetworkType {
kAll,
kCellular,
kEthernet,
// Mobile includes Cellular, and Tether.
kMobile,
kTether,
kVPN,
// Wireles includes Cellular, Tether, and WiFi.
kWireless,
kWiFi,
};
// The ONC source for the network configuration, i.e. whether it is stored in
// the User or Device profile and whether it was configured by policy.
[Stable, Extensible]
enum OncSource {
// The network is not remembered, or the property is not configurable.
kNone,
// The configuration is saved in the user profile.
kUser,
// The configuration is saved in the device profile.
kDevice,
// The configuration came from a user policy and is saved in the user profile.
kUserPolicy,
// The configuration came from a device policy and is saved in the device
// profile.
kDevicePolicy,
};
// The policy source for property values managed by policy.
[Stable, Extensible]
enum PolicySource {
// The property is not controlled by policy.
kNone,
// The property value came from a user policy and is enforced.
kUserPolicyEnforced,
// The property value came from a device policy and is enforced.
kDevicePolicyEnforced,
// The property value came from a user policy and is recommended.
kUserPolicyRecommended,
// The property value came from a device policy and is recommended.
kDevicePolicyRecommended,
// The property value came from an extension.
kActiveExtension,
};
// The captive portal state. Provides additional details when the connection
// state is kPortal.
[Stable, Extensible]
enum PortalState {
// The network is not connected or the portal state is not available.
kUnknown,
// The network is connected and no portal is detected.
kOnline,
// A portal is suspected but no redirect was provided.
kPortalSuspected,
// The network is in a portal state with a redirect URL.
kPortal,
// A proxy requiring authentication is detected.
kProxyAuthRequired,
// The network is connected but no internet is available and no proxy was
// detected.
kNoInternet,
};