Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(662)

Side by Side Diff: extensions/common/api/networking_private.idl

Issue 1036033002: Add types to networkigPrivate IDL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_470262_networking_private_idl_1
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « extensions/browser/api/networking_private/networking_private_api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The <code>chrome.networkingPrivate</code> API is used for configuring 5 // The <code>chrome.networkingPrivate</code> API is used for configuring
6 // network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). This private 6 // network connections (Cellular, Ethernet, VPN, WiFi or WiMAX). This private
7 // API is only valid if called from a browser or app associated with the 7 // API is only valid if called from a browser or app associated with the
8 // primary user. See the ONC documentation for descriptions of properties. 8 // primary user. See the ONC documentation for descriptions of properties.
9 // TODO(stevenjb/pneubeck): Merge the ONC documentation with this document and 9 // TODO(stevenjb/pneubeck): Merge the ONC documentation with this document and
10 // use it as the ONC specification. 10 // use it as the ONC specification.
11 11
12 namespace networkingPrivate { 12 namespace networkingPrivate {
13 enum ActivationStateType {
14 Activated, Activating, NotActivated, PartiallyActivated
15 };
16
13 enum CaptivePortalStatus { 17 enum CaptivePortalStatus {
14 Unknown, Offline, Online, Portal, ProxyAuthRequired 18 Unknown, Offline, Online, Portal, ProxyAuthRequired
15 }; 19 };
16 20
21 enum ConnectionStateType {
22 Connected, Connecting, NotConnected
23 };
24
25 enum IPConfigType {
26 DHCP, Static
27 };
28
17 enum NetworkType { 29 enum NetworkType {
18 All, Bluetooth, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX 30 All, Bluetooth, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX
19 }; 31 };
20 32
33 dictionary APNProperties {
34 DOMString? AccessPointName;
35 DOMString? Name;
36 DOMString? Username;
37 DOMString? Password;
38 };
39
40 dictionary CellularConfigProperties {
41 boolean? AutoConnect;
42 APNProperties? APN;
43 };
44
45 dictionary CellularStateProperties {
46 long? SignalStrength;
47 boolean? OutOfCredits;
48 DOMString? RoamingState;
49 ActivationStateType? ActivationState;
50 DOMString? NetworkTechnology;
51 };
52
53 dictionary EthernetStateProperties {
54 DOMString? Authentication;
55 };
56
57 dictionary IPConfigProperties {
58 DOMString? Gateway;
59 DOMString? IPAddress;
60 DOMString[]? NameServers;
61 DOMString? Type;
62 long? RoutingPrefix;
63 };
64
65 dictionary IPSecProperties {
66 DOMString? AuthenticationType;
67 };
68
69 dictionary VPNConfigProperties {
70 boolean? AutoConnect;
71 DOMString? Type;
72 DOMString? Host;
73 };
74
75 dictionary VPNStateProperties {
76 DOMString? Type;
77 IPSecProperties? IPsec;
78 };
79
80 dictionary WiFiConfigProperties {
81 boolean? AutoConnect;
82 };
83
84 dictionary WiFiStateProperties {
85 DOMString? Security;
86 long? SignalStrength;
87 };
88
89 dictionary WiMaxConfigProperties {
90 boolean? AutoConnect;
91 };
92
93 dictionary WiMAXStateProperties {
94 long? SignalStrength;
95 };
96
97 dictionary NetworkConfigProperties {
98 CellularConfigProperties? Cellular;
99 DOMString? GUID;
100 IPConfigType? IPAddressConfigType;
101 DOMString? Name;
102 IPConfigType? NameServersConfigType;
103 long? Priority;
104 IPConfigProperties? StaticIPConfig;
105 NetworkType? Type;
106 VPNConfigProperties? VPN;
107 WiFiConfigProperties? WiFi;
108 WiMaxConfigProperties? WiMAX;
109 };
110
111 dictionary NetworkStateProperties {
112 CellularStateProperties? Cellular;
113 boolean? Connectable;
114 ConnectionStateType? ConnectionState;
115 EthernetStateProperties? Ethernet;
116 DOMString? ErrorState;
117 DOMString GUID;
118 DOMString? Name;
119 long? Priority;
120 DOMString? Source;
121 NetworkType Type;
122 VPNStateProperties? VPN;
123 WiFiStateProperties? WiFi;
124 WiMAXStateProperties? WiMAX;
125 };
126
asargent_no_longer_on_chrome 2015/03/26 20:05:40 nit: usually the names for members of a dictionary
stevenjb 2015/03/27 17:03:21 These names need to match the ONC spec. I will cla
21 dictionary VerificationProperties { 127 dictionary VerificationProperties {
22 // A string containing a PEM-encoded (including the 'BEGIN CERTIFICATE' 128 // A string containing a PEM-encoded (including the 'BEGIN CERTIFICATE'
23 // header and 'END CERTIFICATE' footer) X.509 certificate for use in 129 // header and 'END CERTIFICATE' footer) X.509 certificate for use in
24 // verifying the signed data. 130 // verifying the signed data.
25 DOMString certificate; 131 DOMString certificate;
26 132
27 // An array of PEM-encoded X.509 intermediate certificate authority 133 // An array of PEM-encoded X.509 intermediate certificate authority
28 // certificates. Each PEM-encoded certificate is expected to have the 134 // certificates. Each PEM-encoded certificate is expected to have the
29 // 'BEGIN CERTIFICATE' header and 'END CERTIFICATE' footer. 135 // 'BEGIN CERTIFICATE' header and 'END CERTIFICATE' footer.
30 DOMString[]? intermediateCertificates; 136 DOMString[]? intermediateCertificates;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 long? limit; 175 long? limit;
70 }; 176 };
71 177
72 callback VoidCallback = void(); 178 callback VoidCallback = void();
73 callback BooleanCallback = void(boolean result); 179 callback BooleanCallback = void(boolean result);
74 callback StringCallback = void(DOMString result); 180 callback StringCallback = void(DOMString result);
75 // TODO(stevenjb): Use NetworkProperties for |result| once defined. 181 // TODO(stevenjb): Use NetworkProperties for |result| once defined.
76 callback GetPropertiesCallback = void(object result); 182 callback GetPropertiesCallback = void(object result);
77 // TODO(stevenjb): Use ManagedNetworkProperties for |result| once defined. 183 // TODO(stevenjb): Use ManagedNetworkProperties for |result| once defined.
78 callback GetManagedPropertiesCallback = void(object result); 184 callback GetManagedPropertiesCallback = void(object result);
79 callback GetStatePropertiesCallback = void(object result); 185 callback GetStatePropertiesCallback = void(NetworkStateProperties result);
80 callback GetNetworksCallback = void(object[] result); 186 callback GetNetworksCallback = void(NetworkStateProperties[] result);
81 callback GetEnabledNetwrokTypesCallback = void(NetworkType[] result); 187 callback GetEnabledNetwrokTypesCallback = void(NetworkType[] result);
82 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result); 188 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result);
83 189
84 // These functions all report failures via chrome.runtime.lastError. 190 // These functions all report failures via chrome.runtime.lastError.
85 interface Functions { 191 interface Functions {
86 // Gets all the properties of the network with id networkGuid. Includes all 192 // Gets all the properties of the network with id networkGuid. Includes all
87 // properties of the network (read-only and read/write values). 193 // properties of the network (read-only and read/write values).
88 // |networkGuid|: The identifier of the network to get properties for. 194 // |networkGuid|: The identifier of the network to get properties for.
89 // |callback|: Returns the properties of the network. 195 // |callback|: Returns the properties of the network.
90 static void getProperties(DOMString networkGuid, 196 static void getProperties(DOMString networkGuid,
(...skipping 18 matching lines...) Expand all
109 // |networkGuid|: The identifier of the network to get properties for. 215 // |networkGuid|: The identifier of the network to get properties for.
110 // |callback|: Returns the managed properties of the network. 216 // |callback|: Returns the managed properties of the network.
111 static void getState(DOMString networkGuid, 217 static void getState(DOMString networkGuid,
112 GetStatePropertiesCallback callback); 218 GetStatePropertiesCallback callback);
113 219
114 // Sets the properties of the network with id networkGuid. 220 // Sets the properties of the network with id networkGuid.
115 // |networkGuid|: The identifier of the network to set properties for. 221 // |networkGuid|: The identifier of the network to set properties for.
116 // |properties|: The ONC properties to set. 222 // |properties|: The ONC properties to set.
117 // |callback|: Called when the operation has completed. 223 // |callback|: Called when the operation has completed.
118 static void setProperties(DOMString networkGuid, 224 static void setProperties(DOMString networkGuid,
119 object properties, 225 NetworkConfigProperties properties,
120 optional VoidCallback callback); 226 optional VoidCallback callback);
121 227
122 // Creates a new network configuration from properties. If a matching 228 // Creates a new network configuration from properties. If a matching
123 // configured network already exists, this will fail. Otherwise returns the 229 // configured network already exists, this will fail. Otherwise returns the
124 // guid of the new network. 230 // guid of the new network.
125 // |shared|: If true, share this network configuration with other users. 231 // |shared|: If true, share this network configuration with other users.
126 // |properties|: The ONC properties to configure the new network with. 232 // |properties|: The ONC properties to configure the new network with.
127 // |callback|: Returns the identifier of the created network. 233 // |callback|: Returns the identifier of the created network.
128 static void createNetwork(boolean shared, 234 static void createNetwork(boolean shared,
129 object properties, 235 NetworkConfigProperties properties,
130 optional StringCallback callback); 236 optional StringCallback callback);
131 237
132 // Forgets a network configuration by clearing any configured properties for 238 // Forgets a network configuration by clearing any configured properties for
133 // the network with GUID 'networkGuid'. This may also include any other 239 // the network with GUID 'networkGuid'. This may also include any other
134 // networks with matching identifiers (e.g. WiFi SSID and Security). If no 240 // networks with matching identifiers (e.g. WiFi SSID and Security). If no
135 // such configuration exists, an error will be set and the operation will 241 // such configuration exists, an error will be set and the operation will
136 // fail. 242 // fail.
137 static void forgetNetwork(DOMString networkGuid, 243 static void forgetNetwork(DOMString networkGuid,
138 optional VoidCallback callback); 244 optional VoidCallback callback);
139 245
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // Fired when the list of networks has changed. Sends a complete list of 362 // Fired when the list of networks has changed. Sends a complete list of
257 // identifiers for all the current networks. 363 // identifiers for all the current networks.
258 static void onNetworkListChanged(DOMString[] changes); 364 static void onNetworkListChanged(DOMString[] changes);
259 365
260 // Fired when a portal detection for a network completes. Sends the guid of 366 // Fired when a portal detection for a network completes. Sends the guid of
261 // the network and the corresponding captive portal status. 367 // the network and the corresponding captive portal status.
262 static void onPortalDetectionCompleted(DOMString networkGuid, 368 static void onPortalDetectionCompleted(DOMString networkGuid,
263 CaptivePortalStatus status); 369 CaptivePortalStatus status);
264 }; 370 };
265 }; 371 };
OLDNEW
« no previous file with comments | « extensions/browser/api/networking_private/networking_private_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698