blob: ea981e11175199d51c1eb8f875077afc45df1436 [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.
module chromeos.network_config.mojom;
// Connection state of visible networks.
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.
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.
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.
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.
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.
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,
};